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.
k8s
✓ github.com/ericchiang/k8s
List pods using Kubernetes client
package main
import (
"context"
"fmt"
"github.com/ericchiang/k8s"
)
func main() {
client, err := k8s.NewInClusterClient()
if err != nil {
fmt.Println(err)
return
}
pods := &k8s.PodList{}
err = client.List(context.Background(), "", pods)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(pods)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.2.0latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.