kubeconfig

package
v0.0.0-...-8ce0486 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Overview

Package kubeconfig provides utilites kind uses internally to manage kind cluster kubeconfigs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextForCluster

func ContextForCluster(kindClusterName string) string

ContextForCluster returns the context name for a kind cluster based on it's name. This key is used for all list entries of kind clusters

func Export

func Export(p *cluster.Provider, name, explicitPath string) error

Export exports the kubeconfig given the cluster context and a path to write it to This will always be an external kubeconfig

func Get

func Get(p *cluster.Provider, name string, external bool) (string, error)

Get returns the kubeconfig for the cluster external controls if the internal IP address is used or the host endpoint

func GetAPIServerEndpoint

func GetAPIServerEndpoint(p *cluster.Provider, cluster string) (string, error)

func Remove

func Remove(clusterName, explicitPath string) error

Remove removes clusterName from the kubeconfig paths detected based on either explicitPath being set or $KUBECONFIG or $HOME/.kube/config, following the rules set by kubectl clusterName must identify a kind cluster.

func Save

func Save(p *cluster.Provider, name, explicitPath string, updateKubeContext bool) error

Save exports the kubeconfig given the cluster context and a path to write it to, providing the option of updating the kubeconfig's current context

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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