Skip to content

Commit

Permalink
prefer deploying pods on different nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
ypapax committed Apr 18, 2018
1 parent d035e9c commit a37efdc
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions backend/kubernetes_external_ip.yaml
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
metadata:
name: say-deployment
spec:
replicas: 3
replicas: 6
template:
metadata:
labels:
Expand All @@ -16,14 +16,16 @@ spec:
- containerPort: 8080
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- say
topologyKey: "kubernetes.io/hostname"
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: "app"
operator: In
values:
- say
topologyKey: "kubernetes.io/hostname"
---
kind: Service
apiVersion: v1
Expand Down

0 comments on commit a37efdc

Please sign in to comment.