kubernetes / ingress-nginx

Ingress NGINX Controller for Kubernetes
https://kubernetes.github.io/ingress-nginx/
Apache License 2.0
17.57k stars 8.27k forks source link

503 Service Temporarily Unavailable nginx: External Oauth Authentication with Github #11838

Open anishagoyal0504 opened 3 months ago

anishagoyal0504 commented 3 months ago

I have followed the exact tutorial for kubernetes dashboard with Github and Oauth2-proxy, all the pods, service and ingress are working fine.

When I try to open the webpage (http://foo.bar.com) I', getting this error "503 Service Temporarily Unavailable nginx"

I have deployed all resources in kubernetes-dashboard namespace.

my yaml configs are:

apiVersion: apps/v1 kind: Deployment metadata: labels: k8s-app: oauth2-proxy name: oauth2-proxy namespace: kubernetes-dashboard spec: replicas: 1 selector: matchLabels: k8s-app: oauth2-proxy template: metadata: labels: k8s-app: oauth2-proxy spec: containers:


apiVersion: v1 kind: Service metadata: labels: k8s-app: oauth2-proxy name: oauth2-proxy namespace: kubernetes-dashboard spec: ports:


apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: oauth2-proxy namespace: kubernetes-dashboard spec: ingressClassName: nginx rules:


apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: nginx.ingress.kubernetes.io/auth-url: "https://$host/oauth2/auth" nginx.ingress.kubernetes.io/auth-signin: "https://$host/oauth2/start?rd=$escaped_request_uri" name: external-auth-oauth2 namespace: kubernetes-dashboard spec: ingressClassName: nginx rules:

Am I missing something here? or something has changed since this blog was created

Please advice

further to above: I have used the given deployment (kubectl create -f https://raw.githubusercontent.com/kubernetes/kops/master/addons/kubernetes-dashboard/v1.10.1.yaml)

I believe it creates kubernetes-dashboard service on port 443 not port 80, however, in the given oauth2-proxy yaml file, it says port 80 in the ingress section.

k8s-ci-robot commented 3 months ago

This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
longwuyuan commented 3 months ago

The information you have provided can not be analyzed.

There are questions asked in a new bug report template so read them and answer them so that readers here get data that can be analyzed.

/remove-kind bug /kind support /triage needs-information

github-actions[bot] commented 2 months ago

This is stale, but we won't close it automatically, just bare in mind the maintainers may be busy with other tasks and will reach your issue ASAP. If you have any question or request to prioritize this, please reach #ingress-nginx-dev on Kubernetes Slack.