54 lines
975 B
YAML
54 lines
975 B
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: nextcloud
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: nextcloud-redis
|
|
namespace: nextcloud
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: nextcloud-redis
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: nextcloud-redis
|
|
spec:
|
|
containers:
|
|
- name: broker
|
|
image: docker.io/library/redis:7
|
|
imagePullPolicy: IfNotPresent
|
|
volumeMounts:
|
|
- name: redisdata
|
|
mountPath: /data
|
|
ports:
|
|
- name: redis
|
|
containerPort: 6379
|
|
# resources:
|
|
# limits:
|
|
# cpu: 100m
|
|
# memory: 50Mi
|
|
volumes:
|
|
- name: redisdata
|
|
hostPath:
|
|
path: /opt/kubernetes/Nextcloud_kube/data/redisdata
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: redis
|
|
namespace: nextcloud
|
|
spec:
|
|
selector:
|
|
app: nextcloud-redis
|
|
ports:
|
|
- protocol: TCP
|
|
port: 6379
|
|
targetPort: redis
|
|
|