1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
apiVersion: extensions /v1beta1 kind: Deployment metadata: name: myweb spec: replicas: 7 template: metadata: labels: app: myweb spec: nodeName: k8s-node01 containers: - name: myweb image: hub.atguigu.com /library/myapp :v1 ports: - containerPort: 80 |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
apiVersion: extensions /v1beta1 kind: Deployment metadata: name: myweb spec: replicas: 2 template: metadata: labels: app: myweb spec: nodeSelector: type : backEndNode1 containers: - name: myweb image: harbor /tomcat :8.5-jre8 ports: - containerPort: 80 |
原文:https://www.cnblogs.com/uvwill/p/12943755.html