Hi,
I v created a K8s External Service to connect to Aerospike Cluster.
Since in K8s External Service u cannot specify a port and External Service essentially creates a CNAME record. nslookup from a pod resolves the cname to ip address correctly.
But It turns out the goclient Aerospike Client creation fails by Timeout.
Interstingly if I use the URL without creating K8s external service (or use the URL directly) Client is created successfully.
What could be going on here?
thanks
So Aerospike is the external service on port 3000 but you cannot get your internal client pods to talk to Aerospike right?
For the moment can you try creating a Service with the EndPoints and see if this works so something like the following where 35.36.37.38 is the hosted address of Aerospike
kind: Service
apiVersion: v1
metadata:
name: aerospike-ext
spec:
ports:
- port: 3000
targetPort: 3000
---
kind: Endpoints
apiVersion: v1
metadata:
name: aerospike-ext
subsets:
- addresses:
- ip: 35.36.37.38
ports:
- port: 3000
You could then also try using the following asadm client to connect to it in your k8s cluster to confirm all working:
kubectl run -it --rm --restart=Never aerospike-tool -n aerospike --image=aerospike/aerospike-tools:latest -- asadm -h aerospike-ext -U admin -P admin```
Thanks @naresh.maharaj It all worked out, it was a dns-ip misconfiguration in aws.
the original k8s external service works well
Great stuff - nice to have things resolved