Skip to content

Commit

Permalink
pod-anti-affinity
Browse files Browse the repository at this point in the history
  • Loading branch information
wardviaene committed Jul 26, 2018
1 parent 4e7aac7 commit cda738e
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions affinity/pod-anti-affinity-5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: pod-affinity-5
spec:
replicas: 1
template:
metadata:
labels:
app: pod-affinity-5
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- pod-affinity-1
- pod-affinity-3
topologyKey: "kubernetes.io/hostname"
containers:
- name: k8s-demo
image: wardviaene/k8s-demo
ports:
- name: nodejs-port
containerPort: 3000
---

0 comments on commit cda738e

Please sign in to comment.