k8s-client is a Kubernetes client for Go.
Master should not be considered stable. Please vendor a tagged version. I will be
making breaking changes to the API. Also import paths have changed to github.com/bakins/k8s-client
k8s-client should be considered alpha quality. The API is subject to change.
k8s-client does not have 100% coverage of the Kubenretes API, but supports the common operations. Submit an issue or PR for support of others.
The "official" Kubernetes client for Go is part of the Kubernetes project proper and lives within the main Kubernetes repository. It also requires a rather large number of dependencies.
k8s-client is a small simple API client.
k8s-client also includes parts of the Kubernetes code that is also under the Apache 2 License.
To test the included Kubernetes http client, I use
minikube to start a local
cluster. Then I run kubectl proxy
to proxy to the local cluster
without authentication (this makes testing easier). Then:
cd http
go test -v
The tests will try to connect to Kubernetes at
http://127.0.0.1:8001
. This can be overriden using the K8S_SERVER
environment value.