Skip to content

Commit

Permalink
k8s redis changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpbennett committed Jul 12, 2024
1 parent 5738fc9 commit a0a7a87
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 14 deletions.
24 changes: 11 additions & 13 deletions kubernetes/apps/redis-db/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-deployment
labels:
app: redis
name: redis-stack
spec:
replicas: 1
selector:
matchLabels:
app: redis
app: redis-stack
template:
metadata:
labels:
app: redis
app: redis-stack
spec:
containers:
- name: redis
- name: redis-stack
image: redis/redis-stack:latest
ports:
- containerPort: 6379
- containerPort: 8001
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
volumeMounts:
- mountPath: /data
name: redis-data
volumes:
- name: redis-data
persistentVolumeClaim:
claimName: redis-pvc
10 changes: 10 additions & 0 deletions kubernetes/apps/redis-db/persistant-vol-claim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: redis-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
11 changes: 11 additions & 0 deletions kubernetes/apps/redis-db/persistant-vol.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: redis-pv
spec:
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
hostPath:
path: /mnt/storage/redis
5 changes: 4 additions & 1 deletion kubernetes/apps/redis-db/service.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: redis-service
name: redis-stack
spec:
selector:
app: redis
ports:
- protocol: TCP
port: 6379
targetPort: 6379
- protocol: TCP
port: 8001
targetPort: 8001
type: LoadBalancer

0 comments on commit a0a7a87

Please sign in to comment.