apiVersion: v1
kind: Pod
metadata:
generateName: node-affinity-
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: topology.kubernetes.io/zone
operator: In
values:
- zone1
- zone2
containers:
- image: registry.k8s.io/pause:3.10
name: pause
ports:
- containerPort: 80
resources:
limits:
cpu: 100m
memory: 500Mi
requests:
cpu: 100m
memory: 500Mi