k8sclient

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanKubeconfig

func CleanKubeconfig(in []byte) ([]byte, error)

CleanKubeconfig cleans up a serialized kubeconfig and returns it in the same format

func NewClientConfig

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

NewClientConfig creates a Kubernetes client config from raw kube config.

func NewClientFromConfig

func NewClientFromConfig(config *rest.Config) (*kubernetes.Clientset, error)

NewClient creates a new Kubernetes client from config.

func NewClientFromKubeConfig

func NewClientFromKubeConfig(kubeConfig []byte) (*kubernetes.Clientset, error)

NewClientFromKubeConfig creates a new Kubernetes client from raw kube config.

func NewClientFromKubeConfigWithTimeout

func NewClientFromKubeConfigWithTimeout(kubeConfig []byte, timeout time.Duration) (*kubernetes.Clientset, error)

NewClientFromKubeConfig creates a new Kubernetes client from raw kube config.

func NewInClusterClient

func NewInClusterClient() (*kubernetes.Clientset, error)

NewInClusterClient returns a Kubernetes client based on in-cluster configuration.

func NewRawKubeConfigLoader

func NewRawKubeConfigLoader(kubeConfig []byte, overrides *clientcmd.ConfigOverrides) (clientcmd.ClientConfig, error)

Types

type DynamicFileClient

type DynamicFileClient struct {
	// contains filtered or unexported fields
}

DynamicFileClient interacts with a cluster with file manifests.

func NewDynamicFileClient

func NewDynamicFileClient(client client.Client) DynamicFileClient

NewDynamicFileClient returns a new DynamicFileClient.

func (DynamicFileClient) Create

func (c DynamicFileClient) Create(ctx context.Context, file []byte) error

Create iterates a set of YAML documents and calls client.Create on them.

Jump to

Keyboard shortcuts

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