kubeconfig

package
v1.23.2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 20 Imported by: 87

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDefaultKubeConfigsAndCSRFiles added in v1.19.0

func CreateDefaultKubeConfigsAndCSRFiles(out io.Writer, kubeConfigDir string, kubeadmConfig *kubeadmapi.InitConfiguration) error

CreateDefaultKubeConfigsAndCSRFiles is used in ExternalCA mode to create kubeconfig files and adjacent CSR files.

func CreateJoinControlPlaneKubeConfigFiles added in v1.12.0

func CreateJoinControlPlaneKubeConfigFiles(outDir string, cfg *kubeadmapi.InitConfiguration) error

CreateJoinControlPlaneKubeConfigFiles will create and write to disk the kubeconfig files required by kubeadm join --control-plane workflow, plus the admin kubeconfig file used by the administrator and kubeadm itself; the kubelet.conf file must not be created because it will be created and signed by the kubelet TLS bootstrap process. When not using external CA mode, if a kubeconfig file already exists it is used only if evaluated equal, otherwise an error is returned. For external CA mode, the creation of kubeconfig files is skipped.

func CreateKubeConfigFile added in v1.13.0

func CreateKubeConfigFile(kubeConfigFileName string, outDir string, cfg *kubeadmapi.InitConfiguration) error

CreateKubeConfigFile creates a kubeconfig file. If the kubeconfig file already exists, it is used only if evaluated equal; otherwise an error is returned.

func ValidateKubeconfigsForExternalCA added in v1.13.0

func ValidateKubeconfigsForExternalCA(outDir string, cfg *kubeadmapi.InitConfiguration) error

ValidateKubeconfigsForExternalCA check if the kubeconfig file exist and has the expected CA and server URL using kubeadmapi.InitConfiguration.

func WriteKubeConfigWithClientCert added in v1.8.0

func WriteKubeConfigWithClientCert(out io.Writer, cfg *kubeadmapi.InitConfiguration, clientName string, organizations []string, notAfter *time.Time) error

WriteKubeConfigWithClientCert writes a kubeconfig file - with a client certificate as authentication info - to the given writer.

func WriteKubeConfigWithToken added in v1.8.0

func WriteKubeConfigWithToken(out io.Writer, cfg *kubeadmapi.InitConfiguration, clientName, token string, notAfter *time.Time) error

WriteKubeConfigWithToken writes a kubeconfig file - with a token as client authentication info - to the given writer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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