1
0
mirror of https://github.com/cnrancher/kube-explorer.git synced 2025-05-01 20:53:24 +00:00
kube-explorer/deploy/kubectl/nginx-auth
2023-04-10 17:18:22 +08:00
..
ingress.yaml.tpl [CI SKIP] Use ingress v1 for nginx-ingress basic auth demo 2023-04-10 17:18:22 +08:00
README.md [CI SKIP] Use ingress v1 for nginx-ingress basic auth demo 2023-04-10 17:18:22 +08:00
secret.yaml Add basic-auth wati in ingress-nginx class 2021-04-14 20:30:05 +08:00

Ingress-Nginx Basic Auth

This can be used in the cluster which uses the nginx-ingress.

We use basic-auth to control the access of kube-explorer. The auth token is stored in the secret.

The default user is niusmallnan, and password is dagedddd. You can replace to another value with htpasswd tool.

htpasswd -nb username password | base64

To install this mode, just run this script:

kubectl create -f ./secret.yaml
export MY_IP=$(curl -sL ipinfo.io/ip)
envsubst < ./ingress.yaml.tpl | kubectl create -f -

For more infos: https://kubernetes.github.io/ingress-nginx/examples/auth/basic/