Use redis 5 on k8s & add selector

master
Philipp Trulson 5 years ago
parent 97b9098eb9
commit 3b9281501a

@ -5,6 +5,11 @@ metadata:
namespace: mailu-mailserver namespace: mailu-mailserver
spec: spec:
replicas: 1 replicas: 1
selector:
matchLabels:
app: mailu-redis
role: mail
tier: backend
template: template:
metadata: metadata:
labels: labels:
@ -13,29 +18,28 @@ spec:
tier: backend tier: backend
spec: spec:
containers: containers:
- name: redis - name: redis
image: redis:4.0-alpine image: redis:5-alpine
imagePullPolicy: Always imagePullPolicy: Always
volumeMounts: volumeMounts:
- mountPath: /data - mountPath: /data
name: redisdata name: redisdata
ports: ports:
- containerPort: 6379 - containerPort: 6379
name: redis name: redis
protocol: TCP protocol: TCP
resources: resources:
requests: requests:
memory: 200Mi memory: 200Mi
cpu: 100m cpu: 100m
limits: limits:
memory: 300Mi memory: 300Mi
cpu: 200m cpu: 200m
volumes: volumes:
- name: redisdata - name: redisdata
persistentVolumeClaim: persistentVolumeClaim:
claimName: redis-hdd claimName: redis-hdd
--- ---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -51,6 +55,6 @@ spec:
role: mail role: mail
tier: backend tier: backend
ports: ports:
- name: redis - name: redis
port: 6379 port: 6379
protocol: TCP protocol: TCP

@ -0,0 +1 @@
Use Redis 5.0 in kubernetes manifests
Loading…
Cancel
Save