mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-02-14 18:29:52 +00:00
57 lines
1.4 KiB
YAML
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 |