Skip to content

Instantly share code, notes, and snippets.

@viveksinghggits
Created November 23, 2019 19:47
Show Gist options
  • Save viveksinghggits/ef6a2abd2002b863400b2f7d7fae7c93 to your computer and use it in GitHub Desktop.
Save viveksinghggits/ef6a2abd2002b863400b2f7d7fae7c93 to your computer and use it in GitHub Desktop.
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
# name of this ingress rule
name: es-ingress
annotations:
# type of authentiation
nginx.ingress.kubernetes.io/auth-type: basic
# secret reference that contins the credential detals
nginx.ingress.kubernetes.io/auth-secret: basic-auth
nginx.ingress.kubernetes.io/rewrite-target: "/"
spec:
rules:
# specify the protocal, this rule should be applied for
- http:
paths:
# specify the resource path to which this rule should be applied
- path: /secured-es
# specify the service, the request should be forwarded to
backend:
serviceName: elasticsearch
servicePort: 9200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment