I intend to access a Redis instance running within GCP by a service running on GKE. Having done the following within service’s deployment yaml, wherein REDISHOST is the configmap set within the cluster, I keep receiving the ECONNREFUSED error.
There are no egress firewall settings within istio/kubernetes which might have prevented this connection from GKE to Redis.
I tried creating a VM and use telnet & redis-cli on it, which worked smoothly.
Seeking further help and guidance.
> apiVersion: apps/v1
> kind: Deployment
> metadata:
> labels:
> app: sockets
> name: sockets
> spec:
> replicas: 2
> selector:
> matchLabels:
> app: sockets
> template:
> metadata:
> labels:
> app: sockets
> spec:
> containers:
> - image: <sockets>
> env:
> - name: REDISHOST
> valueFrom:
> configMapKeyRef:
> name: redishost
> key: REDISHOST
> imagePullPolicy: IfNotPresent
> name: sockets
> ports:
> - containerPort: 3000