Skip to content

Instantly share code, notes, and snippets.

@ankushagarwal
Created April 15, 2020 21:16
Show Gist options
  • Save ankushagarwal/1abce96f71edd2b93b5339cb9987b037 to your computer and use it in GitHub Desktop.
Save ankushagarwal/1abce96f71edd2b93b5339cb9987b037 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
name: cluster-test-maintenance
labels:
app: cluster-test
spec:
nodeSelector:
nodeType: clustertest
restartPolicy: Never
serviceAccountName: clustertest
tolerations:
- key: "clustertest"
operator: "Exists"
effect: "NoSchedule"
containers:
- name: main
image: bitnami/kubectl
imagePullPolicy: Always
command: ["sleep", "86400"]
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values: ["cluster-test"]
topologyKey: "kubernetes.io/hostname"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment