selector
が必須になったと思う
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
nginx-deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: deployment spec: replicas: 2 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:latest ports: - containerPort: 80 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
centos-deployemnt.yaml apiVersion: apps/v1 kind: Deployment metadata: name: deployment spec: replicas: 2 selector: matchLabels: app: centos template: metadata: labels: app: centos spec: containers: - name: centos image: centos:latest tty: true |