I have the following .yaml file to install redisgraph in kubernetes.
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: redisinsight-storage-class provisioner: 'kubernetes.io/gce-pd' parameters: type: 'pd-standard' --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: redisinsight-volume-claim spec: storageClassName: redisinsight-storage-class accessModes: - ReadWriteOnce resources: requests: storage: 10Gi --- apiVersion: apps/v1 kind: Deployment metadata: name: redisinsight #deployment name labels: app: redisinsight #deployment label spec: replicas: 1 #a single replica pod 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: initContainers: - name: change-data-dir-ownership image: alpine:3.6 command: - chmod - -R - '777' - /db volumeMounts: - name: db mountPath: /db containers: - name: redisinsight #Container name (DNS_LABEL, unique) image: redislabs/redisinsight #repo/image imagePullPolicy: Always #Always pull image volumeMounts: - name: db #Pod volumes to mount into the container's filesystem. Cannot be updated. mountPath: /db ports: - containerPort: 8001 #exposed conainer port and protocol protocol: TCP volumes: - name: db persistentVolumeClaim: claimName: redisinsight-volume-claim --- apiVersion: v1 kind: Service metadata: name: redisinsight spec: ports: - port: 8001 name: redisinsight type: LoadBalancer selector: app: redisinsight
But the redisinsight pod does not get launched and gives the following error:
INFO 2020-07-03 06:30:08,117 redisinsight_startup Registered SIGTERM handler ERROR 2020-07-03 06:30:08,131 redisinsight_startup Error in main() Traceback (most recent call last): File "./startup.py", line 477, in main ValueError: invalid literal for int() with base 10: 'tcp://10.69.9.111:8001' Traceback (most recent call last): File "./startup.py", line 495, in <module> File "./startup.py", line 477, in main ValueError: invalid literal for int() with base 10: 'tcp://10.69.9.111:8001'
My guess is that the port number is tried to be read as int but it comes as a string with protocol, ip address and port. I could also be wrong. This seems like a code issue. Or if there is any other ENV variable that I should set, I will be happy to add it. The documentation is inadequate in kubernetes related things. Any help ?