kubectl-htpasswd is a nginx-ingress compatible basic-auth secret generator. Although Kubernetes supports basic-auth secrets, these secrets are incompatible with many ingresses such like NGINX ingress. This plugin provides an easy way to create bcrypt hashed secrets on the fly without much hassle.
- bcrypt
$ kubectl htpasswd create $SECRETNAME $USER1=$PASSWORD1 $USER2=$PASSWORD2
$ kubectl htpasswd create $SECRETNAME $USER1=$PASSWORD1 $USER2=$PASSWORD2 -o yaml --dry-run
`