kubeconfig

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildKubeConfigForUser

func BuildKubeConfigForUser(cms []*ConfigMeta) ([]byte, error)

BuildKubeConfigForUser build kubeConfig for specified user, aggregate if there are clusters more than one. Only token way support.

func BuildKubeConfigFromRestConfig

func BuildKubeConfigFromRestConfig(config *rest.Config) ([]byte, error)

BuildKubeConfigFromRestConfig build kubeConfig from config use cert way

func LoadKubeConfigFromBytes

func LoadKubeConfigFromBytes(kubeConfig []byte) (*rest.Config, error)

LoadKubeConfigFromBytes load kubeConfig form raw config

func LoadKubeConfigFromFlags added in v1.2.0

func LoadKubeConfigFromFlags(kubeconfigPath string) ([]byte, error)

Types

type ConfigMeta

type ConfigMeta struct {
	Config  *rest.Config
	Cluster string
	User    string
	Token   string
}

ConfigMeta is meta of kubeConfig

Jump to

Keyboard shortcuts

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