Skip to content

Instantly share code, notes, and snippets.

@nathwill
Last active July 28, 2021 09:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathwill/c16c3944f80b7444f7fc9db5612333d7 to your computer and use it in GitHub Desktop.
Save nathwill/c16c3944f80b7444f7fc9db5612333d7 to your computer and use it in GitHub Desktop.
kubernetes ingress-nginx ingress for redirect/whitelist of access to AWS elasticsearch kibana behind oauth2-proxy
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: kibana-doorman
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/server-snippet: |
location = / { return 308 https://$best_http_host/_plugin/kibana; }
spec:
tls:
- secretName: kibana-doorman-crt
hosts:
- logs.example.com
rules:
- host: logs.example.com
http:
paths:
- path: /(oauth2|ping|_plugin\/kibana|robots\.txt)
backend:
serviceName: kibana-doorman
servicePort: 4180
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment