import ( "k8s.io/client-go/1.4/pkg/runtime/schema" "k8s.io/client-go/1.4/pkg/runtime" "k8s.io/client-go/1.4/pkg/apis/extensions/v1beta1" ) // Add the CustomResourceDefinition type to the Kubernetes API. v1beta1.AddToScheme(scheme) // Define a CustomResource type. type Foo struct { runtime.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec FooSpec `json:"spec"` Status FooStatus `json:"status,omitempty"` } // Add the Foo type to the Kubernetes API. scheme.AddKnownTypes(schema.GroupVersion{Group: "example.com", Version: "v1beta1"}, &Foo{}, &FooList{})In this example, we're using AddToScheme to add the CustomResourceDefinition type to the Kubernetes API. We then define a custom resource type called Foo and use AddKnownTypes to add it to the Kubernetes API. This way, we can interact with our custom resources just like we would with any other Kubernetes resource. The package library for k8s.io.client-go.1.4.pkg.runtime is Kubernetes client-go, which is a set of Go libraries that provide access to the Kubernetes API from Go code.