Documentation ¶
Index ¶
- func ClientSetFromFile(path string) (*clientset.Clientset, error)
- func CreateBasic(serverURL, clusterName, userName string, caCert []byte) *clientcmdapi.Config
- func CreateWithCerts(serverURL, clusterName, userName string, caCert []byte, clientKey []byte, ...) *clientcmdapi.Config
- func CreateWithToken(serverURL, clusterName, userName string, caCert []byte, token string) *clientcmdapi.Config
- func GetClusterFromKubeConfig(config *clientcmdapi.Config) *clientcmdapi.Cluster
- func ToClientSet(config *clientcmdapi.Config) (*clientset.Clientset, error)
- func WriteToDisk(filename string, kubeconfig *clientcmdapi.Config) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientSetFromFile ¶
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 GetClusterFromKubeConfig ¶
func GetClusterFromKubeConfig(config *clientcmdapi.Config) *clientcmdapi.Cluster
GetClusterFromKubeConfig returns the default Cluster of the specified KubeConfig
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.
Click to show internal directories.
Click to hide internal directories.