0

I was trying to install ingress helm charts but found a couple of tutorials but they just insert the different steps without proper explanation, But I want to know what exactly each step means:

kubectl create namespace ingress-nginx
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm install ingress-nginx ingress-nginx/ingress-nginx -n ingress-nginx

In a simple words and correct me If I am wrong,
kubectl create namespace ingress-nginx -> this creates a namespace called ingress-nginx

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx -> This add a chart repository called ingress-nginx from the URL mentioned (Am I free to name it to something else!?)

helm install ingress-nginx ingress-nginx/ingress-nginx -n ingress-nginx -> install the chart named ingress-nginx (first one) , in the namespace called ingress-nginx (last one), To be honest I can't understand it will, can anyone explains it?

and sometimes I see helm repo update after adding the chart-repo with helm repo add (inginx documentation is doing it) and sometimes not , what is the difference? is there any difference?

1

You explained what each does pretty well! I strongly suggest reading the documentation, especially for the commands, don't rely on tutorials only.helm commands helm repo add => This is what it stands for, it adds a new helm chart repository. helm repo update => Update gets the latest information about charts from the respective chart repositories. When you initially start or want to use a chart you will use add, let us say 6 months have passed, the chart has bugs that are now fixed in the latest version, you then use update to get the latest version. And you can use different names, see example => helm examples

So what you explained yourself is pretty good, really.

  1. You create a Kubernetes namespace.
  2. You add a new repo for nginx.
  3. Then you install that nginx repo in the new namespace you created in point (1). - otherwise, it will probably go in the default namespace. I always specify the namespace btw.

One thing to note, when you add a repo, it gets added locally and from there it gets installed. So when you do installations, helm goes through your local packages that are stored/cached and it installs them where you point them to.

0

In a simple words and correct me If I am wrong, kubectl create namespace ingress-nginx -> this creates a namespace called ingress-nginx

Correct !

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx -> This add a chart repository called ingress-nginx from the URL mentioned (Am I free to name it to something else!?)

Correct too ! Yes, you can name it has you like, it's just the name that you'll use to refer to this repo url (e.g: in a requirement file)

helm install ingress-nginx ingress-nginx/ingress-nginx -n ingress-nginx -> install the chart named ingress-nginx (first one) , in the namespace called ingress-nginx (last one), To be honest I can't understand it will, can anyone explains it?

Here, you tell to Helm "Install from a chart named 'ingress-nginx', from the 'ingress-nginx/ingress-nginx' (repository-name/chart-name get from ArtifactHub.io, the official Helm charts repository where you can find a lot of ready-to-use charts) repository, inside 'ingress-nginx' namespace".

and sometimes I see helm repo update after adding the chart-repo with helm repo add (inginx documentation is doing it) and sometimes not , what is the difference? is there any difference?

After the first "helm install", if you want to update your something like a simple value in your values.yaml file, you need to "helm upgrade" it, but it's only if you want to change the default config.
You can get more informations here : https://helm.sh/docs/helm/helm_upgrade/

Hope it can help :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.