Created
April 23, 2020 17:58
-
-
Save nezed/c57eb6fad209df0508821f322b19e9b0 to your computer and use it in GitHub Desktop.
Helm basic auth with Kubernetes Ingress
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
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
annotations: | |
nginx.ingress.kubernetes.io/auth-type: basic | |
nginx.ingress.kubernetes.io/auth-secret: my-basic-auth | |
nginx.ingress.kubernetes.io/auth-realm: "Authentication Required - ok" | |
name: my-ingress | |
spec: | |
rules: | |
- host: my-host | |
http: | |
paths: | |
- path: / | |
backend: | |
serviceName: my-service | |
servicePort: http |
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
apiVersion: v1 | |
data: | |
{{/* htpasswd is available since [email protected] */}} | |
auth: {{ (htpasswd .Values.http_auth.user .Values.http_auth.password) | b64enc | quote }} | |
kind: Secret | |
metadata: | |
name: my-basic-auth | |
type: Opaque |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment