In this article, we will learn how we can simply relaunch our Matlab setup. In the previous post, when we released the resources while uninstalling the 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.
Table of Contents
Steps to follow:
Check Kubernetes context
We have to use icekube context otherwise we will install the helm chart accidentally on the 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 list the current context used.
kubectl config current-context
Reinstall Helm Chart
Once you are sure that you have switched to icekube context you can proceed to install helm chart. You need to open bash shell 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
Note
To use the existing PVC storage use the same name for the helm chart, you have used sumit36718160
Use the below command along with the unique name and give file path to values_icekube.yaml which is located under the current directory.
helm install --debug sumit36718160 ./ -f ./values_icekube.yaml
You will get a message in the end that Matlab is installed.
So, finally, you have reinstalled the helm chart with the same name so that you can use your existing PVC storage. In the next post we will discuss how to free the PVC resource as well after you uninstall the helm chart.