Skip to content

Instantly share code, notes, and snippets.

@INDIAN2020
Created October 20, 2021 07:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save INDIAN2020/6ebcafce2bb19023e611800dbf13e19f to your computer and use it in GitHub Desktop.
Save INDIAN2020/6ebcafce2bb19023e611800dbf13e19f to your computer and use it in GitHub Desktop.
---
kind: ConfigMap
apiVersion: v1
metadata:
name: redis-config
data:
maxmemory: 2mb
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-deployment
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis-container
image: redis:alpine
ports:
- containerPort: 6379
resources:
requests:
cpu: "1000m"
volumeMounts:
- mountPath: /redis-master-data
name: data
- mountPath: /redis-master
name: redis-config
volumes:
- name: data
emptyDir: {}
- name: redis-config
configMap:
name: redis-config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment