mirror of
https://github.com/clearlinux/dockerfiles.git
synced 2026-09-03 04:01:38 +00:00
50 lines
912 B
YAML
50 lines
912 B
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: redis-config
|
|
data:
|
|
redis.conf: |
|
|
maxmemory 2mb
|
|
maxmemory-policy allkeys-lru
|
|
|
|
---
|
|
apiVersion: apps/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: redis-deployment
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
name: redis-deployment
|
|
labels:
|
|
app: redis
|
|
spec:
|
|
volumes:
|
|
- name: config-volume
|
|
configMap:
|
|
name: redis-config
|
|
containers:
|
|
- image: docker.io/clearlinux/redis
|
|
name: redis
|
|
command: ["redis-server"]
|
|
args: ["/etc/redis.conf","--protected-mode no"]
|
|
volumeMounts:
|
|
- name: config-volume
|
|
mountPath: /etc/redis.conf
|
|
subPath: redis.conf
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: redis-svc
|
|
spec:
|
|
type: NodePort
|
|
ports:
|
|
- port: 6379
|
|
targetPort: 6379
|
|
nodePort: 30001
|
|
selector:
|
|
app: redis
|