How to install kubernetes / ingress-nginx using kubectl ? (not helm)

6/27/2020

I would like to use kubernetes/ingress-nginx using kubectl apply -f when I deploy in AKS (Azure), but I cannot figure out how.

I know that I can do kubectl apply -f https://github.com/kubernetes/ingress-nginx/blob/master/deploy/static/provider/cloud/deploy.yaml

but the problem is that this provides a very non-configurable version with a lot of items on it.

Any idea? I don't want to start to edit and customize deploy.yaml in the current form as it's super ugly. It is an option but anyone has any better idea?

I know that I can use help, and that's a current production version, but for some reason, I need to try to move to kubectl apply -f

Thanks in advance.

-- user3053247
azure-aks
kubectl
kubernetes
kubernetes-ingress
nginx-ingress

2 Answers

6/27/2020

I would suggest using helm3 for installing packages (which allows configuration with maintability as main aim). You can see helm package for nginx-ingress (https://github.com/helm/charts/tree/master/stable/nginx-ingress) and configure the parameters also.

Note there are multiple version of helm for nginx-ingress. You can choose which works for you the best (one if community maintained and other is nginx maintained).

Edit: - helm template can be used to spit out yaml file which can be used with kubectl to apply directly. Moreover helm3 can directly work with kubectl without any server side component.

-- Atul
Source: StackOverflow