diff --git a/cmd/tk/main.go b/cmd/tk/main.go index feadb81c..c0128a95 100644 --- a/cmd/tk/main.go +++ b/cmd/tk/main.go @@ -131,6 +131,10 @@ func kubeconfigFlag() { rootCmd.PersistentFlags().StringVarP(&kubeconfig, "kubeconfig", "", "", "absolute path to the kubeconfig file") } + + if len(os.Getenv("KUBECONFIG")) > 0 { + kubeconfig = os.Getenv("KUBECONFIG") + } } func generateDocs() {