Skip to content

Commit

Permalink
antiaffinity rule added
Browse files Browse the repository at this point in the history
  • Loading branch information
emre-23 committed Dec 4, 2021
1 parent a092477 commit e3030b2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion k8s_files/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spec:
selector:
matchLabels:
app: main
replicas: 2
replicas: 4
revisionHistoryLimit: 0
progressDeadlineSeconds: 30
strategy:
Expand All @@ -19,6 +19,16 @@ spec:
labels:
app: main
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- main
topologyKey: "kubernetes.io/hostname"
containers:
- name: main
image: 23emre/main:latest
Expand Down

0 comments on commit e3030b2

Please sign in to comment.