kubeconfig

package
v1.16.5-beta.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: Apache-2.0 Imports: 6 Imported by: 282

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientSetFromFile

func ClientSetFromFile(path string) (*clientset.Clientset, error)

ClientSetFromFile returns a ready-to-use client from a kubeconfig file

func CreateBasic

func CreateBasic(serverURL, clusterName, userName string, caCert []byte) *clientcmdapi.Config

CreateBasic creates a basic, general KubeConfig object that then can be extended

func CreateWithCerts

func CreateWithCerts(serverURL, clusterName, userName string, caCert []byte, clientKey []byte, clientCert []byte) *clientcmdapi.Config

CreateWithCerts creates a KubeConfig object with access to the API server with client certificates

func CreateWithToken

func CreateWithToken(serverURL, clusterName, userName string, caCert []byte, token string) *clientcmdapi.Config

CreateWithToken creates a KubeConfig object with access to the API server with a token

func EnsureAuthenticationInfoAreEmbedded added in v1.14.6

func EnsureAuthenticationInfoAreEmbedded(config *clientcmdapi.Config) error

EnsureAuthenticationInfoAreEmbedded check if some authentication info are provided as external key/certificate files, and eventually embeds such files into the kubeconfig file

func EnsureCertificateAuthorityIsEmbedded added in v1.16.0

func EnsureCertificateAuthorityIsEmbedded(cluster *clientcmdapi.Cluster) error

EnsureCertificateAuthorityIsEmbedded check if the certificate authority is provided as an external file and eventually embeds it into the kubeconfig

func GetClusterFromKubeConfig

func GetClusterFromKubeConfig(config *clientcmdapi.Config) *clientcmdapi.Cluster

GetClusterFromKubeConfig returns the default Cluster of the specified KubeConfig

func HasAuthenticationCredentials added in v1.14.6

func HasAuthenticationCredentials(config *clientcmdapi.Config) bool

HasAuthenticationCredentials returns true if the current user has valid authentication credentials for token authentication, basic authentication or X509 authentication

func ToClientSet added in v1.9.0

func ToClientSet(config *clientcmdapi.Config) (*clientset.Clientset, error)

ToClientSet converts a KubeConfig object to a client

func WriteToDisk

func WriteToDisk(filename string, kubeconfig *clientcmdapi.Config) error

WriteToDisk writes a KubeConfig object down to disk with mode 0600

Types

This section is empty.

Jump to

Keyboard shortcuts

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