当前位置:  首页>> 技术小册>> Kubernets合辑6-服务发现

为了测试方便,先部署测试使用的 deployment :

  1. # deploy-demo.yaml
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: nginx-deploy
  6. namespace: default
  7. spec:
  8. replicas: 5
  9. selector:
  10. matchLabels:
  11. app: nginx
  12. release: stable
  13. tier: slb
  14. partition: website
  15. strategy:
  16. rollingUpdate:
  17. maxSurge: 1
  18. maxUnavailable: 0
  19. template:
  20. metadata:
  21. labels:
  22. app: nginx
  23. release: stable
  24. tier: slb
  25. partition: website
  26. version: v1.12
  27. spec:
  28. containers:
  29. - name: nginx-pod
  30. image: linuxduduniao/nginx:v1.0.3

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