diff --git a/content/zh-cn/docs/reference/kubernetes-api/authentication-resources/cluster-trust-bundle-v1alpha1.md b/content/zh-cn/docs/reference/kubernetes-api/authentication-resources/cluster-trust-bundle-v1alpha1.md new file mode 100644 index 0000000000..9f24514be6 --- /dev/null +++ b/content/zh-cn/docs/reference/kubernetes-api/authentication-resources/cluster-trust-bundle-v1alpha1.md @@ -0,0 +1,617 @@ +--- +api_metadata: + apiVersion: "certificates.k8s.io/v1alpha1" + import: "k8s.io/api/certificates/v1alpha1" + kind: "ClusterTrustBundle" +content_type: "api_reference" +description: "ClusterTrustBundle 是一个集群范围的容器,用于存放 X.509 信任锚(根证书)。" +title: "ClusterTrustBundle v1alpha1" +weight: 5 +--- + + +`apiVersion: certificates.k8s.io/v1alpha1` + +`import "k8s.io/api/certificates/v1alpha1"` + +## ClusterTrustBundle {#ClusterTrustBundle} + + +ClusterTrustBundle 是一个集群范围的容器,用于存放 X.509 信任锚(根证书)。 + +ClusterTrustBundle 对象被视为可被集群中的任何已通过身份验证的用户读取, +因为此对象可以由使用 `clusterTrustBundle` 投射的 Pod 挂载。 +所有服务账号默认都有对 ClusterTrustBundle 的读取权限。 +对于仅对集群具有命名空间级访问权限的用户,可以通过伪装他们可以访问的服务账号来读取 ClusterTrustBundle。 + + +ClusterTrustBundle 可以选择与特定的签名程序相关联,此时它包含该签名程序的一组有效信任锚。 +签名程序可以有多个关联的 ClusterTrustBundle; +对于该签名程序而言每个 ClusterTrustBundle 都是独立的一组信任锚。 +准入控制用于确保只有对签名程序有访问权限的用户才能创建或修改相应的捆绑包。 + +
+ +- **apiVersion**: certificates.k8s.io/v1alpha1 + +- **kind**: ClusterTrustBundle + + +- **metadata** (}}">ObjectMeta) + + metadata 包含对象的元数据。 + +- **spec** (}}">ClusterTrustBundleSpec),必需 + + spec 包含签名程序(如果有)和信任锚。 + +## ClusterTrustBundleSpec {#ClusterTrustBundleSpec} + + +ClusterTrustBundleSpec 包含签名程序和信任锚。 + +
+ + +- **trustBundle** (string),必需 + + trustBundle 包含此捆绑包的各个 X.509 信任锚,这个 PEM 捆绑包是采用 PEM 包装的 DER 格式的若干 X.509 证书。 + + + 数据必须仅由可解析为有效 X.509 证书的 PEM 证书块组成。 + 每个证书必须包含设置了 CA 标志的基本约束扩展。 + API 服务器将拒绝包含重复证书或使用 PEM 块头的对象。 + + ClusterTrustBundles 的使用者(包括 kubelet)可以根据自己的逻辑对此文件中的证书块进行重新排序和去重, + 也可以删除 PEM 块头和块间数据。 + + +- **signerName** (string) + + signerName 表示关联的签名程序(如果有)。 + + 要创建或更新设置了 signerName 属性的 ClusterTrustBundle,你必须具备以下集群范围的权限: + + + group=certificates.k8s.io + resource=signers + resourceName=\<签名程序名称> + verb=attest + + + + 如果 signerName 不为空,则 ClusterTrustBundle 对象的名称必须以签名程序名称作为前缀(将斜杠转换为冒号)。 + 例如,对于签名程序名称 `example.com/foo`,有效的 ClusterTrustBundle 对象名称包括 + `example.com:foo:abc` 和 `example.com:foo:v1`。 + + 如果 signerName 为空,则 ClusterTrustBundle 对象的名称不能具有此类前缀。 + + 针对 ClusterTrustBundles 的列举/监视请求可以使用 `spec.signerName=NAME` 字段选择算符针对此字段进行过滤。 + +## ClusterTrustBundleList {#ClusterTrustBundleList} + + +ClusterTrustBundleList 是 ClusterTrustBundle 对象的集合。 + +
+ +- **apiVersion**: certificates.k8s.io/v1alpha1 + +- **kind**: ClusterTrustBundleList + + +- **metadata** (}}">ListMeta) + + metadata 包含列表的元数据。 + +- **items** ([]}}">ClusterTrustBundle),必需 + + items 是 ClusterTrustBundle 对象的集合。 + + +## 操作 {#Operations} + +
+ + +### `get` 读取指定的 ClusterTrustBundle + +#### HTTP 请求 + +GET /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} + + +#### 参数 + +- **name**(**路径参数**):string,必需 + + ClusterTrustBundle 的名称。 + +- **pretty**(**查询参数**):string + + }}">pretty + + +#### 响应 + +200 (}}">ClusterTrustBundle): OK + +401: Unauthorized + + +### `list` 列举或监视类别为 ClusterTrustBundle 的对象 + +#### HTTP 请求 + +GET /apis/certificates.k8s.io/v1alpha1/clustertrustbundles + + +#### 参数 + +- **allowWatchBookmarks**(**查询参数**):boolean + + }}">allowWatchBookmarks + +- **continue**(**查询参数**):string + + }}">continue + +- **fieldSelector**(**查询参数**):string + + }}">fieldSelector + +- **labelSelector**(**查询参数**):string + + }}">labelSelector + +- **limit**(**查询参数**):integer + + }}">limit + +- **pretty**(**查询参数**):string + + }}">pretty + +- **resourceVersion**(**查询参数**):string + + }}">resourceVersion + +- **resourceVersionMatch**(**查询参数**):string + + }}">resourceVersionMatch + +- **sendInitialEvents**(**查询参数**):boolean + + }}">sendInitialEvents + +- **timeoutSeconds**(**查询参数**):integer + + }}">timeoutSeconds + +- **watch**(**查询参数**):boolean + + }}">watch + + +#### 响应 + +200 (}}">ClusterTrustBundleList): OK + +401: Unauthorized + + +### `create` 创建 ClusterTrustBundle + +#### HTTP 请求 + +POST /apis/certificates.k8s.io/v1alpha1/clustertrustbundles + + +#### 参数 + +- **body**: }}">ClusterTrustBundle,必需 + +- **dryRun**(**查询参数**):string + + }}">dryRun + +- **fieldManager**(**查询参数**):string + + }}">fieldManager + +- **fieldValidation**(**查询参数**):string + + }}">fieldValidation + +- **pretty**(**查询参数**):string + + }}">pretty + + +#### 响应 + +200 (}}">ClusterTrustBundle): OK + +201 (}}">ClusterTrustBundle): Created + +202 (}}">ClusterTrustBundle): Accepted + +401: Unauthorized + + +### `update` 替换指定的 ClusterTrustBundle + +#### HTTP 请求 + +PUT /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} + + +#### 参数 + +- **name**(**路径参数**):string,必需 + + ClusterTrustBundle 的名称。 + +- **body**: }}">ClusterTrustBundle,必需 + +- **dryRun**(**查询参数**):string + + }}">dryRun + +- **fieldManager**(**查询参数**):string + + }}">fieldManager + +- **fieldValidation**(**查询参数**):string + + }}">fieldValidation + +- **pretty**(**查询参数**):string + + }}">pretty + + +#### 响应 + +200 (}}">ClusterTrustBundle): OK + +201 (}}">ClusterTrustBundle): Created + +401: Unauthorized + + +### `patch` 部分更新指定的 ClusterTrustBundle + +#### HTTP 请求 + +PATCH /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} + + +#### 参数 + +- **name**(**路径参数**):string,必需 + + ClusterTrustBundle 的名称。 + +- **body**: }}">Patch,必需 + +- **dryRun**(**查询参数**):string + + }}">dryRun + +- **fieldManager**(**查询参数**):string + + }}">fieldManager + +- **fieldValidation**(**查询参数**):string + + }}">fieldValidation + +- **force**(**查询参数**):boolean + + }}">force + +- **pretty**(**查询参数**):string + + }}">pretty + + +#### 响应 + +200 (}}">ClusterTrustBundle): OK + +201 (}}">ClusterTrustBundle): Created + +401: Unauthorized + + +### `delete` 删除 ClusterTrustBundle + +#### HTTP 请求 + +DELETE /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} + + +#### 参数 + +- **name**(**路径参数**):string,必需 + + ClusterTrustBundle 的名称。 + +- **body**: }}">DeleteOptions + +- **dryRun**(**查询参数**):string + + }}">dryRun + +- **gracePeriodSeconds**(**查询参数**):integer + + }}">gracePeriodSeconds + +- **pretty**(**查询参数**):string + + }}">pretty + +- **propagationPolicy**(**查询参数**):string + + }}">propagationPolicy + + +#### 响应 + +200 (}}">Status): OK + +202 (}}">Status): Accepted + +401: Unauthorized + + +### `deletecollection` 删除 ClusterTrustBundle 的集合 + +#### HTTP 请求 + +DELETE /apis/certificates.k8s.io/v1alpha1/clustertrustbundles + + +#### 参数 + +- **body**: }}">DeleteOptions + +- **continue**(**查询参数**):string + + }}">continue + +- **dryRun**(**查询参数**):string + + }}">dryRun + +- **fieldSelector**(**查询参数**):string + + }}">fieldSelector + +- **gracePeriodSeconds**(**查询参数**):integer + + }}">gracePeriodSeconds + +- **labelSelector**(**查询参数**):string + + }}">labelSelector + +- **limit**(**查询参数**):integer + + }}">limit + +- **pretty**(**查询参数**):string + + }}">pretty + +- **propagationPolicy**(**查询参数**):string + + }}">propagationPolicy + +- **resourceVersion**(**查询参数**):string + + }}">resourceVersion + +- **resourceVersionMatch**(**查询参数**):string + + }}">resourceVersionMatch + +- **sendInitialEvents**(**查询参数**):boolean + + }}">sendInitialEvents + +- **timeoutSeconds**(**查询参数**):integer + + }}">timeoutSeconds + + +#### 响应 + +200 (}}">Status): OK + +401: Unauthorized