diff --git a/content/zh-cn/docs/reference/access-authn-authz/authentication.md b/content/zh-cn/docs/reference/access-authn-authz/authentication.md index 1a744d670069a..8b7033d25f7a1 100644 --- a/content/zh-cn/docs/reference/access-authn-authz/authentication.md +++ b/content/zh-cn/docs/reference/access-authn-authz/authentication.md @@ -547,7 +547,7 @@ To enable the plugin, configure the following flags on the API server: 为了防范头部信息侦听,在请求中的头部字段被检视之前, 身份认证代理需要向 API 服务器提供一份合法的客户端证书,供后者使用所给的 CA 来执行验证。 -警告:**不要** 在不同的上下文中复用 CA 证书,除非你清楚这样做的风险是什么以及应如何保护 +警告:**不要**在不同的上下文中复用 CA 证书,除非你清楚这样做的风险是什么以及应如何保护 CA 用法的机制。 * `--requestheader-client-ca-file` 必需字段,给出 PEM 编码的证书包。 @@ -1172,11 +1172,11 @@ to the impersonated user info. 带伪装的请求首先会被身份认证识别为发出请求的用户, 之后会切换到使用被伪装的用户的用户信息。 -* 用户发起 API 调用时 **同时** 提供自身的凭据和伪装头部字段信息 -* API 服务器对用户执行身份认证 -* API 服务器确认通过认证的用户具有伪装特权 -* 请求用户的信息被替换成伪装字段的值 -* 评估请求,鉴权组件针对所伪装的用户信息执行操作 +* 用户发起 API 调用时**同时**提供自身的凭据和伪装头部字段信息。 +* API 服务器对用户执行身份认证。 +* API 服务器确认通过认证的用户具有伪装特权。 +* 请求用户的信息被替换成伪装字段的值。 +* 评估请求,鉴权组件针对所伪装的用户信息执行操作。 若要伪装成某个用户、某个组、用户标识符(UID))或者设置附加字段, -执行伪装操作的用户必须具有对所伪装的类别(“user”、“group”、“uid” 等)执行 “impersonate” +执行伪装操作的用户必须具有对所伪装的类别(`user`、`group`、`uid` 等)执行 `impersonate` 动词操作的能力。 对于启用了 RBAC 鉴权插件的集群,下面的 ClusterRole 封装了设置用户和组伪装字段所需的规则: @@ -1706,7 +1706,7 @@ users: provideClusterInfo: true # Exec 插件与标准输入 I/O 数据流之间的协议。如果协议无法满足, - # 则插件无法运行并会返回错误信息。合法的值包括 "Never" (Exec 插件从不使用标准输入), + # 则插件无法运行并会返回错误信息。合法的值包括 "Never"(Exec 插件从不使用标准输入), # "IfAvailable" (Exec 插件希望在可以的情况下使用标准输入), # 或者 "Always" (Exec 插件需要使用标准输入才能工作)。可选字段。 # 默认值为 "IfAvailable"。 @@ -1853,7 +1853,7 @@ If specified, `clientKeyData` and `clientCertificateData` must both must be pres 如果插件在后续调用中返回了不同的证书或密钥,`k8s.io/client-go` 会终止其与服务器的连接,从而强制执行新的 TLS 握手过程。 -如果指定了这种方式,则 `clientKeyData` 和 `clientCertificateData` 字段都必需存在。 +如果指定了这种方式,则 `clientKeyData` 和 `clientCertificateData` 字段都必须存在。 `clientCertificateData` 字段可能包含一些要发送给服务器的中间证书(Intermediate Certificates)。 @@ -1996,7 +1996,7 @@ The following `ExecCredential` manifest describes a cluster information sample. --> ## 为客户端提供的对身份验证信息的 API 访问 {#self-subject-review} -{{< feature-state for_k8s_version="v1.27" state="beta" >}} +{{< feature-state for_k8s_version="v1.28" state="stable" >}} 在 Kubernetes 集群中使用复杂的身份验证流程时,例如如果你使用 -[Webhook 令牌身份验证](/zh-cn/docs/reference/access-authn-authz/authentication/#webhook-token-authentication)或[身份验证代理](/zh-cn/docs/reference/access-authn-authz/authentication/#authenticating-proxy)时, +[Webhook 令牌身份验证](/zh-cn/docs/reference/access-authn-authz/authentication/#webhook-token-authentication)或 +[身份验证代理](/zh-cn/docs/reference/access-authn-authz/authentication/#authenticating-proxy)时, 此特性极其有用。 {{< note >}} @@ -2162,7 +2164,8 @@ Kubernetes API 服务器在所有身份验证机制 {{< /note >}} 默认情况下,所有经过身份验证的用户都可以在 `APISelfSubjectReview` 特性被启用时创建 `SelfSubjectReview` 对象。 这是 `system:basic-user` 集群角色允许的操作。 @@ -2172,17 +2175,24 @@ By default, all authenticated users can create `SelfSubjectReview` objects when You can only make `SelfSubjectReview` requests if: * the `APISelfSubjectReview` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) - is enabled for your cluster (enabled by default after reaching Beta) + is enabled for your cluster (not needed for Kubernetes {{< skew currentVersion >}}, but older + Kubernetes versions might not offer this feature gate, or might default it to be off) +* (if you are running a version of Kubernetes older than v1.28) the API server for your + cluster has the `authentication.k8s.io/v1alpha1` or `authentication.k8s.io/v1beta1` * the API server for your cluster has the `authentication.k8s.io/v1alpha1` or `authentication.k8s.io/v1beta1` {{< glossary_tooltip term_id="api-group" text="API group" >}} enabled. --> 你只能在以下情况下进行 `SelfSubjectReview` 请求: -* 集群启用了 `APISelfSubjectReview` (Beta 版本默认启用) +* 集群启用了 `APISelfSubjectReview` [特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/) + (Kubernetes {{< skew currentVersion >}} 不需要,但较旧的 Kubernetes 版本可能没有此特性门控, + 或者默认为关闭状态)。 +* (如果你运行的 Kubernetes 版本早于 v1.28 版本)集群的 API 服务器包含 + `authentication.k8s.io/v1alpha1` 或 `authentication.k8s.io/v1beta1` API 组。 * 集群的 API 服务器已启用 `authentication.k8s.io/v1alpha1` 或者 `authentication.k8s.io/v1beta1` - {{< glossary_tooltip term_id="api-group" text="API 组" >}}。。 + {{< glossary_tooltip term_id="api-group" text="API 组" >}}。 {{< /note >}} ## {{% heading "whatsnext" %}} @@ -2191,6 +2201,5 @@ You can only make `SelfSubjectReview` requests if: * Read the [client authentication reference (v1beta1)](/docs/reference/config-api/client-authentication.v1beta1/) * Read the [client authentication reference (v1)](/docs/reference/config-api/client-authentication.v1/) --> -* 阅读[客户端认证参考文档 (v1beta1)](/zh-cn/docs/reference/config-api/client-authentication.v1beta1/) -* 阅读[客户端认证参考文档 (v1)](/zh-cn/docs/reference/config-api/client-authentication.v1/) - +* 阅读[客户端认证参考文档(v1beta1)](/zh-cn/docs/reference/config-api/client-authentication.v1beta1/)。 +* 阅读[客户端认证参考文档(v1)](/zh-cn/docs/reference/config-api/client-authentication.v1/)。 diff --git a/content/zh-cn/docs/reference/kubectl/kubectl.md b/content/zh-cn/docs/reference/kubectl/kubectl.md index bf2cce0d371a1..a4b4da943bb10 100644 --- a/content/zh-cn/docs/reference/kubectl/kubectl.md +++ b/content/zh-cn/docs/reference/kubectl/kubectl.md @@ -89,7 +89,7 @@ kubectl [flags] - --cache-dir string     默认值: "$HOME/.kube/cache" + --cache-dir string     默认值:"$HOME/.kube/cache" @@ -133,7 +133,7 @@ kubectl [flags] - --cloud-provider-gce-l7lb-src-cidrs cidrs     默认值: 130.211.0.0/22,35.191.0.0/16 + --cloud-provider-gce-l7lb-src-cidrs cidrs     默认值:130.211.0.0/22,35.191.0.0/16 @@ -142,7 +142,7 @@ kubectl [flags] - --cloud-provider-gce-lb-src-cidrs cidrs     默认值: 130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16 + --cloud-provider-gce-lb-src-cidrs cidrs     默认值:130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16 @@ -175,7 +175,7 @@ kubectl [flags] - --default-not-ready-toleration-seconds int     默认值: 300 + --default-not-ready-toleration-seconds int     默认值:300 @@ -186,7 +186,7 @@ kubectl [flags] - --default-unreachable-toleration-seconds int     默认值: 300 + --default-unreachable-toleration-seconds int     默认值:300 @@ -230,7 +230,7 @@ kubectl [flags] - --log-backtrace-at traceLocation     默认值: 0 + --log-backtrace-at traceLocation     默认值:0 @@ -263,7 +263,7 @@ kubectl [flags] - --log-file-max-size uint     默认值: 1800 + --log-file-max-size uint     默认值:1800 @@ -274,7 +274,7 @@ kubectl [flags] - --log-flush-frequency duration     默认值: 5s + --log-flush-frequency duration     默认值:5s @@ -285,7 +285,7 @@ kubectl [flags] - --logtostderr     默认值: true + --logtostderr     默认值:true @@ -338,18 +338,18 @@ kubectl [flags] - --profile string     默认值: "none" + --profile string     默认值:"none" - 要记录的性能指标的名称。可取 (none|cpu|heap|goroutine|threadcreate|block|mutex) 其中之一。 + 要记录的性能指标的名称。可取(none|cpu|heap|goroutine|threadcreate|block|mutex)其中之一。 - --profile-output string     默认值: "profile.pprof" + --profile-output string     默认值:"profile.pprof" @@ -360,7 +360,7 @@ kubectl [flags] - --request-timeout string     默认值: "0" + --request-timeout string     默认值:"0" @@ -404,7 +404,7 @@ kubectl [flags] - --stderrthreshold severity     默认值: 2 + --stderrthreshold severity     默认值:2 @@ -500,7 +500,7 @@ kubectl [flags] -kubectl 的配置 ("kubeconfig") 文件的路径。默认值: "$HOME/.kube/config" +kubectl 的配置 ("kubeconfig") 文件的路径。默认值:"$HOME/.kube/config" @@ -541,6 +541,19 @@ When set to true, external plugins can be used as subcommands for builtin comman + +KUBECTL_INTERACTIVE_DELETE + + + + +当设置为 true 时,`kubectl delete` 命令中的 `--interactive` 标志将被激活, +允许用户在通过传递此标志进行删除之前预览并确认资源。 + + + @@ -647,4 +660,4 @@ When set to true, external plugins can be used as subcommands for builtin comman * [kubectl top](/docs/reference/generated/kubectl/kubectl-commands#top) - 显示资源(CPU/内存/存储)使用率 * [kubectl uncordon](/docs/reference/generated/kubectl/kubectl-commands#uncordon) - 标记节点为可调度的 * [kubectl version](/docs/reference/generated/kubectl/kubectl-commands#version) - 打印客户端和服务器的版本信息 -* [kubectl wait](/docs/reference/generated/kubectl/kubectl-commands#wait) - 实验性:等待一个或多个资源达到某种状态 +* [kubectl wait](/docs/reference/generated/kubectl/kubectl-commands#wait) - 实验级特性:等待一个或多个资源达到某种状态