Created
May 27, 2020 15:22
-
-
Save guillaumedossantos/073beaa9663f93b6dadb15d8d196c3da to your computer and use it in GitHub Desktop.
SSO for K8S Dashboard with Azure AD - 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------- Dashboard Ingress ------------------- # | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: kubernetes-dashboard | |
namespace: kube-system | |
annotations: | |
nginx.ingress.kubernetes.io/auth-url: "https://{{ kubedash_FQDN }}/oauth2/auth" | |
nginx.ingress.kubernetes.io/auth-signin: "https://{{ kubedash_FQDN }}/oauth2/start?rd=https://$host$request_uri$is_args$args" | |
{% if nginx_ingress_image_version is defined and nginx_ingress_image_version is version('0.20.0', '<=') %} | |
nginx.ingress.kubernetes.io/secure-backends: "true" | |
{% else %} | |
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" | |
{% endif %} | |
nginx.ingress.kubernetes.io/configuration-snippet: | | |
auth_request_set $token $upstream_http_authorization; | |
proxy_set_header Authorization $token; | |
spec: | |
rules: | |
- host: {{ kubedash_FQDN }} | |
http: | |
paths: | |
- backend: | |
serviceName: kubernetes-dashboard | |
servicePort: 443 | |
path: / |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment