Reinstall the Helm chart for Matlab Setup

269

In this article, we will learn that how we can simply relaunch our matlab setup. In the previous post, when we released the resources while uninstalling helm chart we kept the PVC storage. To use the same existing storage, we can simply use the same helm chart name and we can connect to the existing PVC.

Steps to follow: 

Check Kubernetes context

We have to use icekube context otherwise we will install helm chart accidentally on local environment.

Command to switch from existing context to icekube context with ltu-default namespace

kubectl config set-context icekube --namespace=ltu-default
                   OR
kubectl config use-context icekube 
kubectl config set-context --current --namespace=ltu-default

 

Command to switch from existing context to another remote context with namespace
Command to switch from existing context to another remote context with namespace

Command to list the current context used.

kubectl config current-context

 

Kubectl command to check the current context used.
Command to check the current context used.

 

Reinstall Helm Chart

Once you are sure that you have switched to icekube context you can proceed installing helm chart. You need to open Powershell using Administrator rights and switch to the .helm directory of the extracted project folder.

The complete path of the .helm folder is matlab_setup_kubernetes-main->repository->.helm

Switch to .helm folder in the Repository
Switch to .helm folder in the Repository

Note

To use the existing PVC storage use the same name for the helm chart, you have used sumit49670231

Use the below command along with unique name and giving file path to values_icekube.yaml which is located under current directory.

helm install --debug sumit49670231  ./ -f ./values_icekube.yaml

 

Install Helm chart for Matlab using your unique name.
Install Helm chart for Matlab using unique name for your pod

You will get message in the end that matlab is installed.

Matlab is Installed
Matlab is Installed

So, finally you have reinstalled the helm chart with same name, so that you can use your existing PVC storage. In next post we will discuss how to free the PVC resource as well after you uninstall the helm chart.