kubeconfig

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package kubeconfig provides utilities 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 its name. This key is used for all list entries of kind clusters

func Export

func Export(p providers.Provider, name, explicitPath string, external bool) 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 providers.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 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.

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