Jump to content

Kubernetes: Difference between revisions

6 bytes removed ,  12 November 2022
Line 371: Line 371:
# First setup a deployment of the oauth2, possibly without an upstream.
# First setup a deployment of the oauth2, possibly without an upstream.
# Then you can simply add the following annotations to your ingresses to protect them:
# Then you can simply add the following annotations to your ingresses to protect them:
<syntaxhighlight lang="yaml">
#:<syntaxhighlight lang="yaml">
    nginx.ingress.kubernetes.io/auth-url: "https://oauth2proxy.davidl.me/oauth2/[email protected]"
nginx.ingress.kubernetes.io/auth-url: "https://oauth2proxy.davidl.me/oauth2/[email protected]"
    nginx.ingress.kubernetes.io/auth-signin: "https://oauth2proxy.davidl.me/oauth2/start?rd=$scheme://$host$request_uri"
nginx.ingress.kubernetes.io/auth-signin: "https://oauth2proxy.davidl.me/oauth2/start?rd=$scheme://$host$request_uri"
</syntaxhighlight>
</syntaxhighlight>