当前位置:  首页>> 技术小册>> Kubernets合辑9-资源约束

  1. apiVersion: v1
  2. kind: Pod
  3. metadata:
  4. name: nginx-demo-1
  5. namespace: apps
  6. labels:
  7. app: nginx
  8. spec:
  9. containers:
  10. - name: nginx-demo-1
  11. image: linuxmaxiaoke/nginx:v1.0.0
  1. # 容器采用默认值
  2. [root@maxiaoke local-k8s-yaml]# kubectl describe pod -n apps nginx-demo-1
  3. Limits:
  4. cpu: 500m
  5. memory: 1Gi
  6. Requests:
  7. cpu: 100m
  8. memory: 128Mi

该分类下的相关小册推荐: