Affinity For Scheduling

The affinity option expects an object which sets the affinity Kubernetes attribute for Pods.

Default Value For affinity

affinity: {}

Example: Setting Affitiny For Scheduling

containers:
- image: john/appbackend
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- store
topologyKey: "kubernetes.io/hostname"