k8sauth

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package k8sauth has helpers for authenticating to Kubernetes. This makes it easy to get a clientset, namespace information, etc. for both in-cluster and out-of-cluster auth.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clientset

func Clientset(kubeconfig, context string) (*kubernetes.Clientset, string, *rest.Config, error)

Clientset returns a K8S clientset and configured namespace. This will attempt to use in-cluster auth if available if kubeconfig is not explicitly specified. Otherwise, this will fall back to out of cluster auth.

func ClientsetInCluster

func ClientsetInCluster() (*kubernetes.Clientset, string, *rest.Config, error)

ClientsetInCluster returns a K8S clientset and configured namespace for in-cluster usage.

func ClientsetOutOfCluster

func ClientsetOutOfCluster(kubeconfig, context string) (*kubernetes.Clientset, string, *rest.Config, error)

ClientsetOutOfCluster loads a Kubernetes clientset using only a kubeconfig.

Types

This section is empty.

Jump to

Keyboard shortcuts

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