Docker for windows kubernetes helm - add public repo and get mailhog - kubernetes

I am using Windows 10 with docker for windows.
I have acitve kubernetes.
I've downloaded helm from https://github.com/helm/helm/releases and added files to Windows PATH.
Now i want to execute:
helm install stable/mailhog --generate-name
but i get
Error: failed to download "stable/mailhog" (hint: running 'helm repo update' may help
I am not sure how to add public repo for it.
I tried adding it with:
helm repo add mailhog https://kubernetes-charts-incubator.storage.googleapis.com/
"mailhog" has been added to your repositories
helm repo update
but the output from helm install stable/mailhog --generate-name gives me still the same error.
How can i get stable/mailhog this way?

Using https://kubernetes-charts.storage.googleapis.com as the helm repo works for me:
helm init
helm repo add stable https://kubernetes-charts.storage.googleapis.com
$ helm repo list
NAME URL
stable https://kubernetes-charts.storage.googleapis.com
helm install stable/mailhog --generate-name

Related

How do i update helm repo to the latest version

I am trying to update my helm repo to the latest version using the below command. The repo name is returned from helm repo list. My helm version is v3.3.1
helm repo update <repo name>
but instead i get the below.
Error: "helm repo update" accepts no arguments
Usage: helm repo update [flags]
You need a newer version of Helm; the option you're looking for seems to have been added in Helm 3.7.0. The Helm 3.7.0 release notes include:
helm repo update now accepts an optional repository name
If you can't upgrade to a newer version of Helm, you can still run helm repo update with no additional arguments to update all repositories' data.

How to download chart package from Helm ChartMuseum?

I feel I have overseen something but I'm unable to find the appropriate section on https://github.com/helm/chartmuseum
How can I download helm chart package (.tgz) from Helm ChartMuseum (using curl, wget or any other cli)?
Helm must use that API to download requirements, but somehow I can't find the information in the ChartMuseum readme...
Using helm v3:
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
helm repo update
helm pull stable/chartmuseum --untar # optionally untar
Get it with curl:
curl https://kubernetes-charts.storage.googleapis.com/chartmuseum-2.5.0.tgz --output chartmuseum-2.5.0.tgz
All the packages from stable repo are here:
https://kubernetes-charts.storage.googleapis.com/
The latest version of chartmuseum to date is here:
https://kubernetes-charts.storage.googleapis.com/chartmuseum-2.5.0.tgz
The helm chart of chart museum on GitHub:
https://github.com/helm/charts/tree/master/stable/chartmuseum

Helm v3 cannot find my charts in private repo

I have a private helm repo using apache, after migrating to helm3 I cannot install/search charts anymore.
Using helm v3
helm repo list
NAME URL
mas http://localhost:8080/charts/
helm search repo mas/devops-openshift
No results found
Using helm 2.*
helm search -r mas/devops-openshift
NAME CHART VERSION APP VERSION DESCRIPTION
mas/devops-openshift 7.0.0 Devops (OpenShift)
Same happens when using "helm install" command, it cannot find the charts.
I guess it could be something related to the helm repo index file. Maybe helmv3 is expecting a different structure? But same happen when generating index file from helmv3.
Thanks all for the answers but I've found the issue.
My repository were using development version of the charts so I had something like this 1.0.0-pre.dev (Semantic Versioning 2.0.0).
By default helm 3 does not look at non production charts.
You have to set the flag -devel. something like:
helm search repo mas/devops-openshift --devel
While migrating from helm 2 to helm 3 remove private repo and add it after migration, then run helm repo update to refresh repository file.
If the chart is available locally, run helm repo index <DIR> --url <your_repo_url> to create new index.yaml for this repository.
Running helm env will show you the directory where the repository.yamlis located so check if the file is generated correctly.

Helm V3 - Cannot find the official repo

I have been trying to install nginx ingress using helm version 3
helm install my-ingress stable/nginx-ingress
But Helm doesn't seem to be able to find it's official stable repo. It gives the message:
Error: failed to download "stable/nginx-ingress" (hint: running helm
repo update may help)
I tried helm repo update. But it doesn't help.
I tried listing the repos helm repo list but it is empty.
I tried to add the stable repo:
helm repo add stable https://github.com/helm/charts/tree/master/stable
But it fails with:
Error: looks like "https://github.com/helm/charts/tree/master/stable"
is not a valid chart repository or cannot be reached: failed to fetch
https://github.com/helm/charts/tree/master/stable/index.yaml : 404 Not
Found
The stable repository is hosted on https://kubernetes-charts.storage.googleapis.com/. So, try the following:
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
EDIT 2020-11-16: the above repository seems to have been deprecated. The following should now work instead:
helm repo add stable https://charts.helm.sh/stable
Be aware that Helm v3 does not have the use of Tiller.
1. Install Helm v3:
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh
chmod 700 get_helm.sh
./get_helm.sh
2. Install Ingress-Nginx:
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
helm install my-nginx stable/nginx-ingress --set rbac.create=true
From Helm Blog -
On November 13, 2020 the stable and incubator charts repository will
reach the end of development and become archives. You can find that
many of the charts have moved to other, community managed,
repositories. You can discover these on the Artifact Hub.
The best way to discover a chart by searching the Artifact Hub. And if you select nginx-ingress from ORG Helm, you can see the instruction for adding a repo.
helm repo add nginx-stable https://helm.nginx.com/stable
Below solution worked for me.
# Below command is not working
$ helm repo add stable https://kubernetes-charts.storage.googleapis.com/
Error: repo "https://kubernetes-charts.storage.googleapis.com/" is no longer available; try "https://charts.helm.sh/stable" instead
#Try this one, it's wokring.
$ helm repo add stable https://charts.helm.sh/stable
"stable" has been added to your repositories
The stable repositories are in helm hub https://hub.helm.sh/charts
Install the nginx chart for nginx ingress
helm install bitnami/nginx --version 6.2.0
I solved that problem by putting in this line:
helm repo add stable https://charts.jetstack.io

Add Helm Hub as a remote repository on Artifactory

I have been serving Helm Stable as a remote repository in Artifactory for a few months now with no issue, however one of the charts I use has recently moved on to Helm hub. Try as I may, I cannot seem to get Artifactory to recognise this as a remote repo.I have tried adding both https://hub.helm.sh/ and https://charts.jetstack.io (The chart in question is Jetstack's cert-manager) to no avail. It just shows up as empty in Artifactory.
Does anyone have any experience getting Artifactory remote repos working with Helm Hub?
In Artifactory, to create a remote Helm repository for https://charts.jetstack.io content, "Bypass HEAD Requests" in the advanced settings must be enabled. This is because Artifactory first makes a HEAD request for /index.yaml, to which charts.jetstack.io responds with a 404:
$ curl -siXHEAD https://charts.jetstack.io/index.yaml
HTTP/1.1 404 Not Found
Server: nginx/1.15.6
...
You need to add jetstack repo with below command.
helm repo add jetstack https://charts.jetstack.io
if this helm repo is already added, we can update with
helm update
then if you run helm search jetstack you'll find your chart as below:
NAME CHART VERSION APP VERSION DESCRIPTION
jetstack/cert-manager v0.7.0 v0.7.0 A Helm chart for cert-manager
jetstack/tor-proxy 0.1.1 A Helm chart for Kubernetes
Note
For successful deployment, you should install CRDs before helm install
kubectl apply \
-f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.7/deploy/manifests/00-crds.yaml
If you're installing helm chart in some XX namespace which is already existed, you should label this XX namespace with certmanager.k8s.io/disable-validation="true"
kubectl label namespace XX certmanager.k8s.io/disable-validation="true"
Last
to install run below command
helm install --name my-release --namespace XX jetstack/cert-manager