首先給節點打上標籤,然後修改deployment的yaml檔案,特別要注意nodeSelector欄位放置的位置:
# 示例片段
spec:
containers:
- name: container-xxx
image: 'xxxxxx'
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
# 標籤選擇
nodeSelector:
tag-name: name0
本作品採用《CC 協議》,轉載必須註明作者和本文連結