Does a pod need special permission to access an external service. I have an external service defined, and when I ssh into the pod and do a simple curl against the external service I get an error message saying access Denied.
This is how I define the external service (elastic search database running on my host machine)
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.1
ports:
- port: 9200
---
Now when I ssh into the pod and run curl http://elasticlocal:9200
I get an access denied error. I am running a k8s cluster on Kind
. From what I know 172.17.0.1
exposes localhost on kind. I initially though this is an RBAC issue, but now I am not sure.