Documentation ¶
Index ¶
- func Clientset(kubeconfig string) (*kubernetes.Clientset, error)
- func ClientsetOrDie(kubeconfig string) *kubernetes.Clientset
- func DiscoveryClient(kubeconfig string) (*discovery.DiscoveryClient, error)
- func DiscoveryClientOrDie(kubeconfig string) *discovery.DiscoveryClient
- func DynamicClient(kubeconfig string) (dynamic.Interface, error)
- func DynamicClientOrDie(kubeconfig string) dynamic.Interface
- func RESTClient(kubeconfig string) (*rest.RESTClient, error)
- func RESTClientOrDie(kubeconfig string) *rest.RESTClient
- func RESTConfig(kubeconfig string) (*rest.Config, error)
- func RESTConfigOrDie(kubeconfig string) *rest.Config
- func RawConfig(kubeconfig string) (clientcmdapi.Config, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clientset ¶
func Clientset(kubeconfig string) (*kubernetes.Clientset, error)
Clientset creates a *kubernetes.Clientset for the given kubeconfig.
func ClientsetOrDie ¶
func ClientsetOrDie(kubeconfig string) *kubernetes.Clientset
ClientsetOrDie creates a *kubernetes.Clientset for the given kubeconfig. panic if there is any error occurs.
func DiscoveryClient ¶
func DiscoveryClient(kubeconfig string) (*discovery.DiscoveryClient, error)
DiscoveryClient creates a *discovery.DiscoveryClient for the given kubeconfig.
func DiscoveryClientOrDie ¶
func DiscoveryClientOrDie(kubeconfig string) *discovery.DiscoveryClient
DiscoveryClientOrDie creates a *discovery.DiscoveryClient for the given kubeconfig. panic if there is any error occurs.
func DynamicClient ¶
DynamicClient creates a dynamic.Interface for the given kubeconfig.
func DynamicClientOrDie ¶
DynamicClient creates a dynamic.Interface for the given kubeconfig. panic if there is any error occurs.
func RESTClient ¶
func RESTClient(kubeconfig string) (*rest.RESTClient, error)
RESTClient creates a *rest.RESTClient for the given kubeconfig.
func RESTClientOrDie ¶
func RESTClientOrDie(kubeconfig string) *rest.RESTClient
RESTClientOrDie creates a *rest.RESTClient for the given kubeconfig. panic if there is any error occurs.
func RESTConfig ¶
RESTConfig creates a *rest.Config for the given kubeconfig. create rest config, and config precedence. * kubeconfig variable passed. * KUBECONFIG environment variable pointing at a file. * $HOME/.kube/config if exists. * In-cluster config if running in cluster.
func RESTConfigOrDie ¶
RESTConfigOrDie creates a *rest.Config for the given kubeconfig. panic if there is any error occurs.
func RawConfig ¶ added in v0.11.6
func RawConfig(kubeconfig string) (clientcmdapi.Config, error)
RawConfig holds the information needed to build connect to remote kubernetes clusters as a given user
ref: https://stackoverflow.com/questions/70885022/how-to-get-current-k8s-context-name-using-client-go
Types ¶
This section is empty.