大网数据广告活动
Kubernetes 部署与运维

ClusterTrustBundle v1beta1

· 52CE 我爱测

`apiVersion: certificates.k8s.io/v1beta1`

apiVersion: certificates.k8s.io/v1beta1

import "k8s.io/api/certificates/v1beta1"

ClusterTrustBundle {#ClusterTrustBundle}

ClusterTrustBundle 是一个集群范围的容器,用于存放 X.509 信任锚(根证书)。

ClusterTrustBundle 对象被视为可被集群中的任何已通过身份验证的用户读取, 因为此对象可以由使用 clusterTrustBundle 投射的 Pod 挂载。 所有服务账号默认都有对 ClusterTrustBundle 的读取权限。 对于仅对集群具有命名空间级访问权限的用户,可以通过伪装他们可以访问的服务账号来读取 ClusterTrustBundle。

ClusterTrustBundle 可以选择与特定的签名程序相关联,此时它包含该签名程序的一组有效信任锚。 签名程序可以有多个关联的 ClusterTrustBundle; 对于该签名程序而言每个 ClusterTrustBundle 都是独立的一组信任锚。 准入控制用于确保只有对签名程序有访问权限的用户才能创建或修改相应的捆绑包。

<hr>

  • apiVersion: certificates.k8s.io/v1beta1

  • kind: ClusterTrustBundle

  • metadata (<a href="">ObjectMeta</a>)

    metadata 包含对象的元数据。

  • spec (<a href="">ClusterTrustBundleSpec</a>),必需

    spec 包含签名程序(如果有)和信任锚。

ClusterTrustBundleSpec {#ClusterTrustBundleSpec}

ClusterTrustBundleSpec 包含签名程序和信任锚。

<hr>

  • trustBundle (string),必需

    trustBundle 包含此捆绑包的各个 X.509 信任锚,这个 PEM 捆绑包是采用 PEM 包装的 DER 格式的若干 X.509 证书。

    数据必须仅由可解析为有效 X.509 证书的 PEM 证书块组成。 每个证书必须包含设置了 CA 标志的基本约束扩展。 API 服务器将拒绝包含重复证书或使用 PEM 块头的对象。

    ClusterTrustBundles 的使用者(包括 kubelet) 可以根据自己的逻辑对此文件中的证书块进行重新排序和去重, 也可以删除 PEM 块头和块间数据。

  • signerName (string)

    signerName 表示关联的签名程序(如果有)。

    要创建或更新设置了 signerName 属性的 ClusterTrustBundle, 你必须具备以下集群范围的权限:

    <code> group=certificates.k8s.io resource=signers resourceName=<签名程序名称> verb=attest </code>

    如果 signerName 不为空,则 ClusterTrustBundle 对象的名称必须以签名程序名称作为前缀(将斜杠转换为冒号)。 例如,对于签名程序名称 example.com/foo,有效的 ClusterTrustBundle 对象名称包括 example.com:foo:abc 和 example.com:foo:v1。

    如果 signerName 为空,则 ClusterTrustBundle 对象的名称不能具有此类前缀。

    针对 ClusterTrustBundles 的列举/监视请求可以使用 spec.signerName=NAME 字段选择算符针对此字段进行过滤。

ClusterTrustBundleList {#ClusterTrustBundleList}

ClusterTrustBundleList 是 ClusterTrustBundle 对象的集合。

<hr>

  • apiVersion: certificates.k8s.io/v1beta1

  • kind: ClusterTrustBundleList

  • metadata (<a href="">ListMeta</a>)

    metadata 包含列表的元数据。

  • items ([]<a href="">ClusterTrustBundle</a>),必需

    items 是 ClusterTrustBundle 对象的集合。

操作 {#Operations}

<hr>

get 读取指定的 ClusterTrustBundle

HTTP 请求

GET /apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name}

参数

  • name(路径参数):string,必需

    ClusterTrustBundle 的名称。

  • pretty(查询参数):string

    <a href="">pretty</a>

响应

200 (<a href="">ClusterTrustBundle</a>): OK

401: Unauthorized

list 列举或监视类别为 ClusterTrustBundle 的对象

HTTP 请求

GET /apis/certificates.k8s.io/v1beta1/clustertrustbundles

参数

  • allowWatchBookmarks(查询参数):boolean

    <a href="">allowWatchBookmarks</a>

  • continue(查询参数):string

    <a href="">continue</a>

  • fieldSelector(查询参数):string

    <a href="">fieldSelector</a>

  • labelSelector(查询参数):string

    <a href="">labelSelector</a>

  • limit(查询参数):integer

    <a href="">limit</a>

  • pretty(查询参数):string

    <a href="">pretty</a>

  • resourceVersion(查询参数):string

    <a href="">resourceVersion</a>

  • resourceVersionMatch(查询参数):string

    <a href="">resourceVersionMatch</a>

  • sendInitialEvents(查询参数):boolean

    <a href="">sendInitialEvents</a>

  • shardSelector(查询参数):string

    <a href="">shardSelector</a>

  • timeoutSeconds(查询参数):integer

    <a href="">timeoutSeconds</a>

  • watch(查询参数):boolean

    <a href="">watch</a>

响应

200 (<a href="">ClusterTrustBundleList</a>): OK

401: Unauthorized

create 创建 ClusterTrustBundle

HTTP 请求

POST /apis/certificates.k8s.io/v1beta1/clustertrustbundles

参数

  • body: <a href="">ClusterTrustBundle</a>,必需

  • dryRun(查询参数):string

    <a href="">dryRun</a>

  • fieldManager(查询参数):string

    <a href="">fieldManager</a>

  • fieldValidation(查询参数):string

    <a href="">fieldValidation</a>

  • pretty(查询参数):string

    <a href="">pretty</a>

响应

200 (<a href="">ClusterTrustBundle</a>): OK

201 (<a href="">ClusterTrustBundle</a>): Created

202 (<a href="">ClusterTrustBundle</a>): Accepted

401: Unauthorized

update 替换指定的 ClusterTrustBundle

HTTP 请求

PUT /apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name}

参数

  • name(路径参数):string,必需

    ClusterTrustBundle 的名称。

  • body: <a href="">ClusterTrustBundle</a>,必需

  • dryRun(查询参数):string

    <a href="">dryRun</a>

  • fieldManager(查询参数):string

    <a href="">fieldManager</a>

  • fieldValidation(查询参数):string

    <a href="">fieldValidation</a>

  • pretty(查询参数):string

    <a href="">pretty</a>

响应

200 (<a href="">ClusterTrustBundle</a>): OK

201 (<a href="">ClusterTrustBundle</a>): Created

401: Unauthorized

patch 部分更新指定的 ClusterTrustBundle

HTTP 请求

PATCH /apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name}

参数

  • name(路径参数):string,必需

    ClusterTrustBundle 的名称。

  • body: <a href="">Patch</a>,必需

  • dryRun(查询参数):string

    <a href="">dryRun</a>

  • fieldManager(查询参数):string

    <a href="">fieldManager</a>

  • fieldValidation(查询参数):string

    <a href="">fieldValidation</a>

  • force(查询参数):boolean

    <a href="">force</a>

  • pretty(查询参数):string

    <a href="">pretty</a>

响应

200 (<a href="">ClusterTrustBundle</a>): OK

201 (<a href="">ClusterTrustBundle</a>): Created

401: Unauthorized

delete 删除 ClusterTrustBundle

HTTP 请求

DELETE /apis/certificates.k8s.io/v1beta1/clustertrustbundles/{name}

参数

  • name(路径参数):string,必需

    ClusterTrustBundle 的名称。

  • body: <a href="">DeleteOptions</a>

  • dryRun(查询参数):string

    <a href="">dryRun</a>

  • gracePeriodSeconds(查询参数):integer

    <a href="">gracePeriodSeconds</a>

  • ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean

    <a href="">ignoreStoreReadErrorWithClusterBreakingPotential</a>

  • pretty(查询参数):string

    <a href="">pretty</a>

  • propagationPolicy(查询参数):string

    <a href="">propagationPolicy</a>

响应

200 (<a href="">Status</a>): OK

202 (<a href="">Status</a>): Accepted

401: Unauthorized

deletecollection 删除 ClusterTrustBundle 的集合

HTTP 请求

DELETE /apis/certificates.k8s.io/v1beta1/clustertrustbundles

参数

  • body: <a href="">DeleteOptions</a>

  • continue(查询参数):string

    <a href="">continue</a>

  • dryRun(查询参数):string

    <a href="">dryRun</a>

  • fieldSelector(查询参数):string

    <a href="">fieldSelector</a>

  • gracePeriodSeconds(查询参数):integer

    <a href="">gracePeriodSeconds</a>

  • ignoreStoreReadErrorWithClusterBreakingPotential(查询参数):boolean

    <a href="">ignoreStoreReadErrorWithClusterBreakingPotential</a>

  • labelSelector(查询参数):string

    <a href="">labelSelector</a>

  • limit(查询参数):integer

    <a href="">limit</a>

  • pretty(查询参数):string

    <a href="">pretty</a>

  • propagationPolicy(查询参数):string

    <a href="">propagationPolicy</a>

  • resourceVersion(查询参数):string

    <a href="">resourceVersion</a>

  • resourceVersionMatch(查询参数):string

    <a href="">resourceVersionMatch</a>

  • sendInitialEvents(查询参数):boolean

    <a href="">sendInitialEvents</a>

  • shardSelector(查询参数):string

    <a href="">shardSelector</a>

  • timeoutSeconds(查询参数):integer

    <a href="">timeoutSeconds</a>

响应

200 (<a href="">Status</a>): OK

401: Unauthorized

来源:Kubernetes 文档贡献者 · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
Kubernetes 文档贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。