Search code examples
azure-pipelines-release-pipelinedeiskubernetes-helm

Helm command with kubeconfig inline


I am trying to execute helm commands on VSTS release definition using Run command VSTS extension but the problem is it is not able to find the kubeconfig file on the custom build agent i have configured. I think this is coz the build steps defined run in a separate process. When i run

kubectl config view

It gives me an empty config file. Just wanted to know if i can provide the kubeconfig file inline when m executing helm commands something like

helm init --kubeconfig=kubeconfigpath

Or is there any way i can set the kubeconfig file before running the helm commands in vsts release process?

Appreciate any help. Thanks.


Solution

  • Try to specify kubeconfig file through kubectl command.

    kubectl config SUBCOMMAND
    

    Options

    -h, --help=false: help for config
          --kubeconfig="": use a particular kubeconfig file
    

    On the other hand, you can try to change build agent account (e.g. your account) and check whether it can find the kubeconfig file (permission issue)