Documentation
¶
Index ¶
- func GetClient(restConfig *rest.Config) (*kubernetes.Clientset, error)
- func GetKubeConfig(configPath ...string) string
- func GetRestConfig(kubeconfig string) (*rest.Config, error)
- type Client
- func (c *Client) GetClientSetWithContext(contextName string) (*kubernetes.Clientset, error)
- func (c *Client) GetDynamicClient() (*dynamic.DynamicClient, error)
- func (c *Client) GetDynamicClientWithContext(contextName string) (*dynamic.DynamicClient, error)
- func (c *Client) GetIstioClient() (*istioVersioned.Clientset, error)
- func (c *Client) GetRuntimeClient(r *runtime.Scheme) (runtimeclient.Client, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClient ¶
func GetClient(restConfig *rest.Config) (*kubernetes.Clientset, error)
k8s clientset
func GetKubeConfig ¶
first use kubeconfig from configPath second use env.KUBECONFIG third use $HOME/.kube/config default return empty string
Types ¶
type Client ¶ added in v0.1.5
type Client struct { // kubeconfig path KubeConfig string // REST config, use for other resources RestConfig *rest.Config // kube clientset KubeClient *kubernetes.Clientset }
func (*Client) GetClientSetWithContext ¶ added in v0.1.5
func (c *Client) GetClientSetWithContext(contextName string) (*kubernetes.Clientset, error)
k8s api client with set-context = contextName configPath equal merged kubeconfigs, example dev, prod, test
func (*Client) GetDynamicClient ¶ added in v0.1.5
func (c *Client) GetDynamicClient() (*dynamic.DynamicClient, error)
get dyn client for use dynamic DynamicClient
func (*Client) GetDynamicClientWithContext ¶ added in v0.1.5
func (c *Client) GetDynamicClientWithContext(contextName string) (*dynamic.DynamicClient, error)
get dynamic client with Context
func (*Client) GetIstioClient ¶ added in v0.1.5
func (c *Client) GetIstioClient() (*istioVersioned.Clientset, error)
get istio client
func (*Client) GetRuntimeClient ¶ added in v0.1.5
get runtime client
Click to show internal directories.
Click to hide internal directories.