Step 1: 给Node 打上 label
- 打label
kubectl label nodes node-name level=low
- 查看label
kubelctl get no --show-labels
Step 2: 配置Deployment
apiVersion: v1
kind: Pod
metadata:
name: pod-example
spec:
nodeSelector:
label: low
containers:
- name: nginx
image: nginx:1.19
网友评论