Home > OS >  Kubernetes containers running, but localhost returns 404 when trying to access the services
Kubernetes containers running, but localhost returns 404 when trying to access the services

Time:03-23

I'm trying to learn to deploy to kubernetes from the microsoft learning page https://docs.microsoft.com/en-us/learn/modules/dotnet-deploy-microservices-kubernetes/4-exercise-deploy-to-kubernetes

after i run the services, it tells me that localhost must now point to my application. but http://localhost returns error 404

'kubectl get pods' returns

NAME                             READY   STATUS    RESTARTS   AGE
pizzabackend-7f55dbc6fc-qm4rg    1/1     Running   0          29m
pizzafrontend-7484c45b97-g4vk4   1/1     Running   0          10m

so i think my pods are running fine.

any idea what I'm missing here? or why localhost cannot access the services?

screenshot of issue

CodePudding user response:

Try using port forward on your frontend app and change the access port from the client to 8080 or something other then 80. i will not be surprised if that port is blocked by windows or that you already run something on that exact port in another application.

  • Related