Kubernetes Service Port-Forwarded Locally is giving Connection Refused Kubernetes Service Port-Forwarded Locally is giving Connection Refused kubernetes kubernetes

Kubernetes Service Port-Forwarded Locally is giving Connection Refused


It sounds like you are deploying this Spring app to a Kubernetes cluster. When the Spring app deploys, it will run inside a container, and localhost:3000 is the port 3000 of the pod the app is running in, it is not the port 3000 of the host. If you cannot access this external service using something like an ingress, maybe you can try running a port forward in a separate container deployed in the same pod as your Spring app.