clientcmd

package
v0.29.13 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 18 Imported by: 63

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 BuildKubeConfigBytes added in v0.25.33

func BuildKubeConfigBytes(cfg *rest.Config, namespace string) ([]byte, error)

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