K8S Ingress
Minikube
Enable nginx ingress controller by running: minikube addons enable ingress
.
Then install the existing ingress: kubectl apply -f pets-ingress.yaml
and verify:
.../devops/k8s/3-ingress» kubectl apply -f app-ingress.yaml
ingress.networking.k8s.io/pets-ingress created
.../devops/k8s/3-ingress» kubectl get ingress
NAME CLASS HOSTS ADDRESS PORTS AGE
pets-ingress nginx pets.local 80 4s
Nginx controller auth
htpasswd -c auth foo
kubectl create secret generic basic-auth --from-file=auth
kubectl get secret basic-auth -o yaml