--- apiVersion: v1 kind: Namespace metadata: name: redisinsight --- apiVersion: v1 kind: ConfigMap metadata: name: redisinsight-config namespace: redisinsight data: # Pointing to the internal service name of the new Redis instance database.host: "redis-service.redis.svc.cluster.local" database.port: "6379" database.instance: "redis" RI_LOG_LEVEL: "info" RI_ALLOW_PRIVILEGED: "true" RI_TELEMETRY: "false" --- apiVersion: v1 kind: Secret metadata: name: redis-secret namespace: redisinsight type: Opaque data: password: NjI4akZL --- apiVersion: v1 kind: ServiceAccount metadata: name: redisinsight-sa namespace: redisinsight --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: redisinsight-role namespace: redisinsight rules: - apiGroups: [""] resources: ["pods", "services", "persistentvolumeclaims", "configmaps", "secrets"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: redisinsight-rolebinding namespace: redisinsight subjects: - kind: ServiceAccount name: redisinsight-sa namespace: redisinsight roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: redisinsight-role --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: redisinsight-pvc namespace: redisinsight spec: accessModes: ["ReadWriteMany"] storageClassName: nfs-storage resources: requests: storage: 2Gi --- apiVersion: apps/v1 kind: Deployment metadata: name: redisinsight namespace: redisinsight spec: replicas: 1 selector: matchLabels: app: redisinsight template: metadata: labels: app: redisinsight spec: serviceAccountName: redisinsight-sa affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: node-role.kubernetes.io/control-plane operator: DoesNotExist containers: - name: redisinsight image: redislabs/redisinsight:latest ports: - containerPort: 8001 volumeMounts: - name: redisinsight-data mountPath: /db env: - name: RI_APP_HOST value: "0.0.0.0" - name: RI_APP_PORT value: "8001" - name: RI_LOG_LEVEL valueFrom: configMapKeyRef: name: redisinsight-config key: RI_LOG_LEVEL - name: RI_ALLOW_PRIVILEGED valueFrom: configMapKeyRef: name: redisinsight-config key: RI_ALLOW_PRIVILEGED - name: RI_TELEMETRY valueFrom: configMapKeyRef: name: redisinsight-config key: RI_TELEMETRY - name: RI_DATABASE_0_NAME valueFrom: configMapKeyRef: name: redisinsight-config key: database.instance - name: RI_DATABASE_0_HOST valueFrom: configMapKeyRef: name: redisinsight-config key: database.host - name: RI_DATABASE_0_PORT valueFrom: configMapKeyRef: name: redisinsight-config key: database.port - name: RI_DATABASE_0_PASSWORD valueFrom: secretKeyRef: name: redis-secret key: password volumes: - name: redisinsight-data persistentVolumeClaim: claimName: redisinsight-pvc --- apiVersion: v1 kind: Service metadata: name: redisinsight namespace: redisinsight spec: type: ClusterIP selector: app: redisinsight ports: - port: 8001 targetPort: 8001 --- apiVersion: traefik.io/v1alpha1 kind: IngressRoute metadata: name: redisinsight-web namespace: redisinsight spec: entryPoints: - websecure routes: - match: Host(`redisinsight.khongisa.co.za`) kind: Rule services: - name: redisinsight port: 8001