INNER CODE UNIT · Go
NewInstallKubeTunnelCmd
we-dcode/kubetunnel · cmd/cli/kubetunnel.go:85
func NewInstallKubeTunnelCmd() *cobra.Command {
var kubeConfig, namespace, kubetunnelVersion string
svcCmd := &cobra.Command{
Use: "install",
Short: "Install kubetunnel operator to k8s cluster.",
Example: fmt.Sprintf(" %s install --help\n", constants.KubetunnelSlug) +
fmt.Sprintf(" %s install\n", constants.KubetunnelSlug) +
fmt.Sprintf(" %s install -c kubeconfig/path\n", constants.KubetunnelSlug) +
fmt.Sprintf(" %s install -c kubeconfig/path --operator-version %s\n", constants.KubetunnelSlug, OperatorVersion),
// TODO: Consider change to RunE and modify all panic to return error
Run: func(cmd *cobra.Command, args []string) {
kubeTunnel := pkg.MustNewKubeTunnel(kubeConfig, namespace, false)
kubeTunnel.Install(kubetunnelVersion)