diff --git a/pkg/backup.go b/pkg/backup.go index 431ab0f35..c00a8c088 100644 --- a/pkg/backup.go +++ b/pkg/backup.go @@ -66,6 +66,8 @@ func NewCmdBackup() *cobra.Command { if err != nil { return err } + opt.config = config + opt.kubeClient, err = kubernetes.NewForConfig(config) if err != nil { return err diff --git a/pkg/restore.go b/pkg/restore.go index dccb96889..a14889582 100644 --- a/pkg/restore.go +++ b/pkg/restore.go @@ -63,6 +63,8 @@ func NewCmdRestore() *cobra.Command { if err != nil { return err } + opt.config = config + opt.kubeClient, err = kubernetes.NewForConfig(config) if err != nil { return err