diff --git a/pkg/plugin/kubeconfig.go b/pkg/plugin/kubeconfig.go index afacf0125..585e4be6e 100644 --- a/pkg/plugin/kubeconfig.go +++ b/pkg/plugin/kubeconfig.go @@ -123,6 +123,7 @@ func PersistKubeConfig(_ context.Context, kc []byte) (string, func(context.Conte if err != nil { return "", nil, errors.Wrap(err, "while writing kube config to file") } + defer file.Close() abs, err := filepath.Abs(file.Name()) if err != nil {