Skip to content

Commit

Permalink
Solved: config kubernetes error stat /dev/null/.kube/config: not a di…
Browse files Browse the repository at this point in the history
…rectory
  • Loading branch information
mrwesadex-flant committed Jan 17, 2025
1 parent 9867136 commit bdefe3f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ import (
)

func KubernetesDefaultConfigCreate() (*rest.Config, error) {

config, err := rest.InClusterConfig()
if err == nil {
return config, nil
}

clientConfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(
clientcmd.NewDefaultClientConfigLoadingRules(),
&clientcmd.ConfigOverrides{},
Expand Down

0 comments on commit bdefe3f

Please sign in to comment.