Error: failed to download "stable/mssql-linux" (hint: running `helm repo update` may help)

4/7/2020

Please see the command below:

helm install --name mymssql stable/mssql-linux --set acceptEula.value=Y --set edition.value=Developer

which I got from here: https://github.com/helm/charts/tree/master/stable/mssql-linux

After just one month it appears the --name is no longer needed so I now have (see here: Helm install unknown flag --name):

helm install mymssql stable/mssql-linux --set acceptEula.value=Y --set edition.value=Developer

The error I see now is:

Error: failed to download "stable/mssql-linux" (hint: running `helm repo update` may help)

What is the problem?

Update

Following on from the answers; the command above now works, however I cannot connect to the database using SQL Studio Manager from my local PC. The additional steps I have followed are:

1) kubectl expose deployment mymssql-mssql-linux --type=NodePort --name=mymssql-mssql-linux-service

2) kubectl get service - the below service is relevant here mymssql-mssql-linux-service NodePort 10.107.98.68 1433:32489/TCP 7s

3) Then try to connect to the database using SQL Studio Manager 2019: Server Name: localhost,32489 Authentication: SQL Server Authentication Login: sa Password: I have tried: b64enc quote and MyStrongPassword1234

I cannot connect using SQL Studio Manager.

-- w0051977
kubernetes
kubernetes-helm

2 Answers

4/7/2020

Check if the stable repo is added or not

helm repo list

If not then add

helm repo add stable https://kubernetes-charts.storage.googleapis.com
helm repo update

And then run below to install mssql-linux

helm install mymssql stable/mssql-linux --set acceptEula.value=Y --set edition.value=Developer
-- Arghya Sadhu
Source: StackOverflow

4/7/2020

Try:

helm repo add stable https://kubernetes-charts.storage.googleapis.com
helm repo update

and then run your helm command.

Explanation: Helm in version 3 does not have any repository added by default (helm v2 had stable repository add by default), so you need to add it manually.

Update:

  • First of all, if you are using helm keep everything in helm values it makes thinks cleaner and easier to find it later rather than mixing kubeclt and helm - I am referring to exposing service via kubeclt.
  • Ad. 1,2. You have to read some docs to understand Kubernetes services.

    • With expose command and type NodePort you are exposing your MySQL server on port 32489 - in your case, on Kubernetes nodes. You can check IP of Kubernetes nodes with kubectl get nodes -owide, so your database is available on :32489. This approach is very tricky, it might work fine for PoC purposes, but this is not a recommended way especially on cloud-hosted Kubernetes. The same result you can achieve appending you helm command with --set service.type=NodePort.
  • Ad. 3 For debugging purposes you can use kubectl port-forward to port forward traffic from container to your local machine. kubectl port-forward deploymeny/mymssql-mssql-linux 1433 should do the trick and you should be able to connect to MySQL on localhost:1433.

-- FL3SH
Source: StackOverflow