diff --git a/cmd/create.go b/cmd/create.go index cfbfb655..799d300c 100755 --- a/cmd/create.go +++ b/cmd/create.go @@ -17,7 +17,7 @@ var ( ) func createCommand(cmd *cobra.Command, args []string) { - k := k8s.New("") + k := k8s.New(cfg.kubeconfig) ca := k.GetCaFromSecret(cfg.secretName, cfg.namespace) if ca == nil { log.Info("creating new secret") diff --git a/cmd/patch.go b/cmd/patch.go index ceddc882..af682165 100755 --- a/cmd/patch.go +++ b/cmd/patch.go @@ -38,7 +38,7 @@ func prePatchCommand(cmd *cobra.Command, args []string) { } func patchCommand(_ *cobra.Command, _ []string) { - k := k8s.New("") + k := k8s.New(cfg.kubeconfig) ca := k.GetCaFromSecret(cfg.secretName, cfg.namespace) if ca == nil {