clientcmd

package
v0.25.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 16 Imported by: 67

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildConfigFromContext

func BuildConfigFromContext(kubeconfigPath, contextName string) (*rest.Config, error)

func BuildConfigFromFlags

func BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*rest.Config, error)

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

func Fix(cfg *rest.Config) *rest.Config

FixAKS uses kube-apiserver FQDN for AKS cluster to workaround https://github.com/Azure/AKS/issues/522

func NamespaceFromContext

func NamespaceFromContext(kubeconfigPath, contextName string) (string, error)

func UseKubeAPIServerFQDNForAKS

func UseKubeAPIServerFQDNForAKS() bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL