connect from helm to kubernetes cluster

Viewed 5558

I have an application that is deployed on kubernetes cluster. Accessing this application using rancher namespace. By specifying this namespace I am getting "get pods", and all information. Now, this application I want to control from the helm. what do I need to do? I have installed helm where my kubectl installation is there.

1 Answers

If you want to "control" applications on Kubernetes cluster with Helm, you should start with helm charts. You can create some if one is not already available. Once you have chart(s), you can target the Kubernetes cluster with the cluster's KUBECONFIG file.

If I had a Helm chart like my-test-app and a Kubernetes cluster called my-dev-cluster.

With Helm I can:

  • deploy - install

    helm install test1 my-test-app/ --kubeconfig ~/.kubeconfigs/my-dev-cluster.kubeconfig
    
  • update - upgrade

    helm upgrade test1 my-test-app/ --kubeconfig ~/.kubeconfigs/my-dev-cluster.kubeconfig
    
  • remove - uninstall

    helm uninstall test1 my-test-app/ --kubeconfig ~/.kubeconfigs/my-dev-cluster.kubeconfig
    

Where my-dev-cluster.kubeconfig is the kubeconfig file for my cluster in ~/.kubeconfigs directory. Or you can set the path using KUBECONFIG environment variable.

Related