nativekubernetes

package
v0.412.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

README

nativekubernetes package

Non object oriented implementation using the official client-go library to interact with kubernetes.

For the object oriented implmenetation see nativekubernetesoo.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientSet

func GetClientSet(ctx context.Context, clusterName string) (*kubernetes.Clientset, error)

Get the kubernetes.Clientset to communicate with the kubernetes cluster.

If in cluster authentication is available (e.g. running in a pod in the cluster) the returned clientset uses this method.

Otherwise a clientset based on ~/.kube/config is returned.

func GetConfig added in v0.341.0

func GetConfig(ctx context.Context, clusterName string) (*rest.Config, error)

Get the rest.Config to communicate with the kubernetes cluster.

If in cluster authentication is available (e.g. running in a pod in the cluster) the returned config uses this method.

Otherwise a config based on ~/.kube/config is returned.

func GetConfigFromKubeconfig added in v0.341.0

func GetConfigFromKubeconfig(ctx context.Context, clusterName string) (*rest.Config, error)

func GetInClusterConfig added in v0.341.0

func GetInClusterConfig(ctx context.Context) (*rest.Config, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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