feat: Simplify nginx-nodeport example with worker-only deployment and improved learning path

This commit is contained in:
mik-tf
2025-11-07 11:00:23 -05:00
parent 14172e2164
commit 370c0d1547
3 changed files with 261 additions and 584 deletions

View File

@@ -16,6 +16,20 @@ spec:
spec:
hostNetwork: false
dnsPolicy: ClusterFirst
# Prefer worker nodes only (not master nodes)
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
preference:
matchExpressions:
- key: node-role.kubernetes.io/master
operator: DoesNotExist
- weight: 50
preference:
matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: DoesNotExist
containers:
- name: nginx
image: nginx:alpine