k8scpu内存资源限制和日志目录挂载
apiVersion: apps/v1kind: Deploymentmetadata:name: testCpuAndVolumeslabels:app: testCpuAndVolumesspec:replicas: 1template:spec:containers:- name: eureka-0...
·
apiVersion: apps/v1
kind: Deployment
metadata:
name: testCpuAndVolumes
labels:
app: testCpuAndVolumes
spec:
replicas: 1
template:
spec:
containers:
- name: testCpuAndVolumes
volumeMounts:
- mountPath: "/opt/SpringCloud/logs"
name: logs
resources:
requests:
memory: 2Gi #内存最小使用量(默认值,可根据实际情况修改)
cpu: "0.3" #cpu最小使用率(默认值,可根据实际情况修改)
limits:
memory: 6Gi #内存最大使用量(默认值,可根据实际情况修改)
cpu: "6" #cpu最大使用率(默认值,可根据实际情况修改)
volumes:
- name: logs
hostPath:
path: /opt/logs
更多推荐
已为社区贡献9条内容
所有评论(0)