Documentation ¶
Overview ¶
Package client provides kubernetes client implementations.
Index ¶
- func Delete(restClient rest.Interface, group, version, namespace, resource, name string) error
- func Get[T any](restClient rest.Interface, group, version, namespace, resource, name string) (T, error)
- func GetClientForInCluster() (rest.Interface, error)
- func GetClientUsingConfig(config *rest.Config) (rest.Interface, error)
- func Post(restClient rest.Interface, resource string, object runtime.Object) error
- func Put(restClient rest.Interface, resource string, object runtime.Object) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
Delete is to delete a kubernetes resource.
ex) err := client.Delete(restClient, "", "v1", namespace, "configmaps", name)
func Get ¶
func Get[T any](restClient rest.Interface, group, version, namespace, resource, name string) (T, error)
Get is get kubernetes resource.
ex) configMap, err := client.Get[coreV1.ConfigMap](restClient, "", "v1", namespace, "configmaps", name)
func GetClientForInCluster ¶
GetClientForInCluster is get a client that runs within the pod.
ex) restClient, err := client.GetClientForInCluster()
func GetClientUsingConfig ¶
GetClientUsingConfig is get the client running outside the pod.
ex) restClient, err := client.GetClientUsingConfig(config)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.