How to solve error 503 in Kubernetes NGINX Ingress

Solution 1:

I've reproduced this setup and encountered the same issue as described in the question:

  • 503 Service Temporarily Unavailable Error

Focusing specifically on this setup, to fix above error you will need to modify the part of your Ingress manifest:

  • from:
                name: kubernetes-dashboard
                port:
                  number: 433
  • to:
                name: kubernetes-dashboard
                port:
                  number: 443 # <-- HERE!

You've encountered the 503 error as nginx was sending a request to a port that was not hosting the dashboard (433 -> 443).

After that change, I was fortunate enough to see the Dashboard login page.

I'd also recommend you following a guide to create a user that could connect to the dashboard with it's bearer token:

  • Github.com: Kubernetes: Dashboard: Docs: User: Access control: Creating sample user

Additional resources:

  • Serverfault.com: Questions: How to properly configure access to kubernees dashboard behind nginx ingress