Use helm sdk to use helm template command

11/10/2021

We need to switch the following command for code using helm sdk, helm template .

I tried the following and it doesnt works/complie, what am I missing here?

https://helm.sh/docs/helm/helm_template/

https://github.com/helm/helm/blob/main/cmd/helm/template.go

import (
	"helm.sh/helm/v3/cmd/helm"
)




func main(){

	templateCommand, err := helm.NewTemplateCmd(append([]string{chartName}, args...))
	if err != nil {
		return err
	}
}

Helm version 3.7.1

-- JJD
go
kubernetes
kubernetes-helm

0 Answers