How to pass configuration flags to nginx-ingress in minikube?

6/20/2019

To use nginx.ingress.kubernetes.io/ssl-passthrough annotation I need to be starting the controller with the --enable-ssl-passthrough flag.

How do I pass that flag if I start the ingress with minikube addons enable ingress?

I tried minikube addons enable ingress --enable-ssl-passthrough and got Error: unknown flag: --enable-ssl-passthrough

-- Kirill Kliushkin
kubernetes
minikube
nginx-ingress

1 Answer

6/20/2019

I don't think there is an easy way to change it. But you can always manually change the ingress controller deployment object so that it passes the arguments that you need. For example, in this repository someone has the Kubernetes manifests for the minikube ingress addon.

If you take a look, this is where the --enable-ssl-passthrough option is passed to the ingress controller. You just need to update your Deployment the same way.

I believe that minikube installs the ingress controller deployment on the kube-system namespace, so try listing the deployments there using kubectl -n kube-system get deployments. And update the right deployment object using kubectl -n kube-system edit deployments <ingress-deployment-name>, changing ingress-deployment-name with whatever name it's using on your case.

-- Jose Armesto
Source: StackOverflow