Created
June 30, 2020 22:47
-
-
Save revolunet/547f049e2dabe8851c045bc8bec83fd4 to your computer and use it in GitHub Desktop.
Kubernetes nginx ingress controller to proxy remote basic auth. useful eg for kibana
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 | |
kind: Service | |
metadata: | |
name: external1 | |
spec: | |
type: ExternalName | |
ports: | |
- port: 80 | |
protocol: TCP | |
targetPort: 9243 | |
externalName: some.remote.host | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: ingress | |
annotations: | |
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" # allow http to https proxy | |
kubernetes.io/ingress.class: nginx | |
nginx.ingress.kubernetes.io/upstream-vhost: some.remote.host | |
nginx.ingress.kubernetes.io/configuration-snippet: | | |
proxy_set_header Authorization "Basic cHLobGlpMB1nHxpYw=="; | |
spec: | |
rules: | |
- host: test-ingress.local.dev2 | |
http: | |
paths: | |
- backend: | |
serviceName: external1 | |
servicePort: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment