This commit is contained in:
parent
9ca26ec930
commit
3e0d464770
47
redis-insight/redis-insight-deployment.yaml
Normal file
47
redis-insight/redis-insight-deployment.yaml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: redisinsight #deployment name
|
||||||
|
namespace: redis-system
|
||||||
|
labels:
|
||||||
|
app: redisinsight #deployment label
|
||||||
|
spec:
|
||||||
|
replicas: 1 #a single replica pod
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: redisinsight #which pods is the deployment managing, as defined by the pod template
|
||||||
|
template: #pod template
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: redisinsight #label for pod/s
|
||||||
|
spec:
|
||||||
|
volumes:
|
||||||
|
- name: db
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: redisinsight-pvc
|
||||||
|
initContainers:
|
||||||
|
- name: init
|
||||||
|
image: busybox
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- '-c'
|
||||||
|
- |
|
||||||
|
chown -R 1001 /db
|
||||||
|
resources: {}
|
||||||
|
volumeMounts:
|
||||||
|
- name: db
|
||||||
|
mountPath: /db
|
||||||
|
terminationMessagePath: /dev/termination-log
|
||||||
|
terminationMessagePolicy: File
|
||||||
|
containers:
|
||||||
|
- name: redisinsight #Container name (DNS_LABEL, unique)
|
||||||
|
image: redislabs/redisinsight:latest #repo/image
|
||||||
|
imagePullPolicy: IfNotPresent #Always pull image
|
||||||
|
volumeMounts:
|
||||||
|
- name: db #Pod volumes to mount into the container's filesystem. Cannot be updated.
|
||||||
|
mountPath: /db
|
||||||
|
ports:
|
||||||
|
- containerPort: 8001 #exposed container port and protocol
|
||||||
|
protocol: TCP
|
14
redis-insight/redis-insight-pvc-db.yaml
Normal file
14
redis-insight/redis-insight-pvc-db.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: redisinsight-pvc
|
||||||
|
namespace: redis-system
|
||||||
|
labels:
|
||||||
|
app: redisinsight
|
||||||
|
spec:
|
||||||
|
storageClassName: longhorn
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 2Gi
|
12
redis-insight/redis-insight-service.yaml
Normal file
12
redis-insight/redis-insight-service.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: redisinsight-service # name should not be 'redisinsight'
|
||||||
|
namespace: redis-system
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 8001
|
||||||
|
selector:
|
||||||
|
app: redisinsight
|
Loading…
Reference in New Issue
Block a user