Files
podinfo/deploy/bases/cache/deployment.yaml
Stefan Prodan f1eb631ac9 Add database deployment demo
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2026-02-01 11:45:23 +02:00

57 lines
1.4 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: cache
spec:
selector:
matchLabels:
app.kubernetes.io/name: cache
template:
metadata:
labels:
app.kubernetes.io/name: cache
spec:
containers:
- name: redis
image: docker.io/redis:8.4.0
imagePullPolicy: IfNotPresent
command:
- redis-server
- "/redis-master/redis.conf"
ports:
- name: redis
containerPort: 6379
protocol: TCP
livenessProbe:
tcpSocket:
port: redis
initialDelaySeconds: 5
timeoutSeconds: 5
readinessProbe:
exec:
command:
- redis-cli
- ping
initialDelaySeconds: 5
timeoutSeconds: 5
resources:
limits:
cpu: 1000m
memory: 128Mi
requests:
cpu: 100m
memory: 32Mi
volumeMounts:
- mountPath: /var/lib/redis
name: data
- mountPath: /redis-master
name: config
volumes:
- name: data
emptyDir: {}
- name: config
configMap:
name: redis-config
items:
- key: redis.conf
path: redis.conf