Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

client-go-examples

> 云原生
Open source

A collection of mini-programs demonstrating Kubernetes client-go usage.

1.1K stars0 likes2 views
WebsiteGitHub

About

A collection of mini-programs demonstrating Kubernetes client-go usage.

Kubernetes client-go examples

diff
! Support development of this project > patreon.com/iximiuz

A collection of mini-programs demonstrating various client-go use cases augmented by a preconfigured online development environment. Inspired by client-go/examples.

The intention is to test a (more or less) fresh version of Go and k8s.io packages against the currently maintained Kubernetes release branches.

What is tested at the moment:

  • go 1.22.10
  • k8s.io/client-go 0.28.14 0.29.12 0.30.8 0.31.4 (maintained release branches)
  • Kubernetes 1.28.9 1.29.12 1.30.8 1.31.4 (best-effort match with versions supported by kind)

Setup

Most examples expect at least two Kubernetes clusters - shared1 and shared2.

bash
curl -sLS https://get.arkade.dev | sudo sh
arkade get kind kubectl

kind create cluster --name shared1
kind create cluster --name shared2

Run

Oversimplified (for now):

bash
cd 
make test

# or from the root folder:
make test-all

TODO

  • Add more assertions to mini-programs
  • Examples to be covered
    • setting API request timeout
    • configuring API request throttling
    • delete
    • delete collection
    • list filtration
    • watch filtration
    • informer filtration
    • patch with different strategies
    • Server Side Apply (SSA)
    • working with subresources
    • ownerReference (one and many)
    • optimistic locking
    • https://stackoverflow.com/questions/56115197/how-to-idiomatically-fill-empty-fields-with-default-values-for-kubernetes-api-ob

Contribution

Contributions are always welcome! Want to participate but don't know where to start? The TODO list above could give you some ideas. Before jumping to the code, please create an issue describing the addition/change first. This will allow me to coordinate the effort and make sure multiple people don't work on the same task.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Goclient-gokuberneteskubernetes-apikubernetes-client

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category云原生
PricingOpen source

> Related tools

K
Kubernetes
容器编排事实标准
H
Helm
Kubernetes 包管理器
S
seaweedfs
SeaweedFS is a distributed storage system for object storage (S3), file systems, and Iceberg tables,