Skip to content

Instantly share code, notes, and snippets.

@jdato
Created May 12, 2021 11:56
Show Gist options
  • Save jdato/9adfa6a9c525c8f03ebe894db2a424c3 to your computer and use it in GitHub Desktop.
Save jdato/9adfa6a9c525c8f03ebe894db2a424c3 to your computer and use it in GitHub Desktop.
Kubernetes anti affinity example
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- my-application
topologyKey: kubernetes.io/hostname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment