feat: Add deployment scripts and hard node affinity for nginx-load-balancer example

This commit is contained in:
mik-tf
2025-11-07 22:18:44 -05:00
parent 3028643a2c
commit 77e054cdea
6 changed files with 530 additions and 13 deletions

View File

@@ -16,18 +16,14 @@ spec:
spec:
hostNetwork: false
dnsPolicy: ClusterFirst
# Prefer worker nodes only (not master nodes)
# Hard requirement: worker nodes only (not master nodes)
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
preference:
matchExpressions:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/master
operator: DoesNotExist
- weight: 50
preference:
matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: DoesNotExist
containers: