Documentation ¶
Index ¶
- func BuildConfigFromContext(kubeconfigPath, contextName string) (*rest.Config, error)
- func BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*rest.Config, error)
- func BuildConfigFromKubeconfigGetter(masterUrl string, kubeconfigGetter clientcmd.KubeconfigGetter) (*rest.Config, error)
- func ClientFromContext(kubeconfigPath, contextName string) (kubernetes.Interface, error)
- func Fix(cfg *rest.Config) *rest.Config
- func GenerateKubeConfiguration(cfg *rest.Config, namespace string) ([]byte, error)
- func NamespaceFromContext(kubeconfigPath, contextName string) (string, error)
- func NewClientGetter(config *clientcmdapi.Config) genericclioptions.RESTClientGetter
- func NewClientGetterFromFlags(fs *pflag.FlagSet) genericclioptions.RESTClientGetter
- func UseKubeAPIServerFQDNForAKS() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildConfigFromContext ¶
func BuildConfigFromFlags ¶
BuildConfigFromFlags is a helper function that builds configs from a master url or a kubeconfig filepath. These are passed in as command line flags for cluster components. Warnings should reflect this usage. If neither masterUrl or kubeconfigPath are passed in we fallback to inClusterConfig. If inClusterConfig fails, we fallback to the default config.
func BuildConfigFromKubeconfigGetter ¶
func BuildConfigFromKubeconfigGetter(masterUrl string, kubeconfigGetter clientcmd.KubeconfigGetter) (*rest.Config, error)
BuildConfigFromKubeconfigGetter is a helper function that builds configs from a master url and a kubeconfigGetter.
func ClientFromContext ¶
func ClientFromContext(kubeconfigPath, contextName string) (kubernetes.Interface, error)
func Fix ¶
FixAKS uses kube-apiserver FQDN for AKS cluster to workaround https://github.com/Azure/AKS/issues/522
func GenerateKubeConfiguration ¶ added in v0.25.28
https://github.com/kubernetes/client-go/issues/711#issuecomment-730112049
func NamespaceFromContext ¶
func NewClientGetter ¶
func NewClientGetter(config *clientcmdapi.Config) genericclioptions.RESTClientGetter
func NewClientGetterFromFlags ¶
func NewClientGetterFromFlags(fs *pflag.FlagSet) genericclioptions.RESTClientGetter
func UseKubeAPIServerFQDNForAKS ¶
func UseKubeAPIServerFQDNForAKS() bool
Types ¶
This section is empty.