helm-drift icon indicating copy to clipboard operation
helm-drift copied to clipboard

Getting "drift cannot run with multiple kubeconfig files" error even though only one kubeconfig is provided.

Open Spitfire1900 opened this issue 8 months ago • 2 comments

export KUBECONFIG=/c/Users/XXXXX/.kube/my_vk8s.yaml
$ helm drift all --log-level debug
{"level":"info","msg":"since drift uses kubectl underneath with arg '--kubeconfig' drift cannot run with multiple kubeconfig files set under environment var 'KUBECONFIG', like mentioned in below document","time":"2025-06-20T13:04:36-04:00"}
https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/#append-home-kube-config-to-your-kubeconfig-environment-variable
2025/06/20 13:04:36 cmd.go:22: validation failed, please address the prerequisite errors to identify drifts
Error: plugin "drift" exited with error

There is only 1 cluster defined in the kubeconfig file.

Spitfire1900 avatar Jun 20 '25 17:06 Spitfire1900

It shouldn’t, as I use the plugin the same way. Could you please check if it’s picking up the kubeconfig from somewhere else? (The path might be getting overridden.)

nikhilsbhat avatar Sep 03 '25 05:09 nikhilsbhat

@nikhilsbhat That's tough when --log-level debug does not print the KUBECONFIG as seen by the plugin.

Spitfire1900 avatar Sep 12 '25 13:09 Spitfire1900