1
0
Fork 0
home-stack-kustomize/kustomize/bases/redis/redis-deployment.yaml

50 lines
1.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
labels:
app.kubernetes.io/component: redis
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/component: redis
template:
metadata:
labels:
app.kubernetes.io/component: redis
spec:
containers:
- name: redis
image: redis
args: ["--appendonly", "yes", "--requirepass", "$(REDIS_PASSWORD)"]
env:
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: redis-credentials
key: password
ports:
- name: redis
containerPort: 6379
resources:
requests:
cpu: 250m
memory: 250Mi
limits:
cpu: 500m
memory: 250Mi
---
apiVersion: v1
kind: Service
metadata:
name: redis
labels:
app.kubernetes.io/name: redis
spec:
selector:
app.kubernetes.io/name: redis
ports:
- name: redis
port: 6379
targetPort: redis