Registry / cloud / kubernetes-client-go

kubernetes-client-go

JSON →
library0.0.0-20211217162629-92040c8d5731gogounverified

A Go client library for interacting with the Kubernetes API.

go get github.com/kubernetes-client/go
INSTALL
IMPORT
SIG · KUBERNETES-CLIENT-
K
kubernetes-client-go
cloudgov0.0.0-20211217162629-92040c8d5731
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

kubernetes
github.com/kubernetes-client/go

Lists pods in the default namespace using the Kubernetes client.

package main import ( "fmt" "github.com/kubernetes-client/go/kubernetes" ) func main() { config, _ := kubernetes.NewClientConfig() client, _ := kubernetes.NewClientForConfig(config) pods, _ := client.CoreV1().Pods("default").List() fmt.Println(len(pods.Items)) }
Debug
Known issues
gotchaThe import path may differ from the module path; use the subpackage for the actual client.
fix
Use 'github.com/kubernetes-client/go/kubernetes' instead of the bare module path.
affects: all
Upgrade
Version history
0.0.0-20211217162629-92040c8d5731latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
kubernetes-client-go — go get kubernetes-client-go · libregistry