将pod调度到指定的node上
Schedule a pod as follows:name:nginx-kusc00401Image:nginxNode selector:disk-spinning如下:root@lijian:~/k8s# cat pod.ymlapiVersion: v1kind: Podmetadata:name: nginx-kusc00401spec:containers:- name: nginxi
·
Schedule a pod as follows:
name: nginx-kusc00401
Image: nginx
Node selector: disk-spinning
如下:
root@lijian:~/k8s# cat pod.yml
apiVersion: v1
kind: Pod
metadata:
name: nginx-kusc00401
spec:
containers:
- name: nginx
image: nginx:latest
nodeSelector:
disk: spinning
root@lijian:~/k8s# kubectl apply -f pod.yml
pod/nginx-kusc00401 created
更多推荐
已为社区贡献6条内容
所有评论(0)