Connect a specific pod from the outside world

I have a service for a specific pod of a statefulset: (and probably gonna create similar services for more pods lately)

apiVersion: v1
kind: Service
  name: app-0

  type: LoadBalancer
externalTrafficPolicy: Local
  selector: app-0
  – protocol: TCP
    port: 2000
    targetPort: 2000
nodePort: 32328

  • protocol: TCP
        port: 3000
        targetPort: 3000
    nodePort: 31795

I want to connect to those ports from another app running on a remote computer. I have to supply that app an ip address and port number. However I couldn’t communicate with this service externally, what am I doing wrong?

Go to Source
Author: flowerProgrammer