top

Package clientcmd provides one stop shopping for building a working client from a fixed config, from a .kubeconfig file, from command line flags, or from any merged combination.

Sample usage from merged .kubeconfig files (local directory, home directory)

loadingRules := clientcmd.NewKubeConfigLoadingRules()
// if you want to change the loading rules (which files in which order), you can do so here

configOverrides := &clientcmd.ConfigOverrides{}
// if you want to change override values or bind them to flags, there are methods to help you

kubeConfig := clientcmd.NewNonInteractiveDeferredLoadingKubeConfig(loadingRules, configOverrides)
kubeConfig.Client()

Imports 11 package(s)

  1. k8s.io/kubernetes/pkg/clientauth
  2. github.com/imdario/mergo
  3. github.com/ghodss/yaml
  4. k8s.io/kubernetes/pkg/util/errors
  5. github.com/golang/glog
  6. k8s.io/kubernetes/pkg/util
  7. k8s.io/kubernetes/pkg/client
  8. k8s.io/kubernetes/pkg/client/clientcmd/api
  9. k8s.io/kubernetes/pkg/client/clientcmd/api/latest
  10. k8s.io/kubernetes/pkg/api
  11. github.com/spf13/pflag

Test imports 1 package(s)

  1. k8s.io/kubernetes/pkg/api/latest