百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

c

> 云原生
开源

Kubernetes 的官方 C 客户端库

188 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Kubernetes 的官方 C 客户端库

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 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Cclient-librarykubernetes

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类云原生
定价开源

> 相关工具

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