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

c

> 云原生
Open source

Official C client library for Kubernetes

188 stars0 likes0 views
WebsiteGitHub

About

Official C client library for Kubernetes

Kubernetes Client Library for C

This is the official Kubernetes client library for the C programming language.

Building the library

…

(Optional) Installing using vcpkg on Windows

If you want to install the C client using vcpkg, please refer to vcpkg.md

(Optional) Installing using conan on Windows, Linux, Mac

If you want to install the C client using conan, please refer to conan.md

Building an example

bash
cd ${CLIENT_REPO_ROOT}/examples/list_pod
make

Running the example

bash
./list_pod_bin

Usage example

list all pods:

…

list all pods in cluster:

…

How to send integer or boolean parameters to API Server

If you want to send an integer or boolean parameter to the API server, you will see that the data type in API function is int *, e.g.

…

For example we can send timeoutSeconds and watch using the following usage:

…

Setting the parameter to NULL means not to send the parameter to the API Server, and the API Server will use the default value for this parameter.

Aggregated APIs and CRD-based APIs

If you want to implement a client for aggregated APIs (such as the metrics server API apis/metrics.k8s.io ) or CRD-based APIs, use the generic client. See example.

Multi-threaded Usage

If the C client library is used in multi-threaded program, the following 2 actions are required:

  1. After the program starts up, main thread must call the function apiClient_setupGlobalEnv() before any worker thread is created.

  2. If the C client is no longer used, main thread must call the function apiClient_unsetupGlobalEnv() after all worker threads end.

Refer to the example for detail.

Documentation

All APIs and Models' documentation can be found at the Generated client's README file

Versions and Compatibility

See versioning-and-compatibility.md

Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the community page.

You can reach the maintainers of this project at:

  • Slack
  • Mailing List

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Cclient-librarykubernetes

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 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,