feat: add node affinity for DaemonSet scheduling
- Implement node affinity to prevent scheduling on vkvm-us2 - Update affinity section in daemonset.yaml - Ensure that the DaemonSet runs only on specific nodes This change introduces a node affinity rule to the DaemonSet configuration, allowing it to avoid scheduling on nodes labeled with `kubernetes.io/hostname` set to `vkvm-us2`. This helps to ensure resource allocation and performance by restricting the DaemonSet to the desired nodes.
This commit is contained in:
parent
e5e9bfd9f3
commit
f27876c6ab
@ -14,10 +14,15 @@ spec:
|
||||
spec:
|
||||
#nodeSelector:
|
||||
# kubernetes.io/hostname: "vkvm-us1"
|
||||
#affinity:
|
||||
# nodeAffinity:
|
||||
# requiredDuringSchedulingIgnoredDuringExecution:
|
||||
# nodeSelectorTerms:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: NotIn
|
||||
values:
|
||||
- vkvm-us2
|
||||
# - matchExpressions:
|
||||
# #- key: region
|
||||
# # operator: NotIn
|
||||
|
Loading…
Reference in New Issue
Block a user