Docker Community Forums

Share and learn in the Docker community.

Can't access kubernetes Service from Windows

Windows 10 - Version 10.0.17763.437
Docker Desktop Community Version 2.0.0.3 (31259)

I am trying to expose an application via a Kubenetes service but don’t seem to be able to connect to it. Any attempt to connect via the cluster IP just times out. The underlying application is running ok (connected via port-forward to check). I’m also seeing endpoints correctly mapped to the service.

Is there an issue connecting to the K8s network from inside WIndows or have I mis-configured something ?

The service deployment I’m using is:

apiVersion: v1
kind: Service
metadata:
    name: pan-capture-service
spec:
    selector:
      app.pan/name: captureApp
    ports:
    - protocol: TCP
      port: 8081
      targetPort: 8081

Ok. Worked it out.

Adding type: LoadBalancer to spec: got it to appear on localhost