分配Pod到node
给node打上标签
kubectl label nodes <your-node-name> disktype=ssd
查看标签
kubectl get nodes --show-labels
根据标签分配node
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
env: test
spec:
containers:
- name: nginx
image: nginx
imagePullPolicy: IfNotPresent
nodeSelector:
disktype: ssd
指定node
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
nodeName: foo-node # 调度 Pod 到特定的节点
containers:
- name: nginx
image: nginx
imagePullPolicy: IfNotPresent
标签:node,name,标签,nginx,Pod,分配
From: https://www.cnblogs.com/pr1s0n/p/17577788.html