Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 635 Bytes

ingress-with-password.md

File metadata and controls

23 lines (15 loc) · 635 Bytes

Setup ingress with password.

  • Make sure you have following package installed.

yum -y install httpd-tools

  • Create an auth file with username and password

htpasswd -b -c auth promadmin Promadmin@12345

  • Create the secret for credentials

kubectl create secret generic basic-auth --from-file=auth

  • Add following content in annotations of prometheus ingress
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/auth-type: basic
    nginx.ingress.kubernetes.io/auth-secret: basic-auth
    nginx.ingress.kubernetes.io/auth-realm: "Prometheus Authentication Required"