Skip to content

Instantly share code, notes, and snippets.

@rssnyder
Created May 14, 2024 19:27
Show Gist options
  • Save rssnyder/748036b6e9991556115c4caacb572d5a to your computer and use it in GitHub Desktop.
Save rssnyder/748036b6e9991556115c4caacb572d5a to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis:7.2.4
imagePullPolicy: IfNotPresent
ports:
- name: api
containerPort: 6379
resources:
limits:
memory: 2Gi
requests:
cpu: 1
memory: 2Gi
---
apiVersion: v1
kind: Service
metadata:
name: redis
spec:
type: ClusterIP
selector:
app: redis
ports:
- name: api
port: 6379
targetPort: api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment