Package apiutil contains utilities for working with raw Kubernetes API machinery, such as creating RESTMappers and raw REST clients, and extracting the GVK of an object.
GVKForObject finds the GroupVersionKind associated with the given object, if there is only a single such GVK.
NewDiscoveryRESTMapper constructs a new RESTMapper based on discovery information fetched by a new client with the given config.
func RESTClientForGVK(gvk schema.GroupVersionKind, baseConfig *rest.Config, codecs serializer.CodecFactory) (rest.Interface, error)
RESTClientForGVK constructs a new rest.Interface capable of accessing the resource associated with the given GroupVersionKind. The REST client will be configured to use the negotiated serializer from baseConfig, if set, otherwise a default serializer will be set.