k8sclient

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: LGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig

func GetConfig(kubeconfigPath string) (*rest.Config, error)

func GetConfigWithContext

func GetConfigWithContext(kubeconfigPath, kubeContext string) (*rest.Config, error)

GetConfig returns kubernetes config based on the current environment. If fpath is provided, loads configuration from that file. Otherwise, GetConfig uses default strategy to load configuration from $KUBECONFIG, .kube/config, or just returns in-cluster config.

func GetRawConfig

func GetRawConfig(kubeconfigPath, kubeContext string) (api.Config, error)

GetRawConfig creates a raw clientcmd api config

func GetScheme

func GetScheme() *runtime.Scheme

GetScheme gets an initialized runtime.Scheme with k8s core added by default

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.Interface, error)

NewClient creates a new Kubernetes client from config.

Types

This section is empty.

Jump to

Keyboard shortcuts

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