我想做类似的事情
nodeSelector:
role: "!database"
Run Code Online (Sandbox Code Playgroud)
为了在不托管数据库的节点上安排 pod。
谢谢
从这里:https : //kubernetes.io/docs/concepts/configuration/assign-pod-node/
apiVersion: v1
kind: Pod
metadata:
name: with-node-affinity
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: role
operator: NotIn
values:
- database
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3950 次 |
| 最近记录: |