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/927f44bf2efb1dacea51f316d4c53e42 to your computer and use it in GitHub Desktop.
Save tasdikrahman/927f44bf2efb1dacea51f316d4c53e42 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:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- store
topologyKey: kubernetes.io/hostname
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