Documentation ¶
Index ¶
- func GetKubeConfigStatus(ip net.IP, filename string) (bool, error)
- func ReadConfigOrNew(filename string) (*api.Config, error)
- func SetupKubeConfig(cfg *KubeConfigSetup) error
- func UpdateKubeconfigIP(ip net.IP, filename string) (bool, error)
- func WriteConfig(config *api.Config, filename string) error
- type KubeConfigSetup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKubeConfigStatus ¶ added in v0.20.0
GetKubeConfigStatus verifys the ip stored in kubeconfig.
func ReadConfigOrNew ¶
ReadConfigOrNew retrieves Kubernetes client configuration from a file. If no files exists, an empty configuration is returned.
func SetupKubeConfig ¶ added in v0.17.0
func SetupKubeConfig(cfg *KubeConfigSetup) error
SetupKubeconfig reads config from disk, adds the minikube settings, and writes it back. activeContext is true when minikube is the CurrentContext If no CurrentContext is set, the given name will be used.
func UpdateKubeconfigIP ¶ added in v0.20.0
UpdateKubeconfigIP overwrites the IP stored in kubeconfig with the provided IP.
Types ¶
type KubeConfigSetup ¶ added in v0.17.0
type KubeConfigSetup struct { // The name of the cluster for this context ClusterName string // ClusterServerAddress is the address of of the kubernetes cluster ClusterServerAddress string // ClientCertificate is the path to a client cert file for TLS. ClientCertificate string // CertificateAuthority is the path to a cert file for the certificate authority. CertificateAuthority string // ClientKey is the path to a client key file for TLS. ClientKey string // Should the current context be kept when setting up this one KeepContext bool // contains filtered or unexported fields }
func (*KubeConfigSetup) GetKubeConfigFile ¶ added in v0.17.0
func (k *KubeConfigSetup) GetKubeConfigFile() string
func (*KubeConfigSetup) SetKubeConfigFile ¶ added in v0.17.0
func (k *KubeConfigSetup) SetKubeConfigFile(kubeConfigFile string)
Click to show internal directories.
Click to hide internal directories.