README
client-go
Go clients for talking to a kubernetes cluster.
What's included
- The
kubernetes
package contains the clientset to access Kubernetes API. - The
discovery
package is used to discover APIs supported by a Kubernetes API server. - The
dynamic
package contains a dynamic client that can perform generic operations on arbitrary Kubernetes API objects. - The
transport
package is used to set up auth and start a connection. - The
tools/cache
package is useful for writing controllers.
Releases
Each top-level folder (e.g., 1.4) contains a release of clients and their dependencies.
client-go has the same release cycle as the Kubernetes main repository. For example, in the 1.4 release cycle, the contents in 1.4/
folder are subjected to changes. Once 1.4 is released, new changes will go into the 1.5/
folder. We will make great efforts to not change the public interface of a version of the client once that version has been released. We may change the interface between versions. Old versions of the client will be retained for two release cycles.
How to get it
You can go get
to get a release of client-go, e.g., go get k8s.io/client-go/1.4/...
or go get k8s.io/client-go/1.4/kubernetes
.
How to use it
If your application runs in a Pod in the cluster, please refer to the in-cluster example, otherwise please refer to the out-of-cluster example.
Dependency management
If your application depends on a package that client-go depends on, and you let the Go compiler find the dependency in GOPATH
, you will end up with duplicated dependencies: one copy from the GOPATH
, and one from the vendor folder of client-go. This will cause unexpected runtime error like flag redefinition, since the go compiler ends up importing both packages separately, even if they are exactly the same thing. If this happens, you can either
- run
godep restore
(godep) in the client-go/1.4 folder, then remove the vendor folder of client-go. Then the packages in your GOPATH will be the only copy - or run
godep save
in your application folder to flatten all dependencies.
Reporting bugs
Please report bugs to the main Kubernetes repository.
Contributing code
Please send pull requests against the client packages in the Kubernetes main repository, and run the /staging/src/k8s.io/client-go/copy.sh
script to update the staging area in the main repository. Changes in the staging area will be published to this repository every day.
Documentation
There is no documentation for this package.
Directories
Path | Synopsis |
---|---|
1.5/discovery | |
1.5/discovery/fake | |
1.5/dynamic | Package dynamic provides a client interface to arbitrary Kubernetes APIs that exposes common high level operations and exposes common metadata. |
1.5/kubernetes | This package has the automatically generated clientset. |
1.5/kubernetes/fake | This package has the automatically generated fake clientset. |
1.5/kubernetes/typed/apps/v1alpha1 | This package has the automatically generated typed clients. |
1.5/kubernetes/typed/apps/v1alpha1/fake | Package fake has the automatically generated clients. |
1.5/kubernetes/typed/authentication/v1beta1 | This package has the automatically generated typed clients. |
1.5/kubernetes/typed/authentication/v1beta1/fake | Package fake has the automatically generated clients. |
1.5/kubernetes/typed/authorization/v1beta1 | This package has the automatically generated typed clients. |
1.5/kubernetes/typed/authorization/v1beta1/fake | Package fake has the automatically generated clients. |
1.5/kubernetes/typed/autoscaling/v1 | This package has the automatically generated typed clients. |
1.5/kubernetes/typed/autoscaling/v1/fake | Package fake has the automatically generated clients. |
1.5/kubernetes/typed/batch/v1 | This package has the automatically generated typed clients. |
1.5/kubernetes/typed/batch/v1/fake | Package fake has the automatically generated clients. |
1.5/kubernetes/typed/certificates/v1alpha1 | This package has the automatically generated typed clients. |
1.5/kubernetes/typed/certificates/v1alpha1/fake | Package fake has the automatically generated clients. |
1.5/kubernetes/typed/core/v1 | This package has the automatically generated typed clients. |
1.5/kubernetes/typed/core/v1/fake | Package fake has the automatically generated clients. |
1.5/kubernetes/typed/extensions/v1beta1 | This package has the automatically generated typed clients. |
1.5/kubernetes/typed/extensions/v1beta1/fake | Package fake has the automatically generated clients. |
1.5/kubernetes/typed/policy/v1alpha1 | This package has the automatically generated typed clients. |
1.5/kubernetes/typed/policy/v1alpha1/fake | Package fake has the automatically generated clients. |
1.5/kubernetes/typed/rbac/v1alpha1 | This package has the automatically generated typed clients. |
1.5/kubernetes/typed/rbac/v1alpha1/fake | Package fake has the automatically generated clients. |
1.5/kubernetes/typed/storage/v1beta1 | This package has the automatically generated typed clients. |
1.5/kubernetes/typed/storage/v1beta1/fake | Package fake has the automatically generated clients. |
1.5/pkg/api | Package api contains the latest (or "internal") version of the Kubernetes API objects. |
1.5/pkg/api/errors | Package errors provides detailed error types for api field validation. |
1.5/pkg/api/install | Package install installs the v1 monolithic api, making it available as an option to all of the API encoding/decoding machinery. |
1.5/pkg/api/meta | Package meta provides functions for retrieving API metadata from objects belonging to the Kubernetes API TODO: move everything in this file to pkg/api/rest |
1.5/pkg/api/meta/metatypes | The types defined in this package are used by the meta package to represent the in-memory version of objects. |
1.5/pkg/api/resource | Package resource is a generated protocol buffer package. |
1.5/pkg/api/testapi | Package testapi provides a helper for retrieving the KUBE_TEST_API environment variable. |
1.5/pkg/api/unversioned | Package unversioned is a generated protocol buffer package. |
1.5/pkg/api/v1 | Package v1 is the v1 version of the API. |
1.5/pkg/api/validation/path | |
1.5/pkg/apimachinery | Package apimachinery contains the generic API machinery code that is common to both server and clients. |
1.5/pkg/apimachinery/announced | Package announced contains tools for announcing API group factories. |
1.5/pkg/apimachinery/registered | Package to keep track of API Versions that can be registered and are enabled in api.Scheme. |
1.5/pkg/apis/apps | |
1.5/pkg/apis/apps/install | Package install installs the apps API group, making it available as an option to all of the API encoding/decoding machinery. |
1.5/pkg/apis/apps/v1alpha1 | Package v1alpha1 is a generated protocol buffer package. |
1.5/pkg/apis/authentication | +k8s:deepcopy-gen=package,register +groupName=authentication.k8s.io +k8s:openapi-gen=true |
1.5/pkg/apis/authentication/install | Package install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery. |
1.5/pkg/apis/authentication/v1beta1 | +k8s:deepcopy-gen=package,register +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/authentication +groupName=authentication.k8s.io +k8s:openapi-gen=true Package v1beta1 is a generated protocol buffer package. |
1.5/pkg/apis/authorization | +groupName=authorization.k8s.io |
1.5/pkg/apis/authorization/install | Package install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery. |
1.5/pkg/apis/authorization/v1beta1 | +groupName=authorization.k8s.io Package v1beta1 is a generated protocol buffer package. |
1.5/pkg/apis/autoscaling | |
1.5/pkg/apis/autoscaling/install | Package install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery. |
1.5/pkg/apis/autoscaling/v1 | Package v1 is a generated protocol buffer package. |
1.5/pkg/apis/batch | |
1.5/pkg/apis/batch/install | Package install installs the batch API group, making it available as an option to all of the API encoding/decoding machinery. |
1.5/pkg/apis/batch/v1 | Package v1 is a generated protocol buffer package. |
1.5/pkg/apis/batch/v2alpha1 | Package v2alpha1 is a generated protocol buffer package. |
1.5/pkg/apis/certificates | +groupName=certificates.k8s.io |
1.5/pkg/apis/certificates/install | Package install installs the certificates API group, making it available as an option to all of the API encoding/decoding machinery. |
1.5/pkg/apis/certificates/v1alpha1 | +groupName=certificates.k8s.io Package v1alpha1 is a generated protocol buffer package. |
1.5/pkg/apis/componentconfig | |
1.5/pkg/apis/componentconfig/install | Package install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery. |
1.5/pkg/apis/componentconfig/v1alpha1 | |
1.5/pkg/apis/extensions | |
1.5/pkg/apis/extensions/install | Package install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery. |
1.5/pkg/apis/extensions/v1beta1 | Package v1beta1 is a generated protocol buffer package. |
1.5/pkg/apis/imagepolicy | |
1.5/pkg/apis/imagepolicy/install | Package install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery. |
1.5/pkg/apis/imagepolicy/v1alpha1 | +groupName=imagepolicy.k8s.io Package v1alpha1 is a generated protocol buffer package. |
1.5/pkg/apis/policy | |
1.5/pkg/apis/policy/install | Package install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery. |
1.5/pkg/apis/policy/v1alpha1 | Package policy is for any kind of policy object. |
1.5/pkg/apis/rbac | +groupName=rbac.authorization.k8s.io |
1.5/pkg/apis/rbac/install | Package install installs the batch API group, making it available as an option to all of the API encoding/decoding machinery. |
1.5/pkg/apis/rbac/v1alpha1 | +groupName=rbac.authorization.k8s.io Package v1alpha1 is a generated protocol buffer package. |
1.5/pkg/apis/storage | +k8s:deepcopy-gen=package,register +groupName=storage.k8s.io +g8k:openapi-gen=true |
1.5/pkg/apis/storage/install | Package install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery. |
1.5/pkg/apis/storage/v1beta1 | +k8s:deepcopy-gen=package,register +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/storage +groupName=storage.k8s.io +k8s:openapi-gen=true Package v1beta1 is a generated protocol buffer package. |
1.5/pkg/auth/user | Package user contains utilities for dealing with simple user exchange in the auth packages. |
1.5/pkg/conversion | Package conversion provides go object versioning. |
1.5/pkg/conversion/queryparams | Package queryparams provides conversion from versioned runtime objects to URL query values |
1.5/pkg/federation/apis/federation | |
1.5/pkg/federation/apis/federation/install | |
1.5/pkg/federation/apis/federation/v1beta1 | +k8s:deepcopy-gen=package,register +k8s:conversion-gen=k8s.io/kubernetes/federation/apis/federation +k8s:openapi-gen=true Package v1beta1 is a generated protocol buffer package. |
1.5/pkg/fields | Package fields implements a simple field system, parsing and matching selectors with sets of fields. |
1.5/pkg/genericapiserver/openapi/common | package common holds shared codes and types between open API code generator and spec generator. |
1.5/pkg/kubelet/qos | package qos contains helper functions for quality of service. |
1.5/pkg/kubelet/server/portforward | package portforward contains server-side logic for handling port forwarding requests. |
1.5/pkg/kubelet/types | Common types in the Kubelet. |
1.5/pkg/labels | Package labels implements a simple label system, parsing and matching selectors with sets of labels. |
1.5/pkg/master/ports | Package ports defines ports used by various pieces of the kubernetes infrastructure. |
1.5/pkg/runtime | Defines conversions between generic types and structs to map query strings to struct objects. |
1.5/pkg/runtime/serializer | |
1.5/pkg/runtime/serializer/json | |
1.5/pkg/runtime/serializer/protobuf | Package protobuf provides a Kubernetes serializer for the protobuf format. |
1.5/pkg/runtime/serializer/recognizer | |
1.5/pkg/runtime/serializer/streaming | Package streaming implements encoder and decoder for streams of runtime.Objects over io.Writer/Readers. |
1.5/pkg/runtime/serializer/versioning | |
1.5/pkg/selection | |
1.5/pkg/third_party/forked/golang/json | Package json is forked from the Go standard library to enable us to find the field of a struct that a given JSON key maps to. |
1.5/pkg/third_party/forked/golang/reflect | Package reflect is a fork of go's standard library reflection package, which allows for deep equal with equality functions defined. |
1.5/pkg/types | Package types implements various generic types used throughout kubernetes. |
1.5/pkg/util | Package util implements various utility functions used in both testing and implementation of Kubernetes. |
1.5/pkg/util/cert | |
1.5/pkg/util/clock | |
1.5/pkg/util/config | Package config provides utility objects for decoupling sources of configuration and the actual configuration state. |
1.5/pkg/util/diff | |
1.5/pkg/util/errors | Package errors implements various utility functions and types around errors. |
1.5/pkg/util/flowcontrol | |
1.5/pkg/util/framer | Package framer implements simple frame decoding techniques for an io.ReadCloser |
1.5/pkg/util/homedir | |
1.5/pkg/util/httpstream | Package httpstream adds multiplexed streaming support to HTTP requests and responses via connection upgrades. |
1.5/pkg/util/integer | |
1.5/pkg/util/intstr | Package intstr is a generated protocol buffer package. |
1.5/pkg/util/json | |
1.5/pkg/util/labels | Package labels provides utilities to work with Kubernetes labels. |
1.5/pkg/util/net | |
1.5/pkg/util/parsers | |
1.5/pkg/util/rand | Package rand provides utilities related to randomization. |
1.5/pkg/util/runtime | |
1.5/pkg/util/sets | Package sets has auto-generated set types. |
1.5/pkg/util/strategicpatch | |
1.5/pkg/util/testing | |
1.5/pkg/util/uuid | |
1.5/pkg/util/validation | |
1.5/pkg/util/validation/field | |
1.5/pkg/util/wait | Package wait provides tools for polling or listening for changes to a condition. |
1.5/pkg/util/yaml | |
1.5/pkg/version | Package version supplies version information collected at build time to kubernetes components. |
1.5/pkg/watch | Package watch contains a generic watchable interface, and a fake for testing code that uses the watch interface. |
1.5/pkg/watch/versioned | Package versioned is a generated protocol buffer package. |
1.5/plugin/pkg/auth/authenticator/token/oidc/testing | |
1.5/plugin/pkg/client/auth | |
1.5/plugin/pkg/client/auth/gcp | |
1.5/plugin/pkg/client/auth/oidc | |
1.5/rest | |
1.5/testing | |
1.5/tools/auth | Package auth defines a file format for holding authentication information needed by clients of Kubernetes. |
1.5/tools/cache | Package cache is a client-side caching mechanism. |
1.5/tools/cache/testing | |
1.5/tools/clientcmd | Package clientcmd provides one stop shopping for building a working client from a fixed config, from a .kubeconfig file, from command line flags, or from any merged combination. |
1.5/tools/clientcmd/api | |
1.5/tools/clientcmd/api/latest | |
1.5/tools/clientcmd/api/v1 | |
1.5/tools/metrics | Package metrics provides abstractions for registering which metrics to record. |
1.5/tools/portforward | Package portforward adds support for SSH-like port forwarding from the client's local host to remote containers. |
1.5/tools/record | Package record has all client logic for recording and reporting events. |
1.5/transport | |
examples/in-cluster | |
examples/out-of-cluster |