Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ravisantoshgudimetla/f6b85b3e3119c9ac6e01617e8cd610fd to your computer and use it in GitHub Desktop.
Save ravisantoshgudimetla/f6b85b3e3119c9ac6e01617e8cd610fd to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
name: pod-s3
annotations:
scheduler.alpha.kubernetes.io/affinity: >
{"podAntiAffinity": {
"requiredDuringSchedulingIgnoredDuringExecution": [
{
"labelSelector" :{
"matchExpressions": [
{
"key": "security",
"operator": "In",
"values": ["s1"]
}
]
},
"topologyKey": "kubernetes.io/hostname"
}]
}}
spec:
containers:
- name: pod-antiaffinity
image: docker.io/ocpqe/hello-pod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment