Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tasdikrahman/b706b8e9c57d8b7ec3e311ab0dacb188 to your computer and use it in GitHub Desktop.
Save tasdikrahman/b706b8e9c57d8b7ec3e311ab0dacb188 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-cache
spec:
selector:
matchLabels:
app: store
replicas: 3
template:
metadata:
labels:
app: store
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- store
namespaces:
- default
topologyKey: failure-domain.beta.kubernetes.io/zone
weight: 100
containers:
- name: redis-server
image: redis:3.2-alpine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment