0

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.

FL3SH
  • 2,996
  • 1
  • 17
  • 25
w0051977
  • 15,099
  • 32
  • 152
  • 329

3 Answers3

7

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
  • 41,002
  • 9
  • 78
  • 107
  • Could you have a look at my revision. I am trying to make sure that sql has installed properly - I am new to Kubernetes. – w0051977 Apr 07 '20 at 09:22
  • for the help clarifying things in the comments. +1 – w0051977 Apr 07 '20 at 09:23
  • what is the error you are getting...can you try port forward and connect to it for testing – Arghya Sadhu Apr 07 '20 at 10:26
  • Are you able to take a look at my question here: https://stackoverflow.com/questions/61137552/cannot-create-a-sql-server-2019-pod-but-can-create-an-sql-server-2017-pod-why ? Notice the error: "Error: The evaluation period has expired.". – w0051977 Apr 10 '20 at 10:10
3

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
  • 2,996
  • 1
  • 17
  • 25
  • 1
    Yeah, that appears to of worked - thanks. Could you briefly explain what it is doing for me and future readers? – w0051977 Apr 07 '20 at 08:42
  • I hope this is enough – FL3SH Apr 07 '20 at 08:54
  • Could you have a look at my revision. I am trying to make sure that sql has installed properly - I am new to Kubernetes. +1 for the explanation. – w0051977 Apr 07 '20 at 09:22
  • Are you able to take a look at my question here: https://stackoverflow.com/questions/61137552/cannot-create-a-sql-server-2019-pod-but-can-create-an-sql-server-2017-pod-why ? Notice the error: "Error: The evaluation period has expired.". – w0051977 Apr 10 '20 at 10:10
0

In case if the chart you want to use is not published to hub you can install the package directly using the path to the unpacked chart directory.

For example (works for helm v3.2.4):

git clone https://github.com/helm/charts/
cd helm/charts/stable
helm install --name mymssql ./mssql-linux --set acceptEula.value=Y --set edition.value=Developer
nevosial
  • 1,034
  • 2
  • 13
  • 20