I have elasticsearch running on my host machine on port 9200. Now I'm trying to access this from a pod running on a kind
cluster. This is how I have defined my external elasticsearch service.
apiVersion: v1
kind: Service
metadata:
name: elasticlocal
spec:
ports:
- protocol: TCP
port: 9200
targetPort: 9200
---
apiVersion: v1
kind: Endpoints
metadata:
name: elasticlocal
subsets:
- addresses:
- ip: 172.17.0.5
ports:
- port: 9200
---
Now when I ssh into a pod and try curl elasticlocal:9200
I get an error saying
curl: (7) Failed to connect to 10.96.161.128 port 9200 after 0 ms: Connection refused
.
I am not sure if 172.17.0.5
is correct however when I inspect the docker networks on my localhost I see the following
When I inspect the kind bridge I see the following (I am using the chatt
cluster)
I'm sure I'm doing something wrong but not sure what it is