Развёртывания Kubernetes
-
Как только вы запустили кластер Kubernetes, вы можете развернуть свои контейнеризированные приложения в него. Для этого вам нужно создать конфигурацию развёртывания (Deployment) в Kubernetes. Развёртывание сообщает Kubernetes, как создавать и обновлять экземпляры вашего приложения. После создания развёртывания ведущий узел Kubernetes планирует запустить экземпляры приложения на отдельных узлах в кластере.
+
Как только вы запустили кластер Kubernetes, вы можете развернуть на нём свои контейнеризированные приложения. Для этого вам нужно создать конфигурацию развёртывания (Deployment) в Kubernetes. Развёртывание сообщает Kubernetes, как создавать и обновлять экземпляры вашего приложения. После создания развёртывания ведущий узел Kubernetes планирует запустить экземпляры приложения на отдельных узлах в кластере.
Когда экземпляры приложения были созданы, контроллер развёртывания Kubernetes непрерывно отслеживает их. Если узел, на котором размещен экземпляр, вышёл из строя или был удалён, контроллер развёртывания вместо этого экземпляра использует экземпляр на другом узле в кластере. Этот процесс представляет собой механизм самовосстановления, обеспечивающий работу кластера в случае возникновения аппаратных неисправностей либо технических работ.
diff --git a/content/ru/examples/pods/probe/exec-liveness.yaml b/content/ru/examples/pods/probe/exec-liveness.yaml
index 07bf75f85c..6a9c9b3213 100644
--- a/content/ru/examples/pods/probe/exec-liveness.yaml
+++ b/content/ru/examples/pods/probe/exec-liveness.yaml
@@ -11,7 +11,7 @@ spec:
args:
- /bin/sh
- -c
- - touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
+ - touch /tmp/healthy; sleep 30; rm -f /tmp/healthy; sleep 600
livenessProbe:
exec:
command:
diff --git a/content/zh/OWNERS b/content/zh-cn/OWNERS
similarity index 100%
rename from content/zh/OWNERS
rename to content/zh-cn/OWNERS
diff --git a/content/zh/_common-resources/images/blocks.svg b/content/zh-cn/_common-resources/images/blocks.svg
similarity index 100%
rename from content/zh/_common-resources/images/blocks.svg
rename to content/zh-cn/_common-resources/images/blocks.svg
diff --git a/content/zh/_common-resources/images/flower.svg b/content/zh-cn/_common-resources/images/flower.svg
similarity index 100%
rename from content/zh/_common-resources/images/flower.svg
rename to content/zh-cn/_common-resources/images/flower.svg
diff --git a/content/zh/_common-resources/images/kub_video_banner_homepage.jpg b/content/zh-cn/_common-resources/images/kub_video_banner_homepage.jpg
similarity index 100%
rename from content/zh/_common-resources/images/kub_video_banner_homepage.jpg
rename to content/zh-cn/_common-resources/images/kub_video_banner_homepage.jpg
diff --git a/content/zh/_common-resources/images/scalable.svg b/content/zh-cn/_common-resources/images/scalable.svg
similarity index 100%
rename from content/zh/_common-resources/images/scalable.svg
rename to content/zh-cn/_common-resources/images/scalable.svg
diff --git a/content/zh/_common-resources/images/suitcase.svg b/content/zh-cn/_common-resources/images/suitcase.svg
similarity index 100%
rename from content/zh/_common-resources/images/suitcase.svg
rename to content/zh-cn/_common-resources/images/suitcase.svg
diff --git a/content/zh/_common-resources/index.md b/content/zh-cn/_common-resources/index.md
similarity index 100%
rename from content/zh/_common-resources/index.md
rename to content/zh-cn/_common-resources/index.md
diff --git a/content/zh/_index.html b/content/zh-cn/_index.html
similarity index 100%
rename from content/zh/_index.html
rename to content/zh-cn/_index.html
diff --git a/content/zh/blog/_index.md b/content/zh-cn/blog/_index.md
similarity index 100%
rename from content/zh/blog/_index.md
rename to content/zh-cn/blog/_index.md
diff --git a/content/zh/blog/_posts/2015-03-00-Kubernetes-Gathering-Videos.md b/content/zh-cn/blog/_posts/2015-03-00-Kubernetes-Gathering-Videos.md
similarity index 100%
rename from content/zh/blog/_posts/2015-03-00-Kubernetes-Gathering-Videos.md
rename to content/zh-cn/blog/_posts/2015-03-00-Kubernetes-Gathering-Videos.md
diff --git a/content/zh/blog/_posts/2015-03-00-Weekly-Kubernetes-Community-Hangout.md b/content/zh-cn/blog/_posts/2015-03-00-Weekly-Kubernetes-Community-Hangout.md
similarity index 100%
rename from content/zh/blog/_posts/2015-03-00-Weekly-Kubernetes-Community-Hangout.md
rename to content/zh-cn/blog/_posts/2015-03-00-Weekly-Kubernetes-Community-Hangout.md
diff --git a/content/zh/blog/_posts/2015-03-00-Welcome-To-Kubernetes-Blog.md b/content/zh-cn/blog/_posts/2015-03-00-Welcome-To-Kubernetes-Blog.md
similarity index 100%
rename from content/zh/blog/_posts/2015-03-00-Welcome-To-Kubernetes-Blog.md
rename to content/zh-cn/blog/_posts/2015-03-00-Welcome-To-Kubernetes-Blog.md
diff --git a/content/zh/blog/_posts/2015-04-00-Borg-Predecessor-To-Kubernetes.md b/content/zh-cn/blog/_posts/2015-04-00-Borg-Predecessor-To-Kubernetes.md
similarity index 100%
rename from content/zh/blog/_posts/2015-04-00-Borg-Predecessor-To-Kubernetes.md
rename to content/zh-cn/blog/_posts/2015-04-00-Borg-Predecessor-To-Kubernetes.md
diff --git a/content/zh/blog/_posts/2015-04-00-Kubernetes-Release-0150.md b/content/zh-cn/blog/_posts/2015-04-00-Kubernetes-Release-0150.md
similarity index 100%
rename from content/zh/blog/_posts/2015-04-00-Kubernetes-Release-0150.md
rename to content/zh-cn/blog/_posts/2015-04-00-Kubernetes-Release-0150.md
diff --git a/content/zh/blog/_posts/2015-04-00-Weekly-Kubernetes-Community-Hangout.md b/content/zh-cn/blog/_posts/2015-04-00-Weekly-Kubernetes-Community-Hangout.md
similarity index 100%
rename from content/zh/blog/_posts/2015-04-00-Weekly-Kubernetes-Community-Hangout.md
rename to content/zh-cn/blog/_posts/2015-04-00-Weekly-Kubernetes-Community-Hangout.md
diff --git a/content/zh/blog/_posts/2015-04-00-Weekly-Kubernetes-Community-Hangout_17.md b/content/zh-cn/blog/_posts/2015-04-00-Weekly-Kubernetes-Community-Hangout_17.md
similarity index 100%
rename from content/zh/blog/_posts/2015-04-00-Weekly-Kubernetes-Community-Hangout_17.md
rename to content/zh-cn/blog/_posts/2015-04-00-Weekly-Kubernetes-Community-Hangout_17.md
diff --git a/content/zh/blog/_posts/2015-04-00-Weekly-Kubernetes-Community-Hangout_29.md b/content/zh-cn/blog/_posts/2015-04-00-Weekly-Kubernetes-Community-Hangout_29.md
similarity index 100%
rename from content/zh/blog/_posts/2015-04-00-Weekly-Kubernetes-Community-Hangout_29.md
rename to content/zh-cn/blog/_posts/2015-04-00-Weekly-Kubernetes-Community-Hangout_29.md
diff --git a/content/zh/blog/_posts/2015-05-00-Appc-Support-For-Kubernetes-Through-Rkt.md b/content/zh-cn/blog/_posts/2015-05-00-Appc-Support-For-Kubernetes-Through-Rkt.md
similarity index 100%
rename from content/zh/blog/_posts/2015-05-00-Appc-Support-For-Kubernetes-Through-Rkt.md
rename to content/zh-cn/blog/_posts/2015-05-00-Appc-Support-For-Kubernetes-Through-Rkt.md
diff --git a/content/zh/blog/_posts/2015-05-00-Kubernetes-On-Openstack.md b/content/zh-cn/blog/_posts/2015-05-00-Kubernetes-On-Openstack.md
similarity index 100%
rename from content/zh/blog/_posts/2015-05-00-Kubernetes-On-Openstack.md
rename to content/zh-cn/blog/_posts/2015-05-00-Kubernetes-On-Openstack.md
diff --git a/content/zh/blog/_posts/2015-05-00-Weekly-Kubernetes-Community-Hangout.md b/content/zh-cn/blog/_posts/2015-05-00-Weekly-Kubernetes-Community-Hangout.md
similarity index 100%
rename from content/zh/blog/_posts/2015-05-00-Weekly-Kubernetes-Community-Hangout.md
rename to content/zh-cn/blog/_posts/2015-05-00-Weekly-Kubernetes-Community-Hangout.md
diff --git a/content/zh/blog/_posts/2015-06-00-Slides-Cluster-Management-With.md b/content/zh-cn/blog/_posts/2015-06-00-Slides-Cluster-Management-With.md
similarity index 100%
rename from content/zh/blog/_posts/2015-06-00-Slides-Cluster-Management-With.md
rename to content/zh-cn/blog/_posts/2015-06-00-Slides-Cluster-Management-With.md
diff --git a/content/zh/blog/_posts/2015-07-00-Announcing-First-Kubernetes-Enterprise.md b/content/zh-cn/blog/_posts/2015-07-00-Announcing-First-Kubernetes-Enterprise.md
similarity index 100%
rename from content/zh/blog/_posts/2015-07-00-Announcing-First-Kubernetes-Enterprise.md
rename to content/zh-cn/blog/_posts/2015-07-00-Announcing-First-Kubernetes-Enterprise.md
diff --git a/content/zh/blog/_posts/2015-08-00-Weekly-Kubernetes-Community-Hangout.md b/content/zh-cn/blog/_posts/2015-08-00-Weekly-Kubernetes-Community-Hangout.md
similarity index 100%
rename from content/zh/blog/_posts/2015-08-00-Weekly-Kubernetes-Community-Hangout.md
rename to content/zh-cn/blog/_posts/2015-08-00-Weekly-Kubernetes-Community-Hangout.md
diff --git a/content/zh/blog/_posts/2015-11-00-Kubernetes-1-1-Performance-Upgrades-Improved-Tooling-And-A-Growing-Community.md b/content/zh-cn/blog/_posts/2015-11-00-Kubernetes-1-1-Performance-Upgrades-Improved-Tooling-And-A-Growing-Community.md
similarity index 100%
rename from content/zh/blog/_posts/2015-11-00-Kubernetes-1-1-Performance-Upgrades-Improved-Tooling-And-A-Growing-Community.md
rename to content/zh-cn/blog/_posts/2015-11-00-Kubernetes-1-1-Performance-Upgrades-Improved-Tooling-And-A-Growing-Community.md
diff --git a/content/zh/blog/_posts/2015-12-00-Managing-Kubernetes-Pods-Services-And-Replication-Controllers-With-Puppet.md b/content/zh-cn/blog/_posts/2015-12-00-Managing-Kubernetes-Pods-Services-And-Replication-Controllers-With-Puppet.md
similarity index 100%
rename from content/zh/blog/_posts/2015-12-00-Managing-Kubernetes-Pods-Services-And-Replication-Controllers-With-Puppet.md
rename to content/zh-cn/blog/_posts/2015-12-00-Managing-Kubernetes-Pods-Services-And-Replication-Controllers-With-Puppet.md
diff --git a/content/zh/blog/_posts/2016-01-00-Kubernetes-Community-Meeting-Notes.md b/content/zh-cn/blog/_posts/2016-01-00-Kubernetes-Community-Meeting-Notes.md
similarity index 100%
rename from content/zh/blog/_posts/2016-01-00-Kubernetes-Community-Meeting-Notes.md
rename to content/zh-cn/blog/_posts/2016-01-00-Kubernetes-Community-Meeting-Notes.md
diff --git a/content/zh/blog/_posts/2016-01-00-Simple-Leader-Election-With-Kubernetes.md b/content/zh-cn/blog/_posts/2016-01-00-Simple-Leader-Election-With-Kubernetes.md
similarity index 100%
rename from content/zh/blog/_posts/2016-01-00-Simple-Leader-Election-With-Kubernetes.md
rename to content/zh-cn/blog/_posts/2016-01-00-Simple-Leader-Election-With-Kubernetes.md
diff --git a/content/zh/blog/_posts/2016-01-00-Why-Kubernetes-Doesnt-Use-Libnetwork.md b/content/zh-cn/blog/_posts/2016-01-00-Why-Kubernetes-Doesnt-Use-Libnetwork.md
similarity index 100%
rename from content/zh/blog/_posts/2016-01-00-Why-Kubernetes-Doesnt-Use-Libnetwork.md
rename to content/zh-cn/blog/_posts/2016-01-00-Why-Kubernetes-Doesnt-Use-Libnetwork.md
diff --git a/content/zh/blog/_posts/2016-02-00-Kubecon-Eu-2016-Kubernetes-Community-In.md b/content/zh-cn/blog/_posts/2016-02-00-Kubecon-Eu-2016-Kubernetes-Community-In.md
similarity index 100%
rename from content/zh/blog/_posts/2016-02-00-Kubecon-Eu-2016-Kubernetes-Community-In.md
rename to content/zh-cn/blog/_posts/2016-02-00-Kubecon-Eu-2016-Kubernetes-Community-In.md
diff --git a/content/zh/blog/_posts/2016-02-00-Kubernetes-Community-Meeting-Notes.md b/content/zh-cn/blog/_posts/2016-02-00-Kubernetes-Community-Meeting-Notes.md
similarity index 87%
rename from content/zh/blog/_posts/2016-02-00-Kubernetes-Community-Meeting-Notes.md
rename to content/zh-cn/blog/_posts/2016-02-00-Kubernetes-Community-Meeting-Notes.md
index a9e0f10e4e..7c6544d2ad 100644
--- a/content/zh/blog/_posts/2016-02-00-Kubernetes-Community-Meeting-Notes.md
+++ b/content/zh-cn/blog/_posts/2016-02-00-Kubernetes-Community-Meeting-Notes.md
@@ -4,17 +4,15 @@ date: 2016-02-09
slug: kubernetes-community-meeting-notes
---
-#### 2月4日 - rkt演示(祝贺 1.0 版本, CoreOS!), eBay 将 k8s 放在 Openstack 上并认为 Openstack 在 k8s, SIG 和片状测试激增方面取得了进展。
+#### 2 月 4 日 - rkt 演示(祝贺 1.0 版本,CoreOS!),eBay 将 k8s 放在 Openstack 上并认为 Openstack 在 k8s,SIG 和片状测试激增方面取得了进展。
* 书记员:Rob Hirschfeld
-* 演示视频(20分钟):CoreOS rkt + Kubernetes[Shaya Potter]
- * 期待在未来几个月内看到与rkt和k8s的整合(“rkt-netes”)。 还没有集成到 v1.2版本中。
+* 演示视频(20 分钟):CoreOS rkt + Kubernetes [Shaya Potter]
+ * 期待在未来几个月内看到与rkt和k8s的整合(“rkt-netes”)。 还没有集成到 v1.2 版本中。
* Shaya 做了一个演示(8分钟的会议视频参考)
- * rkt的CLI显示了旋转容器
+ * rkt 的 CLI 显示了旋转容器
* [注意:音频在点数上是乱码]
* 关于 k8s&rkt 整合的讨论
- * 下周 rkt 社区同步:https://groups.google.com/forum/#!topic/rkt-dev/FlwZVIEJGbY
+ * 下周 rkt 社区同步: https://groups.google.com/forum/#!topic/rkt-dev/FlwZVIEJGbY
* Dawn Chen:
* 将 rkt 与 kubernetes 集成的其余问题:1)cadivsor 2) DNS 3)与日志记录相关的错误
* 但是需要在 e2e 测试套件上做更多的工作
@@ -103,13 +101,16 @@ Kubernetes 贡献社区在每周四 10:00 PT 开会,通过视频会议讨论项
-要参与 Kubernetes 社区,请考虑加入我们的[Slack 频道][2],查看 GitHub上的 [Kubernetes 项目][3],或加入[Kubernetes-dev Google 小组][4]。如果你真的很兴奋,你可以完成上述所有工作并加入我们的下一次社区对话-2016年2月11日。请将您自己或您想要了解的主题添加到[议程][5]并通过加入[此组][6]来获取日历邀请。
+要参与 Kubernetes 社区,请考虑加入我们的 [Slack 频道][2],查看 GitHub 上的
+[Kubernetes 项目][3],或加入 [Kubernetes-dev Google 小组][4]。
+如果你真的很兴奋,你可以完成上述所有工作并加入我们的下一次社区对话 - 2016 年 2 月 11 日。
+请将你自己或你想要了解的主题添加到[议程][5]并通过加入[此组][6]来获取日历邀请。
"https://youtu.be/IScpP8Cj0hw?list=PL69nYSiGNLP1pkHsbPjzAewvMgGUpkCnJ"
[1]: https://github.com/kubernetes/kubernetes/pull/19714
-[2]: http://slack.k8s.io/
+[2]: https://slack.k8s.io/
[3]: https://github.com/kubernetes/
[4]: https://groups.google.com/forum/#!forum/kubernetes-dev
[5]: https://docs.google.com/document/d/1VQDIAB0OqiSjIHI8AWMvSdceWhnz56jNpZrLs6o7NJY/edit#
diff --git a/content/zh/blog/_posts/2016-02-00-State-Of-Container-World-January-2016.md b/content/zh-cn/blog/_posts/2016-02-00-State-Of-Container-World-January-2016.md
similarity index 100%
rename from content/zh/blog/_posts/2016-02-00-State-Of-Container-World-January-2016.md
rename to content/zh-cn/blog/_posts/2016-02-00-State-Of-Container-World-January-2016.md
diff --git a/content/zh/blog/_posts/2016-02-00-kubernetes-community-meeting-notes_23.md b/content/zh-cn/blog/_posts/2016-02-00-kubernetes-community-meeting-notes_23.md
similarity index 100%
rename from content/zh/blog/_posts/2016-02-00-kubernetes-community-meeting-notes_23.md
rename to content/zh-cn/blog/_posts/2016-02-00-kubernetes-community-meeting-notes_23.md
diff --git a/content/zh/blog/_posts/2016-04-00-Adding-Support-For-Kubernetes-In-Rancher.md b/content/zh-cn/blog/_posts/2016-04-00-Adding-Support-For-Kubernetes-In-Rancher.md
similarity index 100%
rename from content/zh/blog/_posts/2016-04-00-Adding-Support-For-Kubernetes-In-Rancher.md
rename to content/zh-cn/blog/_posts/2016-04-00-Adding-Support-For-Kubernetes-In-Rancher.md
diff --git a/content/zh/blog/_posts/2016-04-00-Kubernetes-Network-Policy-APIs.md b/content/zh-cn/blog/_posts/2016-04-00-Kubernetes-Network-Policy-APIs.md
similarity index 100%
rename from content/zh/blog/_posts/2016-04-00-Kubernetes-Network-Policy-APIs.md
rename to content/zh-cn/blog/_posts/2016-04-00-Kubernetes-Network-Policy-APIs.md
diff --git a/content/zh/blog/_posts/2016-04-00-Sig-Clusterops-Promote-Operability-And-Interoperability-Of-K8S-Clusters.md b/content/zh-cn/blog/_posts/2016-04-00-Sig-Clusterops-Promote-Operability-And-Interoperability-Of-K8S-Clusters.md
similarity index 100%
rename from content/zh/blog/_posts/2016-04-00-Sig-Clusterops-Promote-Operability-And-Interoperability-Of-K8S-Clusters.md
rename to content/zh-cn/blog/_posts/2016-04-00-Sig-Clusterops-Promote-Operability-And-Interoperability-Of-K8S-Clusters.md
diff --git a/content/zh/blog/_posts/2016-05-00-Coreosfest2016-Kubernetes-Community.md b/content/zh-cn/blog/_posts/2016-05-00-Coreosfest2016-Kubernetes-Community.md
similarity index 100%
rename from content/zh/blog/_posts/2016-05-00-Coreosfest2016-Kubernetes-Community.md
rename to content/zh-cn/blog/_posts/2016-05-00-Coreosfest2016-Kubernetes-Community.md
diff --git a/content/zh/blog/_posts/2016-07-00-Bringing-End-To-End-Kubernetes-Testing-To-Azure-2.md b/content/zh-cn/blog/_posts/2016-07-00-Bringing-End-To-End-Kubernetes-Testing-To-Azure-2.md
similarity index 100%
rename from content/zh/blog/_posts/2016-07-00-Bringing-End-To-End-Kubernetes-Testing-To-Azure-2.md
rename to content/zh-cn/blog/_posts/2016-07-00-Bringing-End-To-End-Kubernetes-Testing-To-Azure-2.md
diff --git a/content/zh/blog/_posts/2016-07-00-Citrix-Netscaler-And-Kubernetes.md b/content/zh-cn/blog/_posts/2016-07-00-Citrix-Netscaler-And-Kubernetes.md
similarity index 100%
rename from content/zh/blog/_posts/2016-07-00-Citrix-Netscaler-And-Kubernetes.md
rename to content/zh-cn/blog/_posts/2016-07-00-Citrix-Netscaler-And-Kubernetes.md
diff --git a/content/zh/blog/_posts/2016-07-00-Dashboard-Web-Interface-For-Kubernetes.md b/content/zh-cn/blog/_posts/2016-07-00-Dashboard-Web-Interface-For-Kubernetes.md
similarity index 100%
rename from content/zh/blog/_posts/2016-07-00-Dashboard-Web-Interface-For-Kubernetes.md
rename to content/zh-cn/blog/_posts/2016-07-00-Dashboard-Web-Interface-For-Kubernetes.md
diff --git a/content/zh/blog/_posts/2016-07-00-Oh-The-Places-You-Will-Go.md b/content/zh-cn/blog/_posts/2016-07-00-Oh-The-Places-You-Will-Go.md
similarity index 100%
rename from content/zh/blog/_posts/2016-07-00-Oh-The-Places-You-Will-Go.md
rename to content/zh-cn/blog/_posts/2016-07-00-Oh-The-Places-You-Will-Go.md
diff --git a/content/zh/blog/_posts/2016-07-00-stateful-applications-in-containers-kubernetes.md b/content/zh-cn/blog/_posts/2016-07-00-stateful-applications-in-containers-kubernetes.md
similarity index 100%
rename from content/zh/blog/_posts/2016-07-00-stateful-applications-in-containers-kubernetes.md
rename to content/zh-cn/blog/_posts/2016-07-00-stateful-applications-in-containers-kubernetes.md
diff --git a/content/zh-cn/blog/_posts/2016-08-00-Sig-Apps-Running-Apps-In-Kubernetes.md b/content/zh-cn/blog/_posts/2016-08-00-Sig-Apps-Running-Apps-In-Kubernetes.md
new file mode 100644
index 0000000000..10934bd066
--- /dev/null
+++ b/content/zh-cn/blog/_posts/2016-08-00-Sig-Apps-Running-Apps-In-Kubernetes.md
@@ -0,0 +1,105 @@
+---
+layout: blog
+title: 'SIG Apps: 为 Kubernetes 构建应用并在 Kubernetes 中进行运维'
+date: 2016-08-16
+slug: sig-apps-running-apps-in-kubernetes
+---
+
+
+
+
+**编者注**:这篇文章由 Kubernetes SIG-Apps 团队撰写,分享他们如何关注在 Kubernetes
+中运行应用的开发者和 devops 经验。
+
+Kubernetes 是容器化应用程序的出色管理者。因此,[众多](https://kubernetes.io/blog/2016/02/sharethis-kubernetes-in-production)
+[公司](https://blog.box.com/blog/kubernetes-box-microservices-maximum-velocity/)
+[已经](http://techblog.yahoo.co.jp/infrastructure/os_n_k8s/)
+[开始](http://www.nextplatform.com/2015/11/12/inside-ebays-shift-to-kubernetes-and-containers-atop-openstack/) 在 Kubernetes 中运行应用程序。
+
+Kubernetes 特殊兴趣小组 ([SIGs](https://github.com/kubernetes/community/blob/master/README.md#special-interest-groups-sig))
+自 1.0 版本开始就一直致力于支持开发者和运营商社区。围绕网络、存储、扩展和其他运营领域组织的人员。
+
+随着 Kubernetes 的兴起,对工具、最佳实践以及围绕构建和运营云原生应用程序的讨论的需求也随之增加。为了满足这一需求,
+Kubernetes [SIG Apps](https://github.com/kubernetes/community/tree/master/sig-apps) 应运而生。
+
+SIG Apps 为公司和个人提供以下支持:
+
+
+
+- 查看和分享正在构建的、为应用操作人员赋能的工具的演示
+- 了解和讨论应用运营人员的需求
+- 组织各方努力改善体验
+
+
+
+自从 SIG Apps 成立以来,我们已经进行了项目演示,例如 [KubeFuse](https://github.com/opencredo/kubefuse)、
+[KPM](https://github.com/kubespray/kpm),和 [StackSmith](https://stacksmith.bitnami.com/)。
+我们还对那些负责 Kubernetes 中应用运维的人进行了调查。
+
+从调查结果中,我们学到了很多东西,包括:
+
+
+
+- 81% 的受访者希望采用某种形式的自动扩缩
+- 为了存储秘密信息,47% 的受访者使用内置 Secret。目前这些资料并未实现静态加密。
+ (如果你需要关于加密的帮助,请参见[问题](https://github.com/kubernetes/kubernetes/issues/10439)。)
+- 响应最多的问题与第三方工具和调试有关
+- 对于管理应用程序的第三方工具,没有明确的赢家。有各种各样的做法
+- 总体上对缺乏有用文件有较多抱怨。(请在[此处](https://github.com/kubernetes/kubernetes.github.io)帮助提交文档。)
+- 数据量很大。很多回答是可选的,所以我们很惊讶所有候选人的所有问题中有 935 个都被填写了。
+ 如果你想亲自查看数据,可以[在线](https://docs.google.com/spreadsheets/d/15SUL7QTpR4Flrp5eJ5TR8A5ZAFwbchfX2QL4MEoJFQ8/edit?usp=sharing)查看。
+
+
+
+就应用运维而言,仍然有很多东西需要解决和共享。如果你对运行应用程序有看法或者有改善体验的工具,
+或者只是想潜伏并了解状况,请加入我们。
+
+
+
+- 在 SIG-Apps [Slack 频道](https://kubernetes.slack.com/messages/sig-apps)与我们聊天
+- 发送邮件到 SIG-Apps [邮件列表](https://groups.google.com/forum/#!forum/kubernetes-sig-apps)
+- 参加我们的公开会议:太平洋时间每周三上午 9 点,[详情点击此处](https://github.com/kubernetes/community/blob/master/sig-apps/README.md#meeting)
+
+
+_--Matt Farina ,Hewlett Packard Enterprise 首席工程师_
\ No newline at end of file
diff --git a/content/zh/blog/_posts/2016-08-00-Stateful-Applications-Using-Kubernetes-Datera.md b/content/zh-cn/blog/_posts/2016-08-00-Stateful-Applications-Using-Kubernetes-Datera.md
similarity index 100%
rename from content/zh/blog/_posts/2016-08-00-Stateful-Applications-Using-Kubernetes-Datera.md
rename to content/zh-cn/blog/_posts/2016-08-00-Stateful-Applications-Using-Kubernetes-Datera.md
diff --git a/content/zh/blog/_posts/2017-10-00-Five-Days-Of-Kubernetes-18.md b/content/zh-cn/blog/_posts/2017-10-00-Five-Days-Of-Kubernetes-18.md
similarity index 100%
rename from content/zh/blog/_posts/2017-10-00-Five-Days-Of-Kubernetes-18.md
rename to content/zh-cn/blog/_posts/2017-10-00-Five-Days-Of-Kubernetes-18.md
diff --git a/content/zh/blog/_posts/2017-10-00-Kubernetes-Community-Steering-Committee-Election-Results.md b/content/zh-cn/blog/_posts/2017-10-00-Kubernetes-Community-Steering-Committee-Election-Results.md
similarity index 100%
rename from content/zh/blog/_posts/2017-10-00-Kubernetes-Community-Steering-Committee-Election-Results.md
rename to content/zh-cn/blog/_posts/2017-10-00-Kubernetes-Community-Steering-Committee-Election-Results.md
diff --git a/content/zh/blog/_posts/2017-11-00-Autoscaling-In-Kubernetes.md b/content/zh-cn/blog/_posts/2017-11-00-Autoscaling-In-Kubernetes.md
similarity index 100%
rename from content/zh/blog/_posts/2017-11-00-Autoscaling-In-Kubernetes.md
rename to content/zh-cn/blog/_posts/2017-11-00-Autoscaling-In-Kubernetes.md
diff --git a/content/zh/blog/_posts/2018-01-00-Kubernetes-V19-Beta-Windows-Support.md b/content/zh-cn/blog/_posts/2018-01-00-Kubernetes-V19-Beta-Windows-Support.md
similarity index 100%
rename from content/zh/blog/_posts/2018-01-00-Kubernetes-V19-Beta-Windows-Support.md
rename to content/zh-cn/blog/_posts/2018-01-00-Kubernetes-V19-Beta-Windows-Support.md
diff --git a/content/zh/blog/_posts/2018-03-00-Principles-Of-Container-App-Design.md b/content/zh-cn/blog/_posts/2018-03-00-Principles-Of-Container-App-Design.md
similarity index 100%
rename from content/zh/blog/_posts/2018-03-00-Principles-Of-Container-App-Design.md
rename to content/zh-cn/blog/_posts/2018-03-00-Principles-Of-Container-App-Design.md
diff --git a/content/zh/blog/_posts/2018-04-25-open-source-charts-2017.md b/content/zh-cn/blog/_posts/2018-04-25-open-source-charts-2017.md
similarity index 100%
rename from content/zh/blog/_posts/2018-04-25-open-source-charts-2017.md
rename to content/zh-cn/blog/_posts/2018-04-25-open-source-charts-2017.md
diff --git a/content/zh/blog/_posts/2018-05-01-developing-on-kubernetes.md b/content/zh-cn/blog/_posts/2018-05-01-developing-on-kubernetes.md
similarity index 100%
rename from content/zh/blog/_posts/2018-05-01-developing-on-kubernetes.md
rename to content/zh-cn/blog/_posts/2018-05-01-developing-on-kubernetes.md
diff --git a/content/zh/blog/_posts/2018-05-30-say-hello-to-discuss-kubernetes.md b/content/zh-cn/blog/_posts/2018-05-30-say-hello-to-discuss-kubernetes.md
similarity index 100%
rename from content/zh/blog/_posts/2018-05-30-say-hello-to-discuss-kubernetes.md
rename to content/zh-cn/blog/_posts/2018-05-30-say-hello-to-discuss-kubernetes.md
diff --git a/content/zh/blog/_posts/2018-06-06-4-years-of-k8s.md b/content/zh-cn/blog/_posts/2018-06-06-4-years-of-k8s.md
similarity index 100%
rename from content/zh/blog/_posts/2018-06-06-4-years-of-k8s.md
rename to content/zh-cn/blog/_posts/2018-06-06-4-years-of-k8s.md
diff --git a/content/zh/blog/_posts/2018-06-07-dynamic-ingress-kubernetes.md b/content/zh-cn/blog/_posts/2018-06-07-dynamic-ingress-kubernetes.md
similarity index 100%
rename from content/zh/blog/_posts/2018-06-07-dynamic-ingress-kubernetes.md
rename to content/zh-cn/blog/_posts/2018-06-07-dynamic-ingress-kubernetes.md
diff --git a/content/zh/blog/_posts/2018-06-28-Airflow-Kubernetes-Operator.md b/content/zh-cn/blog/_posts/2018-06-28-Airflow-Kubernetes-Operator.md
similarity index 100%
rename from content/zh/blog/_posts/2018-06-28-Airflow-Kubernetes-Operator.md
rename to content/zh-cn/blog/_posts/2018-06-28-Airflow-Kubernetes-Operator.md
diff --git a/content/zh/blog/_posts/2018-07-09-IPVS-In-Cluster-Load-Balancing.md b/content/zh-cn/blog/_posts/2018-07-09-IPVS-In-Cluster-Load-Balancing.md
similarity index 100%
rename from content/zh/blog/_posts/2018-07-09-IPVS-In-Cluster-Load-Balancing.md
rename to content/zh-cn/blog/_posts/2018-07-09-IPVS-In-Cluster-Load-Balancing.md
diff --git a/content/zh/blog/_posts/2018-07-10-coredns-ga.md b/content/zh-cn/blog/_posts/2018-07-10-coredns-ga.md
similarity index 100%
rename from content/zh/blog/_posts/2018-07-10-coredns-ga.md
rename to content/zh-cn/blog/_posts/2018-07-10-coredns-ga.md
diff --git a/content/zh/blog/_posts/2018-07-11-dynamic-kubelet-configuration.md b/content/zh-cn/blog/_posts/2018-07-11-dynamic-kubelet-configuration.md
similarity index 100%
rename from content/zh/blog/_posts/2018-07-11-dynamic-kubelet-configuration.md
rename to content/zh-cn/blog/_posts/2018-07-11-dynamic-kubelet-configuration.md
diff --git a/content/zh/blog/_posts/2018-08-02-dynamically-expand-volume-csi.md b/content/zh-cn/blog/_posts/2018-08-02-dynamically-expand-volume-csi.md
similarity index 99%
rename from content/zh/blog/_posts/2018-08-02-dynamically-expand-volume-csi.md
rename to content/zh-cn/blog/_posts/2018-08-02-dynamically-expand-volume-csi.md
index 755239e9eb..690935b5a0 100644
--- a/content/zh/blog/_posts/2018-08-02-dynamically-expand-volume-csi.md
+++ b/content/zh-cn/blog/_posts/2018-08-02-dynamically-expand-volume-csi.md
@@ -5,11 +5,9 @@ date: 2018-08-02
---
-更多详细信息,请访问:https://github.com/container-storage-interface/spec/blob/master/spec.md
+更多详细信息,请访问: https://github.com/container-storage-interface/spec/blob/master/spec.md
-通过提供拓扑感知动态卷供应功能,具有持久卷的多区域集群体验在 Kubernetes 1.12 中得到了改进。此功能使得 Kubernetes 在动态供应卷时能做出明智的决策,方法是从调度器获得为 Pod 提供数据卷的最佳位置。在多区域集群环境,这意味着数据卷能够在满足你的 Pod 运行需要的合适的区域被供应,从而允许您跨故障域轻松部署和扩展有状态工作负载,从而提供高可用性和容错能力。
+通过提供拓扑感知动态卷供应功能,具有持久卷的多区域集群体验在 Kubernetes 1.12
+中得到了改进。此功能使得 Kubernetes 在动态供应卷时能做出明智的决策,方法是从调度器获得为
+Pod 提供数据卷的最佳位置。在多区域集群环境,这意味着数据卷能够在满足你的 Pod
+运行需要的合适的区域被供应,从而允许你跨故障域轻松部署和扩展有状态工作负载,从而提供高可用性和容错能力。
-在此功能被提供之前,在多区域集群中使用区域化的持久磁盘(例如 AWS ElasticBlockStore,Azure Disk,GCE PersistentDisk)运行有状态工作负载存在许多挑战。动态供应独立于 Pod 调度处理,这意味着只要您创建了一个 PersistentVolumeClaim(PVC),一个卷就会被供应。这也意味着供应者不知道哪些 Pod 正在使用该卷,也不清楚任何可能影响调度的 Pod 约束。
+在此功能被提供之前,在多区域集群中使用区域化的持久磁盘(例如 AWS ElasticBlockStore、
+Azure Disk、GCE PersistentDisk)运行有状态工作负载存在许多挑战。动态供应独立于 Pod
+调度处理,这意味着只要你创建了一个 PersistentVolumeClaim(PVC),一个卷就会被供应。
+这也意味着供应者不知道哪些 Pod 正在使用该卷,也不清楚任何可能影响调度的 Pod 约束。
* AWS EBS
* Azure Disk
-* GCE PD (包括 Regional PD)
+* GCE PD(包括 Regional PD)
* CSI(alpha) - 目前只有 GCE PD CSI 驱动实现了拓扑支持
虽然最初支持的插件集都是基于区域的,但我们设计此功能时遵循 Kubernetes 跨环境可移植性的原则。
拓扑规范是通用的,并使用类似于基于标签的规范,如 Pod nodeSelectors 和 nodeAffinity。
-该机制允许您定义自己的拓扑边界,例如内部部署集群中的机架,而无需修改调度程序以了解这些自定义拓扑。
+该机制允许你定义自己的拓扑边界,例如内部部署集群中的机架,而无需修改调度程序以了解这些自定义拓扑。
此外,拓扑信息是从 Pod 规范中抽象出来的,因此 Pod 不需要了解底层存储系统的拓扑特征。
-这意味着您可以在多个集群、环境和存储系统中使用相同的 Pod 规范。
+这意味着你可以在多个集群、环境和存储系统中使用相同的 Pod 规范。
-要启用此功能,您需要做的就是创建一个将 `volumeBindingMode` 设置为 `WaitForFirstConsumer` 的 StorageClass:
+要启用此功能,你需要做的就是创建一个将 `volumeBindingMode` 设置为 `WaitForFirstConsumer` 的 StorageClass:
```
kind: StorageClass
@@ -210,7 +214,7 @@ spec:
-之后,您可以看到根据 Pod 设置的策略在区域中配置卷:
+之后,你可以看到根据 Pod 设置的策略在区域中配置卷:
```
$ kubectl get pv -o=jsonpath='{range .items[*]}{.spec.claimRef.name}{"\t"}{.metadata.labels.failure\-domain\.beta\.kubernetes\.io/zone}{"\n"}{end}'
@@ -228,12 +232,13 @@ logs-web-1 us-central1-a
-有关拓扑感知动态供应功能的官方文档可在此处获取:https://kubernetes.io/docs/concepts/storage/storage-classes/#volume-binding-mode
+有关拓扑感知动态供应功能的官方文档可在此处获取:
+https://kubernetes.io/docs/concepts/storage/storage-classes/#volume-binding-mode
-有关 CSI 驱动程序的文档,请访问:https://kubernetes-csi.github.io/docs/
+有关 CSI 驱动程序的文档,请访问: https://kubernetes-csi.github.io/docs/
-如果您对此功能有反馈意见或有兴趣参与设计和开发,请加入 [Kubernetes 存储特别兴趣小组](https://github.com/kubernetes/community/tree/master/sig-storage)(SIG)。我们正在快速成长,并始终欢迎新的贡献者。
+如果你对此功能有反馈意见或有兴趣参与设计和开发,请加入
+[Kubernetes 存储特别兴趣小组](https://github.com/kubernetes/community/tree/master/sig-storage)(SIG)。
+我们正在快速成长,并始终欢迎新的贡献者。
-特别感谢帮助推出此功能的所有贡献者,包括 Cheng Xing ([verult](https://github.com/verult))、Chuqiang Li ([lichuqiang](https://github.com/lichuqiang))、David Zhu ([davidz627](https://github.com/davidz627))、Deep Debroy ([ddebroy](https://github.com/ddebroy))、Jan Šafránek ([jsafrane](https://github.com/jsafrane))、Jordan Liggitt ([liggitt](https://github.com/liggitt))、Michelle Au ([msau42](https://github.com/msau42))、Pengfei Ni ([feiskyer](https://github.com/feiskyer))、Saad Ali ([saad-ali](https://github.com/saad-ali))、Tim Hockin ([thockin](https://github.com/thockin)),以及 Yecheng Fu ([cofyc](https://github.com/cofyc))。
+特别感谢帮助推出此功能的所有贡献者,包括 Cheng Xing ([verult](https://github.com/verult))、
+Chuqiang Li ([lichuqiang](https://github.com/lichuqiang))、David Zhu ([davidz627](https://github.com/davidz627))、
+Deep Debroy ([ddebroy](https://github.com/ddebroy))、Jan Šafránek ([jsafrane](https://github.com/jsafrane))、
+Jordan Liggitt ([liggitt](https://github.com/liggitt))、Michelle Au ([msau42](https://github.com/msau42))、
+Pengfei Ni ([feiskyer](https://github.com/feiskyer))、Saad Ali ([saad-ali](https://github.com/saad-ali))、
+Tim Hockin ([thockin](https://github.com/thockin)),以及 Yecheng Fu ([cofyc](https://github.com/cofyc))。
diff --git a/content/zh/blog/_posts/2018-10-15-steering-election-results.md b/content/zh-cn/blog/_posts/2018-10-15-steering-election-results.md
similarity index 100%
rename from content/zh/blog/_posts/2018-10-15-steering-election-results.md
rename to content/zh-cn/blog/_posts/2018-10-15-steering-election-results.md
diff --git a/content/zh/blog/_posts/2018-10-16-kubernetes-2018-north-american-contributor-summit.md b/content/zh-cn/blog/_posts/2018-10-16-kubernetes-2018-north-american-contributor-summit.md
similarity index 100%
rename from content/zh/blog/_posts/2018-10-16-kubernetes-2018-north-american-contributor-summit.md
rename to content/zh-cn/blog/_posts/2018-10-16-kubernetes-2018-north-american-contributor-summit.md
diff --git a/content/zh/blog/_posts/2018-11-08-kubernetes-docs-update-i18n.md b/content/zh-cn/blog/_posts/2018-11-08-kubernetes-docs-update-i18n.md
similarity index 100%
rename from content/zh/blog/_posts/2018-11-08-kubernetes-docs-update-i18n.md
rename to content/zh-cn/blog/_posts/2018-11-08-kubernetes-docs-update-i18n.md
diff --git a/content/zh/blog/_posts/2018-12-05-new-contributor-shanghai.md b/content/zh-cn/blog/_posts/2018-12-05-new-contributor-shanghai.md
similarity index 100%
rename from content/zh/blog/_posts/2018-12-05-new-contributor-shanghai.md
rename to content/zh-cn/blog/_posts/2018-12-05-new-contributor-shanghai.md
diff --git a/content/zh/blog/_posts/2019-03-07-raw-block-volume-support-to-beta.md b/content/zh-cn/blog/_posts/2019-03-07-raw-block-volume-support-to-beta.md
similarity index 100%
rename from content/zh/blog/_posts/2019-03-07-raw-block-volume-support-to-beta.md
rename to content/zh-cn/blog/_posts/2019-03-07-raw-block-volume-support-to-beta.md
diff --git a/content/zh/blog/_posts/2019-03-28-PID-Limiting.md b/content/zh-cn/blog/_posts/2019-03-28-PID-Limiting.md
similarity index 100%
rename from content/zh/blog/_posts/2019-03-28-PID-Limiting.md
rename to content/zh-cn/blog/_posts/2019-03-28-PID-Limiting.md
diff --git a/content/zh/blog/_posts/2019-04-26-latest-on-localization.md b/content/zh-cn/blog/_posts/2019-04-26-latest-on-localization.md
similarity index 100%
rename from content/zh/blog/_posts/2019-04-26-latest-on-localization.md
rename to content/zh-cn/blog/_posts/2019-04-26-latest-on-localization.md
diff --git a/content/zh/blog/_posts/2019-05-14-expanding-our-contributor-workshops.md b/content/zh-cn/blog/_posts/2019-05-14-expanding-our-contributor-workshops.md
similarity index 100%
rename from content/zh/blog/_posts/2019-05-14-expanding-our-contributor-workshops.md
rename to content/zh-cn/blog/_posts/2019-05-14-expanding-our-contributor-workshops.md
diff --git a/content/zh/blog/_posts/2019-06-12-contributor-summit-shanghai.md b/content/zh-cn/blog/_posts/2019-06-12-contributor-summit-shanghai.md
similarity index 100%
rename from content/zh/blog/_posts/2019-06-12-contributor-summit-shanghai.md
rename to content/zh-cn/blog/_posts/2019-06-12-contributor-summit-shanghai.md
diff --git a/content/zh/blog/_posts/2019-08-06-OPA-Gatekeeper-Policy-and-Governance-for-Kubernetes.md b/content/zh-cn/blog/_posts/2019-08-06-OPA-Gatekeeper-Policy-and-Governance-for-Kubernetes.md
similarity index 100%
rename from content/zh/blog/_posts/2019-08-06-OPA-Gatekeeper-Policy-and-Governance-for-Kubernetes.md
rename to content/zh-cn/blog/_posts/2019-08-06-OPA-Gatekeeper-Policy-and-Governance-for-Kubernetes.md
diff --git a/content/zh/blog/_posts/2019-09-24-san-diego-contributor-summit.md b/content/zh-cn/blog/_posts/2019-09-24-san-diego-contributor-summit.md
similarity index 100%
rename from content/zh/blog/_posts/2019-09-24-san-diego-contributor-summit.md
rename to content/zh-cn/blog/_posts/2019-09-24-san-diego-contributor-summit.md
diff --git a/content/zh/blog/_posts/2019-10-03-2019-Steering-Committee-Election-Results.md b/content/zh-cn/blog/_posts/2019-10-03-2019-Steering-Committee-Election-Results.md
similarity index 100%
rename from content/zh/blog/_posts/2019-10-03-2019-Steering-Committee-Election-Results.md
rename to content/zh-cn/blog/_posts/2019-10-03-2019-Steering-Committee-Election-Results.md
diff --git a/content/zh/blog/_posts/2019-10-10-contributor-summit-san-diego-schedule.md b/content/zh-cn/blog/_posts/2019-10-10-contributor-summit-san-diego-schedule.md
similarity index 100%
rename from content/zh/blog/_posts/2019-10-10-contributor-summit-san-diego-schedule.md
rename to content/zh-cn/blog/_posts/2019-10-10-contributor-summit-san-diego-schedule.md
diff --git a/content/zh/blog/_posts/2019-10-29-2019-sig-docs-survey.md b/content/zh-cn/blog/_posts/2019-10-29-2019-sig-docs-survey.md
similarity index 100%
rename from content/zh/blog/_posts/2019-10-29-2019-sig-docs-survey.md
rename to content/zh-cn/blog/_posts/2019-10-29-2019-sig-docs-survey.md
diff --git a/content/zh/blog/_posts/2019-11-05-kubernetes-with-microk8s.md b/content/zh-cn/blog/_posts/2019-11-05-kubernetes-with-microk8s.md
similarity index 100%
rename from content/zh/blog/_posts/2019-11-05-kubernetes-with-microk8s.md
rename to content/zh-cn/blog/_posts/2019-11-05-kubernetes-with-microk8s.md
diff --git a/content/zh/blog/_posts/2019-11-26-cloud-native-java-controller-sdk.md b/content/zh-cn/blog/_posts/2019-11-26-cloud-native-java-controller-sdk.md
similarity index 100%
rename from content/zh/blog/_posts/2019-11-26-cloud-native-java-controller-sdk.md
rename to content/zh-cn/blog/_posts/2019-11-26-cloud-native-java-controller-sdk.md
diff --git a/content/zh/blog/_posts/2019-12-09-kubernetes-1.17-release-announcement.md b/content/zh-cn/blog/_posts/2019-12-09-kubernetes-1.17-release-announcement.md
similarity index 100%
rename from content/zh/blog/_posts/2019-12-09-kubernetes-1.17-release-announcement.md
rename to content/zh-cn/blog/_posts/2019-12-09-kubernetes-1.17-release-announcement.md
diff --git a/content/zh/blog/_posts/2020-01-15-Kubernetes-on-MIPS.md b/content/zh-cn/blog/_posts/2020-01-15-Kubernetes-on-MIPS.md
similarity index 100%
rename from content/zh/blog/_posts/2020-01-15-Kubernetes-on-MIPS.md
rename to content/zh-cn/blog/_posts/2020-01-15-Kubernetes-on-MIPS.md
diff --git a/content/zh/blog/_posts/2020-03-25-kubernetes-1.18-release-announcement.md b/content/zh-cn/blog/_posts/2020-03-25-kubernetes-1.18-release-announcement.md
similarity index 70%
rename from content/zh/blog/_posts/2020-03-25-kubernetes-1.18-release-announcement.md
rename to content/zh-cn/blog/_posts/2020-03-25-kubernetes-1.18-release-announcement.md
index b191daab33..b263469049 100644
--- a/content/zh/blog/_posts/2020-03-25-kubernetes-1.18-release-announcement.md
+++ b/content/zh-cn/blog/_posts/2020-03-25-kubernetes-1.18-release-announcement.md
@@ -14,16 +14,21 @@ evergreen: true
-我们很高兴宣布 Kubernetes 1.18 版本的交付,这是我们 2020 年的第一版! Kubernetes 1.18 包含 38 个增强功能:15 项增强功能已转为稳定版,11 项增强功能处于 beta 阶段,12 项增强功能处于 alpha 阶段。
+我们很高兴宣布 Kubernetes 1.18 版本的交付,这是我们 2020 年的第一版!Kubernetes
+1.18 包含 38 个增强功能:15 项增强功能已转为稳定版,11 项增强功能处于 beta
+阶段,12 项增强功能处于 alpha 阶段。
-Kubernetes 1.18 是一个近乎 “完美” 的版本。 为了改善 beta 和稳定的特性,已进行了大量工作,以确保用户获得更好的体验。 我们在增强现有功能的同时也增加了令人兴奋的新特性,这些有望进一步增强用户体验。
+Kubernetes 1.18 是一个近乎 “完美” 的版本。为了改善 beta 和稳定的特性,已进行了大量工作,
+以确保用户获得更好的体验。我们在增强现有功能的同时也增加了令人兴奋的新特性,这些有望进一步增强用户体验。
+
-对 alpha,beta 和稳定版进行几乎同等程度的增强是一项伟大的成就。 它展现了社区在提高 Kubernetes 的可靠性以及继续扩展其现有功能方面所做的巨大努力。
+对 alpha、beta 和稳定版进行几乎同等程度的增强是一项伟大的成就。它展现了社区在提高
+Kubernetes 的可靠性以及继续扩展其现有功能方面所做的巨大努力。
-Kubernetes 在 1.18 版中的 Beta 阶段功能 [拓扑管理器特性](https://github.com/nolancon/website/blob/f4200307260ea3234540ef13ed80de325e1a7267/content/en/docs/tasks/administer-cluster/topology-manager.md) 启用 CPU 和设备(例如 SR-IOV VF)的 NUMA 对齐,这将使您的工作负载在针对低延迟而优化的环境中运行。在引入拓扑管理器之前,CPU 和设备管理器将做出彼此独立的资源分配决策。 这可能会导致在多处理器系统上非预期的资源分配结果,从而导致对延迟敏感的应用程序的性能下降。
+Kubernetes 在 1.18 版中的 Beta 阶段功能[拓扑管理器特性](https://github.com/nolancon/website/blob/f4200307260ea3234540ef13ed80de325e1a7267/content/en/docs/tasks/administer-cluster/topology-manager.md)启用
+CPU 和设备(例如 SR-IOV VF)的 NUMA 对齐,这将使你的工作负载在针对低延迟而优化的环境中运行。
+在引入拓扑管理器之前,CPU 和设备管理器将做出彼此独立的资源分配决策。
+这可能会导致在多处理器系统上非预期的资源分配结果,从而导致对延迟敏感的应用程序的性能下降。
-### Serverside Apply 推出Beta 2
+### Serverside Apply 推出 Beta 2
-Serverside Apply 在1.16 中进入 Beta 阶段,但现在在 1.18 中进入了第二个 Beta 阶段。 这个新版本将跟踪和管理所有新 Kubernetes 对象的字段更改,从而使您知道什么更改了资源以及何时发生了更改。
+Serverside Apply 在1.16 中进入 Beta 阶段,但现在在 1.18 中进入了第二个 Beta 阶段。
+这个新版本将跟踪和管理所有新 Kubernetes 对象的字段更改,从而使你知道什么更改了资源以及何时发生了更改。
-在 Kubernetes 1.18 中,Ingress 有两个重要的补充:一个新的 `pathType` 字段和一个新的 `IngressClass` 资源。`pathType` 字段允许指定路径的匹配方式。 除了默认的`ImplementationSpecific`类型外,还有新的 `Exact`和`Prefix` 路径类型。
+在 Kubernetes 1.18 中,Ingress 有两个重要的补充:一个新的 `pathType` 字段和一个新的
+`IngressClass` 资源。`pathType` 字段允许指定路径的匹配方式。除了默认的
+`ImplementationSpecific` 类型外,还有新的 `Exact` 和 `Prefix` 路径类型。
-`IngressClass` 资源用于描述 Kubernetes 集群中 Ingress 的类型。 Ingress 对象可以通过在Ingress 资源类型上使用新的`ingressClassName` 字段来指定与它们关联的类。 这个新的资源和字段替换了不再建议使用的 `kubernetes.io/ingress.class` 注解。
+`IngressClass` 资源用于描述 Kubernetes 集群中 Ingress 的类型。Ingress 对象可以通过在
+Ingress 资源类型上使用新的 `ingressClassName` 字段来指定与它们关联的类。
+这个新的资源和字段替换了不再建议使用的 `kubernetes.io/ingress.class` 注解。
-SIG-CLI 一直在争论着调试工具的必要性。随着 [临时容器](https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/) 的发展,我们如何使用基于 `kubectl exec` 的工具来支持开发人员的必要性变得越来越明显。 [`kubectl alpha debug` 命令](https://github.com/kubernetes/enhancements/blob/master/keps/sig-cli/20190805-kubectl-debug.md) 的增加,(由于是 alpha 阶段,非常欢迎您反馈意见),使开发人员可以轻松地在集群中调试 Pod。我们认为这个功能的价值非常高。 此命令允许创建一个临时容器,该容器在要尝试检查的 Pod 旁边运行,并且还附加到控制台以进行交互式故障排除。
+SIG-CLI 一直在争论着调试工具的必要性。随着[临时容器](https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/)的发展,
+我们如何使用基于 `kubectl exec` 的工具来支持开发人员的必要性变得越来越明显。
+[`kubectl alpha debug` 命令](https://github.com/kubernetes/enhancements/blob/master/keps/sig-cli/20190805-kubectl-debug.md)的增加,
+(由于是 alpha 阶段,非常欢迎你反馈意见),使开发人员可以轻松地在集群中调试 Pod。
+我们认为这个功能的价值非常高。此命令允许创建一个临时容器,该容器在要尝试检查的
+Pod 旁边运行,并且还附加到控制台以进行交互式故障排除。
-用于 Windows 的 CSI 代理的 Alpha 版本随 Kubernetes 1.18 一起发布。 CSI 代理通过允许Windows 中的容器执行特权存储操作来启用 Windows 上的 CSI 驱动程序。
+用于 Windows 的 CSI 代理的 Alpha 版本随 Kubernetes 1.18 一起发布。CSI 代理通过允许
+Windows 中的容器执行特权存储操作来启用 Windows 上的 CSI 驱动程序。
-在我们的 [发布文档](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.18.md)中查看 Kubernetes 1.18 发行版的完整详细信息。
+在我们的[发布文档](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.18.md)中查看
+Kubernetes 1.18 发行版的完整详细信息。
-Kubernetes 1.18 可以在 [GitHub](https://github.com/kubernetes/kubernetes/releases/tag/v1.18.0) 上下载。 要开始使用Kubernetes,请查看这些 [交互教程](https://kubernetes.io/docs/tutorials/) 或通过[kind](https://kind.sigs.k8s.io/) 使用 Docker 容器运行本地 kubernetes 集群。您还可以使用[kubeadm](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/)轻松安装 1.18。
+Kubernetes 1.18 可以在 [GitHub](https://github.com/kubernetes/kubernetes/releases/tag/v1.18.0)
+上下载。要开始使用 Kubernetes,请查看这些[交互教程](https://kubernetes.io/docs/tutorials/)或通过
+[kind](https://kind.sigs.k8s.io/) 使用 Docker 容器运行本地 kubernetes 集群。你还可以使用
+[kubeadm](https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/) 轻松安装 1.18。
-通过数百位贡献了技术和非技术内容的个人的努力,使本次发行成为可能。 特别感谢由 Searchable AI 的网站可靠性工程师 Jorge Alarcon Ochoa 领导的[发布团队](https://github.com/kubernetes/sig-release/blob/master/releases/release-1.18/release_team.md)。 34 位发布团队成员协调了发布的各个方面,从文档到测试、验证和功能完整性。
+通过数百位贡献了技术和非技术内容的个人的努力,使本次发行成为可能。
+特别感谢由 Searchable AI 的网站可靠性工程师 Jorge Alarcon Ochoa
+领导的[发布团队](https://github.com/kubernetes/sig-release/blob/master/releases/release-1.18/release_team.md)。
+34 位发布团队成员协调了发布的各个方面,从文档到测试、验证和功能完整性。
-随着 Kubernetes 社区的发展壮大,我们的发布过程很好地展示了开源软件开发中的协作。 Kubernetes 继续快速获取新用户。 这种增长创造了一个积极的反馈回路,其中有更多的贡献者提交了代码,从而创建了更加活跃的生态系统。 迄今为止,Kubernetes 已有 [40,000 独立贡献者](https://k8s.devstats.cncf.io/d/24/overall-project-statistics?orgId=1) 和一个超过3000人的活跃社区。
+随着 Kubernetes 社区的发展壮大,我们的发布过程很好地展示了开源软件开发中的协作。
+Kubernetes 继续快速获取新用户。这种增长创造了一个积极的反馈回路,
+其中有更多的贡献者提交了代码,从而创建了更加活跃的生态系统。迄今为止,Kubernetes 已有
+[40,000 独立贡献者](https://k8s.devstats.cncf.io/d/24/overall-project-statistics?orgId=1)和一个超过 3000 人的活跃社区。
-LHC 是世界上最大,功能最强大的粒子加速器。它是由来自世界各地成千上万科学家合作的结果,所有这些合作都是为了促进科学的发展。以类似的方式,Kubernetes 已经成为一个聚集了来自数百个组织的数千名贡献者–所有人都朝着在各个方面改善云计算的相同目标努力的项目! 发布名称“ A Bit Quarky” 的意思是提醒我们,非常规的想法可以带来巨大的变化,对开放性保持开放态度将有助于我们进行创新。
+LHC 是世界上最大,功能最强大的粒子加速器。它是由来自世界各地成千上万科学家合作的结果,
+所有这些合作都是为了促进科学的发展。以类似的方式,Kubernetes
+已经成为一个聚集了来自数百个组织的数千名贡献者–所有人都朝着在各个方面改善云计算的相同目标努力的项目!
+发布名称 “A Bit Quarky” 的意思是提醒我们,非常规的想法可以带来巨大的变化,对开放性保持开放态度将有助于我们进行创新。
-Maru Lango 是目前居住在墨西哥城的设计师。她的专长是产品设计,她还喜欢使用 CSS + JS 进行品牌、插图和视觉实验,为技术和设计社区的多样性做贡献。您可能会在大多数社交媒体上以 @marulango 的身份找到她,或查看她的网站: https://marulango.com
+Maru Lango 是目前居住在墨西哥城的设计师。她的专长是产品设计,她还喜欢使用 CSS + JS
+进行品牌、插图和视觉实验,为技术和设计社区的多样性做贡献。你可能会在大多数社交媒体上以
+@marulango 的身份找到她,或查看她的网站: https://marulango.com
-- 爱立信正在使用 Kubernetes 和其他云原生技术来交付[高标准的 5G 网络](https://www.cncf.io/case-study/ericsson/),这可以在 CI/CD 上节省多达 90% 的支出。
-- Zendesk 正在使用 Kubernetes [运行其现有应用程序的约 70%](https://www.cncf.io/case-study/zendesk/)。它还正在使所构建的所有新应用都可以在 Kubernetes 上运行,从而节省时间、提高灵活性并加快其应用程序开发的速度。
-- LifeMiles 因迁移到 Kubernetes 而[降低了 50% 的基础设施开支](https://www.cncf.io/case-study/lifemiles/)。Kubernetes 还使他们可以将其可用资源容量增加一倍。
+- 爱立信正在使用 Kubernetes 和其他云原生技术来交付[高标准的 5G 网络](https://www.cncf.io/case-study/ericsson/),
+ 这可以在 CI/CD 上节省多达 90% 的支出。
+- Zendesk 正在使用 Kubernetes [运行其现有应用程序的约 70%](https://www.cncf.io/case-study/zendesk/)。
+ 它还正在使所构建的所有新应用都可以在 Kubernetes 上运行,从而节省时间、提高灵活性并加快其应用程序开发的速度。
+- LifeMiles 因迁移到 Kubernetes 而[降低了 50% 的基础设施开支](https://www.cncf.io/case-study/lifemiles/)。
+ Kubernetes 还使他们可以将其可用资源容量增加一倍。
-- CNCF发布了[年度调查](https://www.cncf.io/blog/2020/03/04/2019-cncf-survey-results-are-here-deployments-are-growing-in-size-and-speed-as-cloud-native-adoption-becomes-mainstream/) 的结果,表明 Kubernetes 在生产中的使用正在飞速增长。调查发现,有78%的受访者在生产中使用Kubernetes,而去年这一比例为 58%。
-- CNCF 举办的 “Kubernetes入门” 课程有[超过 100,000 人注册](https://www.cncf.io/announcement/2020/01/28/cloud-native-computing-foundation-announces-introduction-to-kubernetes-course-surpasses-100000-registrations/)。
+- CNCF 发布了[年度调查](https://www.cncf.io/blog/2020/03/04/2019-cncf-survey-results-are-here-deployments-are-growing-in-size-and-speed-as-cloud-native-adoption-becomes-mainstream/)的结果,
+ 表明 Kubernetes 在生产中的使用正在飞速增长。调查发现,有 78% 的受访者在生产中使用 Kubernetes,而去年这一比例为 58%。
+- CNCF 举办的 “Kubernetes 入门” 课程有[超过 100,000 人注册](https://www.cncf.io/announcement/2020/01/28/cloud-native-computing-foundation-announces-introduction-to-kubernetes-course-surpasses-100000-registrations/)。
-CNCF 继续完善 DevStats。这是一个雄心勃勃的项目,旨在对项目中的无数贡献数据进行可视化展示。[K8s DevStats](https://k8s.devstats.cncf.io/d/12/dashboards?orgId=1) 展示了主要公司贡献者的贡献细目,以及一系列令人印象深刻的预定义的报告,涉及从贡献者个人的各方面到 PR 生命周期的各个方面。
+CNCF 继续完善 DevStats。这是一个雄心勃勃的项目,旨在对项目中的无数贡献数据进行可视化展示。
+[K8s DevStats](https://k8s.devstats.cncf.io/d/12/dashboards?orgId=1) 展示了主要公司贡献者的贡献细目,
+以及一系列令人印象深刻的预定义的报告,涉及从贡献者个人的各方面到 PR 生命周期的各个方面。
-在过去的一个季度中,641 家不同的公司和超过 6,409 个个人为 Kubernetes 作出贡献。 [查看 DevStats](https://k8s.devstats.cncf.io/d/11/companies-contributing-in-repository-groups?orgId=1&var-period=m&var-repogroup_name=All) 以了解有关 Kubernetes 项目和社区发展速度的信息。
+在过去的一个季度中,641 家不同的公司和超过 6,409 个个人为 Kubernetes 作出贡献。
+[查看 DevStats](https://k8s.devstats.cncf.io/d/11/companies-contributing-in-repository-groups?orgId=1&var-period=m&var-repogroup_name=All)
+以了解有关 Kubernetes 项目和社区发展速度的信息。
-Kubecon + CloudNativeCon EU 2020 已经推迟 - 有关最新信息,请查看[新型肺炎发布页面](https://events.linuxfoundation.org/kubecon-cloudnativecon-europe/attend/novel-coronavirus-update/)。
+Kubecon + CloudNativeCon EU 2020 已经推迟 - 有关最新信息,
+请查看[新型肺炎发布页面](https://events.linuxfoundation.org/kubecon-cloudnativecon-europe/attend/novel-coronavirus-update/)。
-在 2020 年 4 月 23 日,和 Kubernetes 1.18 版本团队一起了解此版本的主要功能,包括 kubectl debug、拓扑管理器、Ingress 毕业为 V1 版本以及 client-go。 在此处注册:https://www.cncf.io/webinars/kubernetes-1-18/ 。
+在 2020 年 4 月 23 日,和 Kubernetes 1.18 版本团队一起了解此版本的主要功能,
+包括 kubectl debug、拓扑管理器、Ingress 毕业为 V1 版本以及 client-go。
+在此处注册: https://www.cncf.io/webinars/kubernetes-1-18/ 。
-参与 Kubernetes 的最简单方法是加入众多与您的兴趣相关的 [特别兴趣小组](https://github.com/kubernetes/community/blob/master/sig-list.md) (SIGs) 之一。 您有什么想向 Kubernetes 社区发布的内容吗? 参与我们的每周 [社区会议](https://github.com/kubernetes/community/tree/master/communication),并通过以下渠道分享您的声音。 感谢您一直以来的反馈和支持。
+参与 Kubernetes 的最简单方法是加入众多与你的兴趣相关的[特别兴趣小组](https://github.com/kubernetes/community/blob/master/sig-list.md)(SIGs)之一。
+你有什么想向 Kubernetes 社区发布的内容吗?参与我们的每周[社区会议](https://github.com/kubernetes/community/tree/master/communication),
+并通过以下渠道分享你的声音。感谢你一直以来的反馈和支持。
卷填充器功能现在已经经历两个发行版本并进入 Beta 阶段!
-在 Kubernetes v1.24 中 `AnyVolumeDataSouce` 特性门控默认被启用。
+在 Kubernetes v1.24 中 `AnyVolumeDataSource` 特性门控默认被启用。
这意味着用户可以指定任何自定义资源作为 PVC 的数据源。
-[之前的一篇博客](/blog/2021/08/30-volume-populators-alpha/)详细介绍了卷填充器功能的工作原理。
+[之前的一篇博客](/blog/2021/08/30/volume-populators-redesigned/)详细介绍了卷填充器功能的工作原理。
简而言之,集群管理员可以在集群中安装 CRD 和相关的填充器控制器,
任何可以创建 CR 实例的用户都可以利用填充器创建预填充卷。
diff --git a/content/zh-cn/blog/_posts/2022-05-18-prevent-unauthorised-volume-mode-conversion.md b/content/zh-cn/blog/_posts/2022-05-18-prevent-unauthorised-volume-mode-conversion.md
new file mode 100644
index 0000000000..15e86f5e5d
--- /dev/null
+++ b/content/zh-cn/blog/_posts/2022-05-18-prevent-unauthorised-volume-mode-conversion.md
@@ -0,0 +1,203 @@
+---
+layout: blog
+title: 'Kubernetes 1.24: 防止未经授权的卷模式转换'
+date: 2022-05-18
+slug: prevent-unauthorised-volume-mode-conversion-alpha
+---
+
+
+
+
+**作者:** Raunak Pradip Shah (Mirantis)
+
+
+Kubernetes v1.24 引入了一个新的 alpha 级特性,可以防止未经授权的用户修改基于 Kubernetes
+集群中已有的 [`VolumeSnapshot`](/zh/docs/concepts/storage/volume-snapshots/)
+创建的 [`PersistentVolumeClaim`](/zh/docs/concepts/storage/persistent-volumes/) 的卷模式。
+
+
+### 问题
+
+
+[卷模式](/zh/docs/concepts/storage/persistent-volumes/#volume-mode)确定卷是格式化为文件系统还是显示为原始块设备。
+
+
+用户可以使用自 Kubernetes v1.20 以来就稳定的 `VolumeSnapshot` 功能,
+基于 Kubernetes 集群中的已有的 `VolumeSnapshot` 创建一个 `PersistentVolumeClaim` (简称 PVC )。
+PVC 规约包括一个 `dataSource` 字段,它可以指向一个已有的 `VolumeSnapshot` 实例。
+查阅[基于卷快照创建 PVC](/zh/docs/concepts/storage/persistent-volumes/#create-persistent-volume-claim-from-volume-snapshot)
+获取更多详细信息。
+
+
+当使用上述功能时,没有逻辑来验证快照所在的原始卷的模式是否与新创建的卷的模式匹配。
+
+
+这引起了一个安全漏洞,允许恶意用户潜在地利用主机操作系统中的未知漏洞。
+
+
+为了提高效率,许多流行的存储备份供应商在备份操作过程中转换卷模式,
+这使得 Kubernetes 无法完全阻止该操作,并在区分受信任用户和恶意用户方面带来挑战。
+
+
+### 防止未经授权的用户转换卷模式
+
+
+在这种情况下,授权用户是指有权对 `VolumeSnapshotContents`(集群级资源)执行 `Update`
+或 `Patch` 操作的用户。集群管理员只能向受信任的用户或应用程序(如备份供应商)提供这些权限。
+
+
+如果在 `snapshot-controller`、`snapshot-validation-webhook` 和
+`external-provisioner` 中[启用](https://kubernetes-csi.github.io/docs/)了这个 alpha
+特性,则基于 `VolumeSnapshot` 创建 PVC 时,将不允许未经授权的用户修改其卷模式。
+
+
+如要转换卷模式,授权用户必须执行以下操作:
+
+
+1. 确定要用作给定命名空间中新创建 PVC 的数据源的 `VolumeSnapshot`。
+2. 确定绑定到上面 `VolumeSnapshot` 的 `VolumeSnapshotContent`。
+
+ ```
+ kubectl get volumesnapshot -n
+ ```
+
+3. 给 `VolumeSnapshotContent` 添加
+ [`snapshot.storage.kubernetes.io/allowVolumeModeChange`](/zh/docs/reference/labels-annotations-taints/#snapshot-storage-kubernetes-io-allowvolumemodechange)
+ 注解。
+
+
+4. 此注解可通过软件添加或由授权用户手动添加。`VolumeSnapshotContent` 注解必须类似于以下清单片段:
+
+ ```yaml
+ kind: VolumeSnapshotContent
+ metadata:
+ annotations:
+ - snapshot.storage.kubernetes.io/allowVolumeModeChange: "true"
+ ...
+ ```
+
+**注意**:对于预先制备的 `VolumeSnapshotContents`,你必须采取额外的步骤设置 `spec.sourceVolumeMode`
+字段为 `Filesystem` 或 `Block`,这取决于快照所在卷的模式。
+
+
+如下为一个示例:
+
+```yaml
+ apiVersion: snapshot.storage.k8s.io/v1
+ kind: VolumeSnapshotContent
+ metadata:
+ annotations:
+ - snapshot.storage.kubernetes.io/allowVolumeModeChange: "true"
+ name: new-snapshot-content-test
+ spec:
+ deletionPolicy: Delete
+ driver: hostpath.csi.k8s.io
+ source:
+ snapshotHandle: 7bdd0de3-aaeb-11e8-9aae-0242ac110002
+ sourceVolumeMode: Filesystem
+ volumeSnapshotRef:
+ name: new-snapshot-test
+ namespace: default
+```
+
+
+对于在备份或恢复操作期间需要转换卷模式的所有 `VolumeSnapshotContents`,重复步骤 1 到 3。
+
+
+如果 `VolumeSnapshotContent` 对象上存在上面步骤 4 中显示的注解,Kubernetes 将不会阻止转换卷模式。
+用户在尝试将注解添加到任何 `VolumeSnapshotContent` 之前,应该记住这一点。
+
+
+### 接下来
+
+
+[启用此特性](https://kubernetes-csi.github.io/docs/)并让我们知道你的想法!
+
+
+我们希望此功能不会中断现有工作流程,同时防止恶意用户利用集群中的安全漏洞。
+
+
+若有任何问题,请在 #sig-storage slack 频道中创建一个会话,
+或在 CSI 外部快照存储[仓库](https://github.com/kubernetes-csi/external-snapshotter)中报告一个 issue。
\ No newline at end of file
diff --git a/content/zh-cn/blog/_posts/2022-05-23-service-ip-dynamic-and-static-allocation.md b/content/zh-cn/blog/_posts/2022-05-23-service-ip-dynamic-and-static-allocation.md
new file mode 100644
index 0000000000..fccad6cc3d
--- /dev/null
+++ b/content/zh-cn/blog/_posts/2022-05-23-service-ip-dynamic-and-static-allocation.md
@@ -0,0 +1,268 @@
+---
+layout: blog
+title: "Kubernetes 1.24: 避免为 Services 分配 IP 地址时发生冲突"
+date: 2022-05-23
+slug: service-ip-dynamic-and-static-allocation
+---
+
+
+
+**作者:** Antonio Ojea (Red Hat)
+
+
+在 Kubernetes 中,[Services](/zh/docs/concepts/services-networking/service/)
+是一种抽象,用来暴露运行在一组 Pod 上的应用。
+Service 可以有一个集群范围的虚拟 IP 地址(使用 `type: ClusterIP` 的 Service)。
+客户端可以使用该虚拟 IP 地址进行连接, Kubernetes 为对该 Service 的访问流量提供负载均衡,以访问不同的后端 Pod。
+
+
+## Service ClusterIP 是如何分配的?
+
+
+Service `ClusterIP` 有如下分配方式:
+
+
+**动态**
+:群集的控制平面会自动从配置的 IP 范围内为 `type:ClusterIP` 的 Service 选择一个空闲 IP 地址。
+
+
+**静态**
+:你可以指定一个来自 Service 配置的 IP 范围内的 IP 地址。
+
+
+在整个集群中,每个 Service 的 `ClusterIP` 必须是唯一的。
+尝试创建一个已经被分配了的 `ClusterIP` 的 Service 将会返回错误。
+
+
+## 为什么需要预留 Service Cluster IP?
+
+
+有时,你可能希望让 Service 运行在众所周知的 IP 地址上,以便集群中的其他组件和用户可以使用它们。
+
+
+最好的例子是集群的 DNS Service。一些 Kubernetes 安装程序将 Service IP 范围中的第 10 个地址分配给 DNS Service。
+假设你配置集群 Service IP 范围是 10.96.0.0/16,并且希望 DNS Service IP 为 10.96.0.10,
+那么你必须创建一个如下所示的 Service:
+
+```yaml
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ k8s-app: kube-dns
+ kubernetes.io/cluster-service: "true"
+ kubernetes.io/name: CoreDNS
+ name: kube-dns
+ namespace: kube-system
+spec:
+ clusterIP: 10.96.0.10
+ ports:
+ - name: dns
+ port: 53
+ protocol: UDP
+ targetPort: 53
+ - name: dns-tcp
+ port: 53
+ protocol: TCP
+ targetPort: 53
+ selector:
+ k8s-app: kube-dns
+ type: ClusterIP
+```
+
+
+但正如我之前解释的,IP 地址 10.96.0.10 没有被保留;
+如果其他 Service 在动态分配之前创建或与动态分配并行创建,则它们有可能分配此 IP 地址,
+因此,你将无法创建 DNS Service,因为它将因冲突错误而失败。
+
+
+## 如何避免 Service ClusterIP 冲突? {#avoid-ClusterIP-conflict}
+
+
+在 Kubernetes 1.24 中,你可以启用一个新的特性门控 `ServiceIPStaticSubrange`。
+启用此特性允许你为 Service 使用不同的 IP 分配策略,减少冲突的风险。
+
+
+`ClusterIP` 范围将根据公式 `min(max(16, cidrSize / 16), 256)` 进行划分,
+该公式可描述为 “在不小于 16 且不大于 256 之间有一个步进量(Graduated Step)”。
+
+
+分配默认使用上半段地址,当上半段地址耗尽后,将使用下半段地址范围。
+这将允许用户使用下半段地址中静态分配的地址并且降低冲突的风险。
+
+
+举例:
+
+
+#### Service IP CIDR 地址段: 10.96.0.0/24
+
+
+地址段大小:28 - 2 = 254
+地址段偏移:`min(max(16,256/16),256)` = `min(16,256)` = 16
+静态地址段起点:10.96.0.1
+静态地址段终点:10.96.0.16
+地址范围终点:10.96.0.254
+
+
+{{< mermaid >}}
+pie showData
+title 10.96.0.0/24
+"静态" : 16
+"动态" : 238
+{{< /mermaid >}}
+
+
+#### Service IP CIDR 地址段: 10.96.0.0/20
+
+
+地址段大小:212 - 2 = 4094
+地址段偏移:`min(max(16,4094/16),256)` = `min(256,256)` = 256
+静态地址段起点:10.96.0.1
+静态地址段终点:10.96.1.0
+地址范围终点:10.96.15.254
+
+
+{{< mermaid >}}
+pie showData
+title 10.96.0.0/20
+"静态" : 256
+"动态" : 3838
+{{< /mermaid >}}
+
+
+#### Service IP CIDR 地址段: 10.96.0.0/16
+
+
+地址段大小:216 - 2 = 65534
+地址段偏移:`min(max(16,65536/16),256)` = `min(4096,256)` = 256
+静态地址段起点:10.96.0.1
+静态地址段终点:10.96.1.0
+地址范围终点:10.96.255.254
+
+
+{{< mermaid >}}
+pie showData
+title 10.96.0.0/16
+"静态" : 256
+"动态" : 65278
+{{< /mermaid >}}
+
+
+## 加入 SIG Network
+
+
+当前 SIG-Network 在 GitHub 上的 [KEPs](https://github.com/orgs/kubernetes/projects/10) 和
+[issues](https://github.com/kubernetes/kubernetes/issues?q=is%3Aopen+is%3Aissue+label%3Asig%2Fnetwork)
+表明了该 SIG 的重点领域。
+
+
+[SIG Network 会议](https://github.com/kubernetes/community/tree/master/sig-network)是一个友好、热情的场所,
+你可以与社区联系并分享你的想法。期待你的回音!
diff --git a/content/zh-cn/blog/_posts/2022-05-27-maxunavailable-for-statefulset.md b/content/zh-cn/blog/_posts/2022-05-27-maxunavailable-for-statefulset.md
new file mode 100644
index 0000000000..4752273dad
--- /dev/null
+++ b/content/zh-cn/blog/_posts/2022-05-27-maxunavailable-for-statefulset.md
@@ -0,0 +1,239 @@
+---
+layout: blog
+title: 'Kubernetes 1.24: StatefulSet 的最大不可用副本数'
+date: 2022-05-27
+slug: maxunavailable-for-statefulset
+---
+
+**作者:** Mayank Kumar (Salesforce)
+
+
+Kubernetes [StatefulSet](/zh/docs/concepts/workloads/controllers/statefulset/),
+自 1.5 版本中引入并在 1.9 版本中变得稳定以来,已被广泛用于运行有状态应用。它提供固定的 Pod 身份标识、
+每个 Pod 的持久存储以及 Pod 的有序部署、扩缩容和滚动更新功能。你可以将 StatefulSet
+视为运行复杂有状态应用程序的原子构建块。随着 Kubernetes 的使用增多,需要 StatefulSet 的场景也越来越多。
+当 StatefulSet 的 Pod 管理策略为 `OrderedReady` 时,其中许多场景需要比当前所支持的一次一个 Pod
+的更新更快的滚动更新。
+
+
+这里有些例子:
+
+- 我使用 StatefulSet 来编排一个基于缓存的多实例应用程序,其中缓存的规格很大。
+ 缓存冷启动,需要相当长的时间才能启动容器。所需要的初始启动任务有很多。在应用程序完全更新之前,
+ 此 StatefulSet 上的 RollingUpdate 将花费大量时间。如果 StatefulSet 支持一次更新多个 Pod,
+ 那么更新速度会快得多。
+
+
+- 我的有状态应用程序由 leader 和 follower 或者一个 writer 和多个 reader 组成。
+ 我有多个 reader 或 follower,并且我的应用程序可以容忍多个 Pod 同时出现故障。
+ 我想一次更新这个应用程序的多个 Pod,特别是当我的应用程序实例数量很多时,这样我就能快速推出新的更新。
+ 注意,我的应用程序仍然需要每个 Pod 具有唯一标识。
+
+
+为了支持这样的场景,Kubernetes 1.24 提供了一个新的 alpha 特性。在使用新特性之前,必须启用
+`MaxUnavailableStatefulSet` 特性标志。一旦启用,就可以指定一个名为 `maxUnavailable` 的新字段,
+这是 StatefulSet `spec` 的一部分。例如:
+
+```
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: web
+ namespace: default
+spec:
+ podManagementPolicy: OrderedReady # 你必须设为 OrderedReady
+ replicas: 5
+ selector:
+ matchLabels:
+ app: nginx
+ template:
+ metadata:
+ labels:
+ app: nginx
+ spec:
+ containers:
+ - image: k8s.gcr.io/nginx-slim:0.8
+ imagePullPolicy: IfNotPresent
+ name: nginx
+ updateStrategy:
+ rollingUpdate:
+ maxUnavailable: 2 # 这是 alpha 特性的字段,默认值是 1
+ partition: 0
+ type: RollingUpdate
+```
+
+
+如果你启用了新特性,但没有在 StatefulSet 中指定 `maxUnavailable` 的值,Kubernetes
+会默认设置 `maxUnavailable: 1`。这与你不启用新特性时看到的行为是一致的。
+
+
+我将基于该示例清单做场景演练,以演示此特性是如何工作的。我将部署一个有 5 个副本的 StatefulSet,
+`maxUnavailable` 设置为 2 并将 `partition` 设置为 0。
+
+
+我可以通过将镜像更改为 `k8s.gcr.io/nginx-slim:0.9` 来触发滚动更新。一旦开始滚动更新,
+就可以看到一次更新 2 个 Pod,因为 `maxUnavailable` 的当前值是 2。
+下面的输出显示了一个时间段内的结果,但并不是完整过程。`maxUnavailable` 可以是绝对数值(例如 2)或所需 Pod
+的百分比(例如 10%),绝对数是通过百分比计算结果进行四舍五入得出的。
+
+```
+kubectl get pods --watch
+```
+
+```
+NAME READY STATUS RESTARTS AGE
+web-0 1/1 Running 0 85s
+web-1 1/1 Running 0 2m6s
+web-2 1/1 Running 0 106s
+web-3 1/1 Running 0 2m47s
+web-4 1/1 Running 0 2m27s
+web-4 1/1 Terminating 0 5m43s ----> start terminating 4
+web-3 1/1 Terminating 0 6m3s ----> start terminating 3
+web-3 0/1 Terminating 0 6m7s
+web-3 0/1 Pending 0 0s
+web-3 0/1 Pending 0 0s
+web-4 0/1 Terminating 0 5m48s
+web-4 0/1 Terminating 0 5m48s
+web-3 0/1 ContainerCreating 0 2s
+web-3 1/1 Running 0 2s
+web-4 0/1 Pending 0 0s
+web-4 0/1 Pending 0 0s
+web-4 0/1 ContainerCreating 0 0s
+web-4 1/1 Running 0 1s
+web-2 1/1 Terminating 0 5m46s ----> start terminating 2 (only after both 4 and 3 are running)
+web-1 1/1 Terminating 0 6m6s ----> start terminating 1
+web-2 0/1 Terminating 0 5m47s
+web-1 0/1 Terminating 0 6m7s
+web-1 0/1 Pending 0 0s
+web-1 0/1 Pending 0 0s
+web-1 0/1 ContainerCreating 0 1s
+web-1 1/1 Running 0 2s
+web-2 0/1 Pending 0 0s
+web-2 0/1 Pending 0 0s
+web-2 0/1 ContainerCreating 0 0s
+web-2 1/1 Running 0 1s
+web-0 1/1 Terminating 0 6m6s ----> start terminating 0 (only after 2 and 1 are running)
+web-0 0/1 Terminating 0 6m7s
+web-0 0/1 Pending 0 0s
+web-0 0/1 Pending 0 0s
+web-0 0/1 ContainerCreating 0 0s
+web-0 1/1 Running 0 1s
+```
+
+注意,滚动更新一开始,4 和 3(两个最高序号的 Pod)同时开始进入 `Terminating` 状态。
+Pod 4 和 3 会按照自身节奏进行更新。一旦 Pod 4 和 3 更新完毕后,Pod 2 和 1 会同时进入
+`Terminating` 状态。当 Pod 2 和 1 都准备完毕处于 `Running` 状态时,Pod 0 开始进入 `Terminating` 状态
+
+
+在 Kubernetes 中,StatefulSet 更新 Pod 时遵循严格的顺序。在此示例中,更新从副本 4 开始,
+然后是副本 3,然后是副本 2,以此类推,一次更新一个 Pod。当一次只更新一个 Pod 时,
+副本 3 不可能在副本 4 之前准备好进入 `Running` 状态。当 `maxUnavailable` 值
+大于 1 时(在示例场景中我设置 `maxUnavailable` 值为 2),副本 3 可能在副本 4 之前准备好并运行,
+这是没问题的。如果你是开发人员并且设置 `maxUnavailable` 值大于 1,你应该知道可能出现这种情况,
+并且如果有这种情况的话,你必须确保你的应用程序能够处理发生的此类顺序问题。当你设置 `maxUnavailable`
+值大于 1 时,更新 Pod 的批次之间会保证顺序。该保证意味着在批次 0(副本 4 和 3)中的 Pod
+准备好之前,更新批次 2(副本 2 和 1)中的 Pod 无法开始更新。
+
+
+尽管 Kubernetes 将这些称为**副本**,但你的有状态应用程序可能不这样理解,StatefulSet 的每个
+Pod 可能持有与其他 Pod 完全不同的数据。重要的是,StatefulSet 的更新是分批进行的,
+你现在让批次大小大于 1(作为 alpha 特性)。
+
+
+还要注意,上面的行为采用的 Pod 管理策略是 `podManagementPolicy: OrderedReady`。
+如果你的 StatefulSet 的 Pod 管理策略是 `podManagementPolicy: Parallel`,
+那么不仅是 `maxUnavailable` 数量的副本同时被终止,还会导致 `maxUnavailable` 数量的副本同时在
+`ContainerCreating` 阶段。这就是所谓的突发(Bursting)。
+
+
+因此,现在你可能有很多关于以下方面的问题:
+- 当设置 `podManagementPolicy:Parallel` 时,会产生什么行为?
+- 将 `partition` 设置为非 `0` 值时会发生什么?
+
+
+自己试试看可能会更好。这是一个 alpha 特性,Kubernetes 贡献者正在寻找有关此特性的反馈。
+这是否有助于你实现有状态的场景?你是否发现了一个 bug,或者你认为实现的行为不直观易懂,
+或者它可能会破坏应用程序或让他们感到吃惊?请[登记一个 issue](https://github.com/kubernetes/kubernetes/issues)
+告知我们。
+
+
+## 进一步阅读和后续步骤 {#next-steps}
+- [最多不可用 Pod 数](/zh/docs/concepts/workloads/controllers/statefulset/#maximum-unavailable-pods)
+- [KEP for MaxUnavailable for StatefulSet](https://github.com/kubernetes/enhancements/tree/master/keps/sig-apps/961-maxunavailable-for-statefulset)
+- [代码实现](https://github.com/kubernetes/kubernetes/pull/82162/files)
+- [增强跟踪 Issue](https://github.com/kubernetes/enhancements/issues/961)
\ No newline at end of file
diff --git a/content/zh/case-studies/_index.html b/content/zh-cn/case-studies/_index.html
similarity index 100%
rename from content/zh/case-studies/_index.html
rename to content/zh-cn/case-studies/_index.html
diff --git a/content/zh/case-studies/adform/adform_featured_logo.png b/content/zh-cn/case-studies/adform/adform_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/adform/adform_featured_logo.png
rename to content/zh-cn/case-studies/adform/adform_featured_logo.png
diff --git a/content/zh/case-studies/adform/index.html b/content/zh-cn/case-studies/adform/index.html
similarity index 100%
rename from content/zh/case-studies/adform/index.html
rename to content/zh-cn/case-studies/adform/index.html
diff --git a/content/zh/case-studies/adidas/adidas-featured.svg b/content/zh-cn/case-studies/adidas/adidas-featured.svg
similarity index 100%
rename from content/zh/case-studies/adidas/adidas-featured.svg
rename to content/zh-cn/case-studies/adidas/adidas-featured.svg
diff --git a/content/zh/case-studies/adidas/index.html b/content/zh-cn/case-studies/adidas/index.html
similarity index 100%
rename from content/zh/case-studies/adidas/index.html
rename to content/zh-cn/case-studies/adidas/index.html
diff --git a/content/zh/case-studies/amadeus/amadeus_featured.png b/content/zh-cn/case-studies/amadeus/amadeus_featured.png
similarity index 100%
rename from content/zh/case-studies/amadeus/amadeus_featured.png
rename to content/zh-cn/case-studies/amadeus/amadeus_featured.png
diff --git a/content/zh/case-studies/amadeus/amadeus_logo.png b/content/zh-cn/case-studies/amadeus/amadeus_logo.png
similarity index 100%
rename from content/zh/case-studies/amadeus/amadeus_logo.png
rename to content/zh-cn/case-studies/amadeus/amadeus_logo.png
diff --git a/content/zh/case-studies/amadeus/index.html b/content/zh-cn/case-studies/amadeus/index.html
similarity index 100%
rename from content/zh/case-studies/amadeus/index.html
rename to content/zh-cn/case-studies/amadeus/index.html
diff --git a/content/zh/case-studies/ancestry/ancestry_featured.png b/content/zh-cn/case-studies/ancestry/ancestry_featured.png
similarity index 100%
rename from content/zh/case-studies/ancestry/ancestry_featured.png
rename to content/zh-cn/case-studies/ancestry/ancestry_featured.png
diff --git a/content/zh/case-studies/ancestry/ancestry_logo.png b/content/zh-cn/case-studies/ancestry/ancestry_logo.png
similarity index 100%
rename from content/zh/case-studies/ancestry/ancestry_logo.png
rename to content/zh-cn/case-studies/ancestry/ancestry_logo.png
diff --git a/content/zh/case-studies/ancestry/index.html b/content/zh-cn/case-studies/ancestry/index.html
similarity index 100%
rename from content/zh/case-studies/ancestry/index.html
rename to content/zh-cn/case-studies/ancestry/index.html
diff --git a/content/zh/case-studies/ant-financial/ant-financial_featured_logo.png b/content/zh-cn/case-studies/ant-financial/ant-financial_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/ant-financial/ant-financial_featured_logo.png
rename to content/zh-cn/case-studies/ant-financial/ant-financial_featured_logo.png
diff --git a/content/zh/case-studies/ant-financial/index.html b/content/zh-cn/case-studies/ant-financial/index.html
similarity index 100%
rename from content/zh/case-studies/ant-financial/index.html
rename to content/zh-cn/case-studies/ant-financial/index.html
diff --git a/content/zh/case-studies/appdirect/appdirect_featured_logo.png b/content/zh-cn/case-studies/appdirect/appdirect_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/appdirect/appdirect_featured_logo.png
rename to content/zh-cn/case-studies/appdirect/appdirect_featured_logo.png
diff --git a/content/zh/case-studies/appdirect/index.html b/content/zh-cn/case-studies/appdirect/index.html
similarity index 100%
rename from content/zh/case-studies/appdirect/index.html
rename to content/zh-cn/case-studies/appdirect/index.html
diff --git a/content/zh/case-studies/babylon/babylon_featured_logo.png b/content/zh-cn/case-studies/babylon/babylon_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/babylon/babylon_featured_logo.png
rename to content/zh-cn/case-studies/babylon/babylon_featured_logo.png
diff --git a/content/zh/case-studies/babylon/babylon_featured_logo.svg b/content/zh-cn/case-studies/babylon/babylon_featured_logo.svg
similarity index 100%
rename from content/zh/case-studies/babylon/babylon_featured_logo.svg
rename to content/zh-cn/case-studies/babylon/babylon_featured_logo.svg
diff --git a/content/zh/case-studies/babylon/index.html b/content/zh-cn/case-studies/babylon/index.html
similarity index 100%
rename from content/zh/case-studies/babylon/index.html
rename to content/zh-cn/case-studies/babylon/index.html
diff --git a/content/zh/case-studies/blablacar/blablacar_featured.png b/content/zh-cn/case-studies/blablacar/blablacar_featured.png
similarity index 100%
rename from content/zh/case-studies/blablacar/blablacar_featured.png
rename to content/zh-cn/case-studies/blablacar/blablacar_featured.png
diff --git a/content/zh/case-studies/blablacar/blablacar_logo.png b/content/zh-cn/case-studies/blablacar/blablacar_logo.png
similarity index 100%
rename from content/zh/case-studies/blablacar/blablacar_logo.png
rename to content/zh-cn/case-studies/blablacar/blablacar_logo.png
diff --git a/content/zh/case-studies/blablacar/index.html b/content/zh-cn/case-studies/blablacar/index.html
similarity index 100%
rename from content/zh/case-studies/blablacar/index.html
rename to content/zh-cn/case-studies/blablacar/index.html
diff --git a/content/zh/case-studies/blackrock/blackrock_featured.png b/content/zh-cn/case-studies/blackrock/blackrock_featured.png
similarity index 100%
rename from content/zh/case-studies/blackrock/blackrock_featured.png
rename to content/zh-cn/case-studies/blackrock/blackrock_featured.png
diff --git a/content/zh/case-studies/blackrock/blackrock_logo.png b/content/zh-cn/case-studies/blackrock/blackrock_logo.png
similarity index 100%
rename from content/zh/case-studies/blackrock/blackrock_logo.png
rename to content/zh-cn/case-studies/blackrock/blackrock_logo.png
diff --git a/content/zh/case-studies/blackrock/index.html b/content/zh-cn/case-studies/blackrock/index.html
similarity index 100%
rename from content/zh/case-studies/blackrock/index.html
rename to content/zh-cn/case-studies/blackrock/index.html
diff --git a/content/zh/case-studies/booking-com/booking.com_featured_logo.png b/content/zh-cn/case-studies/booking-com/booking.com_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/booking-com/booking.com_featured_logo.png
rename to content/zh-cn/case-studies/booking-com/booking.com_featured_logo.png
diff --git a/content/zh/case-studies/booking-com/booking.com_featured_logo.svg b/content/zh-cn/case-studies/booking-com/booking.com_featured_logo.svg
similarity index 100%
rename from content/zh/case-studies/booking-com/booking.com_featured_logo.svg
rename to content/zh-cn/case-studies/booking-com/booking.com_featured_logo.svg
diff --git a/content/zh/case-studies/booking-com/index.html b/content/zh-cn/case-studies/booking-com/index.html
similarity index 100%
rename from content/zh/case-studies/booking-com/index.html
rename to content/zh-cn/case-studies/booking-com/index.html
diff --git a/content/zh/case-studies/booz-allen/booz-allen-featured-logo.svg b/content/zh-cn/case-studies/booz-allen/booz-allen-featured-logo.svg
similarity index 100%
rename from content/zh/case-studies/booz-allen/booz-allen-featured-logo.svg
rename to content/zh-cn/case-studies/booz-allen/booz-allen-featured-logo.svg
diff --git a/content/zh/case-studies/booz-allen/booz-allen_featured_logo.png b/content/zh-cn/case-studies/booz-allen/booz-allen_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/booz-allen/booz-allen_featured_logo.png
rename to content/zh-cn/case-studies/booz-allen/booz-allen_featured_logo.png
diff --git a/content/zh/case-studies/booz-allen/index.html b/content/zh-cn/case-studies/booz-allen/index.html
similarity index 100%
rename from content/zh/case-studies/booz-allen/index.html
rename to content/zh-cn/case-studies/booz-allen/index.html
diff --git a/content/zh/case-studies/bose/bose_featured_logo.png b/content/zh-cn/case-studies/bose/bose_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/bose/bose_featured_logo.png
rename to content/zh-cn/case-studies/bose/bose_featured_logo.png
diff --git a/content/zh/case-studies/bose/index.html b/content/zh-cn/case-studies/bose/index.html
similarity index 100%
rename from content/zh/case-studies/bose/index.html
rename to content/zh-cn/case-studies/bose/index.html
diff --git a/content/zh/case-studies/box/box_featured.png b/content/zh-cn/case-studies/box/box_featured.png
similarity index 100%
rename from content/zh/case-studies/box/box_featured.png
rename to content/zh-cn/case-studies/box/box_featured.png
diff --git a/content/zh/case-studies/box/box_logo.png b/content/zh-cn/case-studies/box/box_logo.png
similarity index 100%
rename from content/zh/case-studies/box/box_logo.png
rename to content/zh-cn/case-studies/box/box_logo.png
diff --git a/content/zh/case-studies/box/box_small.png b/content/zh-cn/case-studies/box/box_small.png
similarity index 100%
rename from content/zh/case-studies/box/box_small.png
rename to content/zh-cn/case-studies/box/box_small.png
diff --git a/content/zh/case-studies/box/index.html b/content/zh-cn/case-studies/box/index.html
similarity index 100%
rename from content/zh/case-studies/box/index.html
rename to content/zh-cn/case-studies/box/index.html
diff --git a/content/zh/case-studies/box/video.png b/content/zh-cn/case-studies/box/video.png
similarity index 100%
rename from content/zh/case-studies/box/video.png
rename to content/zh-cn/case-studies/box/video.png
diff --git a/content/zh/case-studies/buffer/buffer_featured.png b/content/zh-cn/case-studies/buffer/buffer_featured.png
similarity index 100%
rename from content/zh/case-studies/buffer/buffer_featured.png
rename to content/zh-cn/case-studies/buffer/buffer_featured.png
diff --git a/content/zh/case-studies/buffer/buffer_logo.png b/content/zh-cn/case-studies/buffer/buffer_logo.png
similarity index 100%
rename from content/zh/case-studies/buffer/buffer_logo.png
rename to content/zh-cn/case-studies/buffer/buffer_logo.png
diff --git a/content/zh/case-studies/buffer/index.html b/content/zh-cn/case-studies/buffer/index.html
similarity index 100%
rename from content/zh/case-studies/buffer/index.html
rename to content/zh-cn/case-studies/buffer/index.html
diff --git a/content/zh/case-studies/capital-one/capitalone_featured_logo.png b/content/zh-cn/case-studies/capital-one/capitalone_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/capital-one/capitalone_featured_logo.png
rename to content/zh-cn/case-studies/capital-one/capitalone_featured_logo.png
diff --git a/content/zh/case-studies/capital-one/index.html b/content/zh-cn/case-studies/capital-one/index.html
similarity index 100%
rename from content/zh/case-studies/capital-one/index.html
rename to content/zh-cn/case-studies/capital-one/index.html
diff --git a/content/zh/case-studies/cern/cern_featured_logo.png b/content/zh-cn/case-studies/cern/cern_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/cern/cern_featured_logo.png
rename to content/zh-cn/case-studies/cern/cern_featured_logo.png
diff --git a/content/zh/case-studies/cern/index.html b/content/zh-cn/case-studies/cern/index.html
similarity index 100%
rename from content/zh/case-studies/cern/index.html
rename to content/zh-cn/case-studies/cern/index.html
diff --git a/content/zh/case-studies/chinaunicom/chinaunicom_featured_logo.png b/content/zh-cn/case-studies/chinaunicom/chinaunicom_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/chinaunicom/chinaunicom_featured_logo.png
rename to content/zh-cn/case-studies/chinaunicom/chinaunicom_featured_logo.png
diff --git a/content/zh/case-studies/chinaunicom/index.html b/content/zh-cn/case-studies/chinaunicom/index.html
similarity index 100%
rename from content/zh/case-studies/chinaunicom/index.html
rename to content/zh-cn/case-studies/chinaunicom/index.html
diff --git a/content/zh/case-studies/city-of-montreal/city-of-montreal_featured_logo.png b/content/zh-cn/case-studies/city-of-montreal/city-of-montreal_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/city-of-montreal/city-of-montreal_featured_logo.png
rename to content/zh-cn/case-studies/city-of-montreal/city-of-montreal_featured_logo.png
diff --git a/content/zh/case-studies/city-of-montreal/index.html b/content/zh-cn/case-studies/city-of-montreal/index.html
similarity index 100%
rename from content/zh/case-studies/city-of-montreal/index.html
rename to content/zh-cn/case-studies/city-of-montreal/index.html
diff --git a/content/zh/case-studies/crowdfire/crowdfire_featured_logo.png b/content/zh-cn/case-studies/crowdfire/crowdfire_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/crowdfire/crowdfire_featured_logo.png
rename to content/zh-cn/case-studies/crowdfire/crowdfire_featured_logo.png
diff --git a/content/zh/case-studies/crowdfire/index.html b/content/zh-cn/case-studies/crowdfire/index.html
similarity index 100%
rename from content/zh/case-studies/crowdfire/index.html
rename to content/zh-cn/case-studies/crowdfire/index.html
diff --git a/content/zh/case-studies/denso/denso_featured_logo.svg b/content/zh-cn/case-studies/denso/denso_featured_logo.svg
similarity index 100%
rename from content/zh/case-studies/denso/denso_featured_logo.svg
rename to content/zh-cn/case-studies/denso/denso_featured_logo.svg
diff --git a/content/zh/case-studies/denso/index.html b/content/zh-cn/case-studies/denso/index.html
similarity index 100%
rename from content/zh/case-studies/denso/index.html
rename to content/zh-cn/case-studies/denso/index.html
diff --git a/content/zh/case-studies/golfnow/golfnow_featured.png b/content/zh-cn/case-studies/golfnow/golfnow_featured.png
similarity index 100%
rename from content/zh/case-studies/golfnow/golfnow_featured.png
rename to content/zh-cn/case-studies/golfnow/golfnow_featured.png
diff --git a/content/zh/case-studies/golfnow/golfnow_logo.png b/content/zh-cn/case-studies/golfnow/golfnow_logo.png
similarity index 100%
rename from content/zh/case-studies/golfnow/golfnow_logo.png
rename to content/zh-cn/case-studies/golfnow/golfnow_logo.png
diff --git a/content/zh/case-studies/golfnow/index.html b/content/zh-cn/case-studies/golfnow/index.html
similarity index 100%
rename from content/zh/case-studies/golfnow/index.html
rename to content/zh-cn/case-studies/golfnow/index.html
diff --git a/content/zh/case-studies/haufegroup/haufegroup_featured.png b/content/zh-cn/case-studies/haufegroup/haufegroup_featured.png
similarity index 100%
rename from content/zh/case-studies/haufegroup/haufegroup_featured.png
rename to content/zh-cn/case-studies/haufegroup/haufegroup_featured.png
diff --git a/content/zh/case-studies/haufegroup/haufegroup_logo.png b/content/zh-cn/case-studies/haufegroup/haufegroup_logo.png
similarity index 100%
rename from content/zh/case-studies/haufegroup/haufegroup_logo.png
rename to content/zh-cn/case-studies/haufegroup/haufegroup_logo.png
diff --git a/content/zh/case-studies/haufegroup/index.html b/content/zh-cn/case-studies/haufegroup/index.html
similarity index 100%
rename from content/zh/case-studies/haufegroup/index.html
rename to content/zh-cn/case-studies/haufegroup/index.html
diff --git a/content/zh/case-studies/huawei/huawei_featured.png b/content/zh-cn/case-studies/huawei/huawei_featured.png
similarity index 100%
rename from content/zh/case-studies/huawei/huawei_featured.png
rename to content/zh-cn/case-studies/huawei/huawei_featured.png
diff --git a/content/zh/case-studies/huawei/huawei_logo.png b/content/zh-cn/case-studies/huawei/huawei_logo.png
similarity index 100%
rename from content/zh/case-studies/huawei/huawei_logo.png
rename to content/zh-cn/case-studies/huawei/huawei_logo.png
diff --git a/content/zh/case-studies/huawei/index.html b/content/zh-cn/case-studies/huawei/index.html
similarity index 100%
rename from content/zh/case-studies/huawei/index.html
rename to content/zh-cn/case-studies/huawei/index.html
diff --git a/content/zh/case-studies/ibm/ibm_featured_logo.png b/content/zh-cn/case-studies/ibm/ibm_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/ibm/ibm_featured_logo.png
rename to content/zh-cn/case-studies/ibm/ibm_featured_logo.png
diff --git a/content/zh/case-studies/ibm/ibm_featured_logo.svg b/content/zh-cn/case-studies/ibm/ibm_featured_logo.svg
similarity index 100%
rename from content/zh/case-studies/ibm/ibm_featured_logo.svg
rename to content/zh-cn/case-studies/ibm/ibm_featured_logo.svg
diff --git a/content/zh/case-studies/ibm/index.html b/content/zh-cn/case-studies/ibm/index.html
similarity index 100%
rename from content/zh/case-studies/ibm/index.html
rename to content/zh-cn/case-studies/ibm/index.html
diff --git a/content/zh/case-studies/ing/index.html b/content/zh-cn/case-studies/ing/index.html
similarity index 100%
rename from content/zh/case-studies/ing/index.html
rename to content/zh-cn/case-studies/ing/index.html
diff --git a/content/zh/case-studies/ing/ing_featured_logo.png b/content/zh-cn/case-studies/ing/ing_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/ing/ing_featured_logo.png
rename to content/zh-cn/case-studies/ing/ing_featured_logo.png
diff --git a/content/zh/case-studies/ing/ing_featured_logo.svg b/content/zh-cn/case-studies/ing/ing_featured_logo.svg
similarity index 100%
rename from content/zh/case-studies/ing/ing_featured_logo.svg
rename to content/zh-cn/case-studies/ing/ing_featured_logo.svg
diff --git a/content/zh/case-studies/jd-com/index.html b/content/zh-cn/case-studies/jd-com/index.html
similarity index 100%
rename from content/zh/case-studies/jd-com/index.html
rename to content/zh-cn/case-studies/jd-com/index.html
diff --git a/content/zh/case-studies/jd-com/jd-com_featured_logo.png b/content/zh-cn/case-studies/jd-com/jd-com_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/jd-com/jd-com_featured_logo.png
rename to content/zh-cn/case-studies/jd-com/jd-com_featured_logo.png
diff --git a/content/zh/case-studies/jd-com/jd.com_featured_logo.svg b/content/zh-cn/case-studies/jd-com/jd.com_featured_logo.svg
similarity index 100%
rename from content/zh/case-studies/jd-com/jd.com_featured_logo.svg
rename to content/zh-cn/case-studies/jd-com/jd.com_featured_logo.svg
diff --git a/content/zh/case-studies/naic/naic_featured_logo.png b/content/zh-cn/case-studies/naic/naic_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/naic/naic_featured_logo.png
rename to content/zh-cn/case-studies/naic/naic_featured_logo.png
diff --git a/content/zh/case-studies/nav/nav_featured_logo.png b/content/zh-cn/case-studies/nav/nav_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/nav/nav_featured_logo.png
rename to content/zh-cn/case-studies/nav/nav_featured_logo.png
diff --git a/content/zh/case-studies/nerdalize/nerdalize_featured_logo.png b/content/zh-cn/case-studies/nerdalize/nerdalize_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/nerdalize/nerdalize_featured_logo.png
rename to content/zh-cn/case-studies/nerdalize/nerdalize_featured_logo.png
diff --git a/content/zh/case-studies/netease/index.html b/content/zh-cn/case-studies/netease/index.html
similarity index 100%
rename from content/zh/case-studies/netease/index.html
rename to content/zh-cn/case-studies/netease/index.html
diff --git a/content/zh/case-studies/netease/netease_featured_logo.png b/content/zh-cn/case-studies/netease/netease_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/netease/netease_featured_logo.png
rename to content/zh-cn/case-studies/netease/netease_featured_logo.png
diff --git a/content/zh/case-studies/newyorktimes/newyorktimes_featured.png b/content/zh-cn/case-studies/newyorktimes/newyorktimes_featured.png
similarity index 100%
rename from content/zh/case-studies/newyorktimes/newyorktimes_featured.png
rename to content/zh-cn/case-studies/newyorktimes/newyorktimes_featured.png
diff --git a/content/zh/case-studies/newyorktimes/newyorktimes_logo.png b/content/zh-cn/case-studies/newyorktimes/newyorktimes_logo.png
similarity index 100%
rename from content/zh/case-studies/newyorktimes/newyorktimes_logo.png
rename to content/zh-cn/case-studies/newyorktimes/newyorktimes_logo.png
diff --git a/content/zh/case-studies/nokia/nokia_featured_logo.png b/content/zh-cn/case-studies/nokia/nokia_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/nokia/nokia_featured_logo.png
rename to content/zh-cn/case-studies/nokia/nokia_featured_logo.png
diff --git a/content/zh/case-studies/nordstrom/index.html b/content/zh-cn/case-studies/nordstrom/index.html
similarity index 100%
rename from content/zh/case-studies/nordstrom/index.html
rename to content/zh-cn/case-studies/nordstrom/index.html
diff --git a/content/zh/case-studies/nordstrom/nordstrom_featured_logo.png b/content/zh-cn/case-studies/nordstrom/nordstrom_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/nordstrom/nordstrom_featured_logo.png
rename to content/zh-cn/case-studies/nordstrom/nordstrom_featured_logo.png
diff --git a/content/zh/case-studies/northwestern-mutual/northwestern_featured_logo.png b/content/zh-cn/case-studies/northwestern-mutual/northwestern_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/northwestern-mutual/northwestern_featured_logo.png
rename to content/zh-cn/case-studies/northwestern-mutual/northwestern_featured_logo.png
diff --git a/content/zh/case-studies/ocado/ocado_featured_logo.png b/content/zh-cn/case-studies/ocado/ocado_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/ocado/ocado_featured_logo.png
rename to content/zh-cn/case-studies/ocado/ocado_featured_logo.png
diff --git a/content/zh/case-studies/openAI/openai_featured.png b/content/zh-cn/case-studies/openAI/openai_featured.png
similarity index 100%
rename from content/zh/case-studies/openAI/openai_featured.png
rename to content/zh-cn/case-studies/openAI/openai_featured.png
diff --git a/content/zh/case-studies/openAI/openai_logo.png b/content/zh-cn/case-studies/openAI/openai_logo.png
similarity index 100%
rename from content/zh/case-studies/openAI/openai_logo.png
rename to content/zh-cn/case-studies/openAI/openai_logo.png
diff --git a/content/zh/case-studies/peardeck/peardeck_featured.png b/content/zh-cn/case-studies/peardeck/peardeck_featured.png
similarity index 100%
rename from content/zh/case-studies/peardeck/peardeck_featured.png
rename to content/zh-cn/case-studies/peardeck/peardeck_featured.png
diff --git a/content/zh/case-studies/peardeck/peardeck_logo.png b/content/zh-cn/case-studies/peardeck/peardeck_logo.png
similarity index 100%
rename from content/zh/case-studies/peardeck/peardeck_logo.png
rename to content/zh-cn/case-studies/peardeck/peardeck_logo.png
diff --git a/content/zh/case-studies/pearson/pearson_featured.png b/content/zh-cn/case-studies/pearson/pearson_featured.png
similarity index 100%
rename from content/zh/case-studies/pearson/pearson_featured.png
rename to content/zh-cn/case-studies/pearson/pearson_featured.png
diff --git a/content/zh/case-studies/pearson/pearson_logo.png b/content/zh-cn/case-studies/pearson/pearson_logo.png
similarity index 100%
rename from content/zh/case-studies/pearson/pearson_logo.png
rename to content/zh-cn/case-studies/pearson/pearson_logo.png
diff --git a/content/zh/case-studies/pingcap/pingcap_featured_logo.png b/content/zh-cn/case-studies/pingcap/pingcap_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/pingcap/pingcap_featured_logo.png
rename to content/zh-cn/case-studies/pingcap/pingcap_featured_logo.png
diff --git a/content/zh/case-studies/pinterest/pinterest_feature.png b/content/zh-cn/case-studies/pinterest/pinterest_feature.png
similarity index 100%
rename from content/zh/case-studies/pinterest/pinterest_feature.png
rename to content/zh-cn/case-studies/pinterest/pinterest_feature.png
diff --git a/content/zh/case-studies/pinterest/pinterest_logo.png b/content/zh-cn/case-studies/pinterest/pinterest_logo.png
similarity index 100%
rename from content/zh/case-studies/pinterest/pinterest_logo.png
rename to content/zh-cn/case-studies/pinterest/pinterest_logo.png
diff --git a/content/zh/case-studies/prowise/prowise_featured_logo.png b/content/zh-cn/case-studies/prowise/prowise_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/prowise/prowise_featured_logo.png
rename to content/zh-cn/case-studies/prowise/prowise_featured_logo.png
diff --git a/content/zh/case-studies/ricardo-ch/ricardo-ch_featured_logo.png b/content/zh-cn/case-studies/ricardo-ch/ricardo-ch_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/ricardo-ch/ricardo-ch_featured_logo.png
rename to content/zh-cn/case-studies/ricardo-ch/ricardo-ch_featured_logo.png
diff --git a/content/zh/case-studies/slamtec/slamtec_featured_logo.png b/content/zh-cn/case-studies/slamtec/slamtec_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/slamtec/slamtec_featured_logo.png
rename to content/zh-cn/case-studies/slamtec/slamtec_featured_logo.png
diff --git a/content/zh/case-studies/slingtv/slingtv_featured_logo.png b/content/zh-cn/case-studies/slingtv/slingtv_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/slingtv/slingtv_featured_logo.png
rename to content/zh-cn/case-studies/slingtv/slingtv_featured_logo.png
diff --git a/content/zh/case-studies/sos/sos_featured_logo.png b/content/zh-cn/case-studies/sos/sos_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/sos/sos_featured_logo.png
rename to content/zh-cn/case-studies/sos/sos_featured_logo.png
diff --git a/content/zh/case-studies/spotify/spotify_featured_logo.png b/content/zh-cn/case-studies/spotify/spotify_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/spotify/spotify_featured_logo.png
rename to content/zh-cn/case-studies/spotify/spotify_featured_logo.png
diff --git a/content/zh/case-studies/squarespace/index.html b/content/zh-cn/case-studies/squarespace/index.html
similarity index 100%
rename from content/zh/case-studies/squarespace/index.html
rename to content/zh-cn/case-studies/squarespace/index.html
diff --git a/content/zh/case-studies/squarespace/squarespace_featured_logo.png b/content/zh-cn/case-studies/squarespace/squarespace_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/squarespace/squarespace_featured_logo.png
rename to content/zh-cn/case-studies/squarespace/squarespace_featured_logo.png
diff --git a/content/zh/case-studies/squarespace/squarespace_featured_logo.svg b/content/zh-cn/case-studies/squarespace/squarespace_featured_logo.svg
similarity index 100%
rename from content/zh/case-studies/squarespace/squarespace_featured_logo.svg
rename to content/zh-cn/case-studies/squarespace/squarespace_featured_logo.svg
diff --git a/content/zh/case-studies/thredup/thredup_featured_logo.png b/content/zh-cn/case-studies/thredup/thredup_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/thredup/thredup_featured_logo.png
rename to content/zh-cn/case-studies/thredup/thredup_featured_logo.png
diff --git a/content/zh/case-studies/vsco/vsco_featured_logo.png b/content/zh-cn/case-studies/vsco/vsco_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/vsco/vsco_featured_logo.png
rename to content/zh-cn/case-studies/vsco/vsco_featured_logo.png
diff --git a/content/zh-cn/case-studies/wikimedia/index.html b/content/zh-cn/case-studies/wikimedia/index.html
new file mode 100644
index 0000000000..8800c5f19e
--- /dev/null
+++ b/content/zh-cn/case-studies/wikimedia/index.html
@@ -0,0 +1,148 @@
+---
+title: 案例研究:Wikimedia
+case_study_styles: true
+cid: caseStudies
+
+new_case_study_styles: true
+heading_title_text: Wikimedia
+use_gradient_overlay: true
+subheading: >
+ 利用 Kubernetes 构建工具提升世界的维基
+case_study_details:
+ - 公司: Wikimedia
+ - 地点: 加州旧金山
+---
+
+
+
+非营利的 Wikimedia 基金会运营着一些世界上最大的合作编辑参考项目,包括 Wikipedia。为了帮助用户维护和使用 wiki,它运行 Wikimedia 工具实验室,这是一个托管环境,为社区开发人员工作的工具和机器人,以帮助编辑和其他志愿者做他们的工作,包括减少破坏。Wikimedia 工具实验室周围的社区在近 10 年前开始形成。
+
+
+{{< case-studies/quote author="Yuvi Panda, Wikimedia 基金会和 Wikimedia 工具实验室的运维工程师">}}
+
+
+
+
+“Wikimedia 工具实验室对于确保世界各地的 wiki 尽可能正常运行至关重要。因为它有机地生长了近 10 年,所以它已成为一个极具挑战性且难以维护的环境。它就像一个大的泥球,你真的看不透它。借助 Kubernetes,我们正在简化环境并让开发人员更容易构建出使 wiki 更好运行的工具。”
+{{< /case-studies/quote >}}
+
+
+挑战
+
+
+
+ 简化复杂、难以管理的基础架构
+ 允许开发人员使用现有技术继续编写工具和机器人
+
+
+
+为什么要使用 Kubernetes
+
+
+
+ Wikimedia 工具实验室之所以选择 Kubernetes,是因为它可以模仿现有的工作流程,同时降低复杂性。
+
+
+
+解决方案
+
+
+
+ 将旧系统和复杂的基础设施迁移到 Kubernetes
+
+
+
+结果
+
+
+
+ 现在占 Web 流量 40% 以上的 20% Web 工具都在 Kubernetes 上运行
+ 一个 25 节点集群可跟上每个新 Kubernetes 版本
+ 多亏了 Kubernetes,数千行旧代码可被删除
+
+
+
+使用 Kubernetes 提供维护 wiki 的工具
+
+
+Wikimedia 工具实验室由四个半带薪员工和两名志愿者管理。基础架构无法使开发人员轻松或直观地构建机器人和其他工具,使 wiki 更易于工作。Yuvi 说,“它非常混乱,我们有很多的 Perl 和 Bash 缠绕在上面,一切都是超级脆弱。”
+
+
+为了解决这个问题,Wikimedia 工具实验室将其部分基础设施迁移到了 Kubernetes,为最终迁移整个系统做准备。Yuvi 说,Kubernetes 大大简化了维护。目标是允许创建机器人和其他工具的开发人员使用他们想要的任何开发方法,但使 Wikimedia 工具实验室更容易维护托管和共享它们所需的基础结构。
+
+
+Yuvi 说:“借助 Kubernetes,我能够删除大量我们定制的代码,这使得所有内容更易于维护,我们的用户代码也以比以前更稳定的方式运行。”
+
+
+简化基础架构让 wiki 更好地运行
+
+
+Wikimedia 工具实验室在最初的 Kubernetes 部署中取得了巨大成功。旧代码正在被简化和消除,使开发人员不必改变他们编写工具和机器人的方式,这些工具和机器人的运行方式比过去更稳定。带薪员工和志愿者能够更好地解决问题。
+
+
+将来,随着更完整的迁移到 Kubernetes,Wikimedia 工具实验室希望更轻松地托管和维护有助于在世界各地运行 wiki 的机器人和工具。该工具实验室已经拥有来自 800 名志愿者的大约 1300 个工具和机器人,而且每天提交量会更多。占 Web 流量 60% 以上的工具实验室的 Web 工具中有 20% 现在运行在 Kubernetes 上。工具实验室有一个 25 节点的集群,可以跟上每个新的 Kubernetes 版本。许多现有的 Web 工具正在迁移到 Kubernetes。
+
+
+Yuvi 说:“我们的目标是确保世界各地的人们能够尽可能轻松地分享知识,Kubernetes 帮助实现了这一点,它让世界各地的 wiki 更容易拥有蓬勃发展所需的工具。”
diff --git a/content/zh/case-studies/wikimedia/wikimedia_featured.png b/content/zh-cn/case-studies/wikimedia/wikimedia_featured.png
similarity index 100%
rename from content/zh/case-studies/wikimedia/wikimedia_featured.png
rename to content/zh-cn/case-studies/wikimedia/wikimedia_featured.png
diff --git a/content/zh-cn/case-studies/wikimedia/wikimedia_featured.svg b/content/zh-cn/case-studies/wikimedia/wikimedia_featured.svg
new file mode 100644
index 0000000000..5fa786aaa5
--- /dev/null
+++ b/content/zh-cn/case-studies/wikimedia/wikimedia_featured.svg
@@ -0,0 +1 @@
+kubernetes.io-logos2
\ No newline at end of file
diff --git a/content/zh/case-studies/wikimedia/wikimedia_logo.png b/content/zh-cn/case-studies/wikimedia/wikimedia_logo.png
similarity index 100%
rename from content/zh/case-studies/wikimedia/wikimedia_logo.png
rename to content/zh-cn/case-studies/wikimedia/wikimedia_logo.png
diff --git a/content/zh/case-studies/wink/index.html b/content/zh-cn/case-studies/wink/index.html
similarity index 100%
rename from content/zh/case-studies/wink/index.html
rename to content/zh-cn/case-studies/wink/index.html
diff --git a/content/zh/case-studies/wink/wink_featured.png b/content/zh-cn/case-studies/wink/wink_featured.png
similarity index 100%
rename from content/zh/case-studies/wink/wink_featured.png
rename to content/zh-cn/case-studies/wink/wink_featured.png
diff --git a/content/zh/case-studies/wink/wink_logo.png b/content/zh-cn/case-studies/wink/wink_logo.png
similarity index 100%
rename from content/zh/case-studies/wink/wink_logo.png
rename to content/zh-cn/case-studies/wink/wink_logo.png
diff --git a/content/zh/case-studies/woorank/woorank_featured_logo.png b/content/zh-cn/case-studies/woorank/woorank_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/woorank/woorank_featured_logo.png
rename to content/zh-cn/case-studies/woorank/woorank_featured_logo.png
diff --git a/content/zh/case-studies/workiva/index.html b/content/zh-cn/case-studies/workiva/index.html
similarity index 100%
rename from content/zh/case-studies/workiva/index.html
rename to content/zh-cn/case-studies/workiva/index.html
diff --git a/content/zh/case-studies/workiva/workiva_featured_logo.png b/content/zh-cn/case-studies/workiva/workiva_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/workiva/workiva_featured_logo.png
rename to content/zh-cn/case-studies/workiva/workiva_featured_logo.png
diff --git a/content/zh/case-studies/yahoo-japan/index.html b/content/zh-cn/case-studies/yahoo-japan/index.html
similarity index 100%
rename from content/zh/case-studies/yahoo-japan/index.html
rename to content/zh-cn/case-studies/yahoo-japan/index.html
diff --git a/content/zh/case-studies/yahoo-japan/yahooJapan_logo.png b/content/zh-cn/case-studies/yahoo-japan/yahooJapan_logo.png
similarity index 100%
rename from content/zh/case-studies/yahoo-japan/yahooJapan_logo.png
rename to content/zh-cn/case-studies/yahoo-japan/yahooJapan_logo.png
diff --git a/content/zh/case-studies/ygrene/index.html b/content/zh-cn/case-studies/ygrene/index.html
similarity index 100%
rename from content/zh/case-studies/ygrene/index.html
rename to content/zh-cn/case-studies/ygrene/index.html
diff --git a/content/zh/case-studies/ygrene/ygrene_featured_logo.png b/content/zh-cn/case-studies/ygrene/ygrene_featured_logo.png
similarity index 100%
rename from content/zh/case-studies/ygrene/ygrene_featured_logo.png
rename to content/zh-cn/case-studies/ygrene/ygrene_featured_logo.png
diff --git a/content/zh/case-studies/zalando/index.html b/content/zh-cn/case-studies/zalando/index.html
similarity index 100%
rename from content/zh/case-studies/zalando/index.html
rename to content/zh-cn/case-studies/zalando/index.html
diff --git a/content/zh/case-studies/zalando/zalando_feature_logo.png b/content/zh-cn/case-studies/zalando/zalando_feature_logo.png
similarity index 100%
rename from content/zh/case-studies/zalando/zalando_feature_logo.png
rename to content/zh-cn/case-studies/zalando/zalando_feature_logo.png
diff --git a/content/zh/community/_index.html b/content/zh-cn/community/_index.html
similarity index 100%
rename from content/zh/community/_index.html
rename to content/zh-cn/community/_index.html
diff --git a/content/zh/community/code-of-conduct.md b/content/zh-cn/community/code-of-conduct.md
similarity index 100%
rename from content/zh/community/code-of-conduct.md
rename to content/zh-cn/community/code-of-conduct.md
diff --git a/content/zh/community/static/README.md b/content/zh-cn/community/static/README.md
similarity index 100%
rename from content/zh/community/static/README.md
rename to content/zh-cn/community/static/README.md
diff --git a/content/zh/community/static/cncf-code-of-conduct.md b/content/zh-cn/community/static/cncf-code-of-conduct.md
similarity index 100%
rename from content/zh/community/static/cncf-code-of-conduct.md
rename to content/zh-cn/community/static/cncf-code-of-conduct.md
diff --git a/content/zh/docs/_index.md b/content/zh-cn/docs/_index.md
similarity index 100%
rename from content/zh/docs/_index.md
rename to content/zh-cn/docs/_index.md
diff --git a/content/zh/docs/concepts/_index.md b/content/zh-cn/docs/concepts/_index.md
similarity index 100%
rename from content/zh/docs/concepts/_index.md
rename to content/zh-cn/docs/concepts/_index.md
diff --git a/content/zh/docs/concepts/architecture/_index.md b/content/zh-cn/docs/concepts/architecture/_index.md
similarity index 100%
rename from content/zh/docs/concepts/architecture/_index.md
rename to content/zh-cn/docs/concepts/architecture/_index.md
diff --git a/content/zh/docs/concepts/architecture/cloud-controller.md b/content/zh-cn/docs/concepts/architecture/cloud-controller.md
similarity index 100%
rename from content/zh/docs/concepts/architecture/cloud-controller.md
rename to content/zh-cn/docs/concepts/architecture/cloud-controller.md
diff --git a/content/zh/docs/concepts/architecture/control-plane-node-communication.md b/content/zh-cn/docs/concepts/architecture/control-plane-node-communication.md
similarity index 86%
rename from content/zh/docs/concepts/architecture/control-plane-node-communication.md
rename to content/zh-cn/docs/concepts/architecture/control-plane-node-communication.md
index 8cf742e272..8a92d69f2e 100644
--- a/content/zh/docs/concepts/architecture/control-plane-node-communication.md
+++ b/content/zh-cn/docs/concepts/architecture/control-plane-node-communication.md
@@ -24,7 +24,7 @@ This document catalogs the communication paths between the control plane (apiser
## 节点到控制面
@@ -39,11 +39,11 @@ API 服务器被配置为在一个安全的 HTTPS 端口(通常为 443)上
或[服务账号令牌](/zh/docs/reference/access-authn-authz/authentication/#service-account-tokens)的时候。
应该使用集群的公共根证书开通节点,这样它们就能够基于有效的客户端凭据安全地连接 API 服务器。
一种好的方法是以客户端证书的形式将客户端凭据提供给 kubelet。
-请查看 [kubelet TLS 启动引导](/zh/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/)
+请查看 [kubelet TLS 启动引导](/zh/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/)
以了解如何自动提供 kubelet 客户端证书。
为了对这个连接进行认证,使用 `--kubelet-certificate-authority` 标志给 API
服务器提供一个根证书包,用于 kubelet 的服务证书。
@@ -114,13 +114,13 @@ Finally, [Kubelet authentication and/or authorization](/docs/reference/command-l
kubelet 之间使用 [SSH 隧道](#ssh-tunnels)。
最后,应该启用
-[kubelet 用户认证和/或鉴权](/zh/docs/reference/command-line-tools-reference/kubelet-authentication-authorization/)
+[kubelet 用户认证和/或鉴权](/zh/docs/reference/access-authn-authz/kubelet-authn-authz/)
来保护 kubelet API。
### API 服务器到节点、Pod 和服务
@@ -136,7 +136,7 @@ The connections from the apiserver to a node, pod, or service default to plain H
Kubernetes supports SSH tunnels to protect the control plane to nodes communication paths. In this configuration, the apiserver initiates an SSH tunnel to each node in the cluster (connecting to the ssh server listening on port 22) and passes all traffic destined for a kubelet, node, pod, or service through the tunnel.
This tunnel ensures that the traffic is not exposed outside of the network in which the nodes are running.
-SSH tunnels are currently deprecated so you shouldn't opt to use them unless you know what you are doing. The Konnectivity service is a replacement for this communication channel.
+SSH tunnels are currently deprecated, so you shouldn't opt to use them unless you know what you are doing. The Konnectivity service is a replacement for this communication channel.
-->
### SSH 隧道 {#ssh-tunnels}
diff --git a/content/zh/docs/concepts/architecture/controller.md b/content/zh-cn/docs/concepts/architecture/controller.md
similarity index 100%
rename from content/zh/docs/concepts/architecture/controller.md
rename to content/zh-cn/docs/concepts/architecture/controller.md
diff --git a/content/zh/docs/concepts/architecture/cri.md b/content/zh-cn/docs/concepts/architecture/cri.md
similarity index 100%
rename from content/zh/docs/concepts/architecture/cri.md
rename to content/zh-cn/docs/concepts/architecture/cri.md
diff --git a/content/zh/docs/concepts/architecture/garbage-collection.md b/content/zh-cn/docs/concepts/architecture/garbage-collection.md
similarity index 100%
rename from content/zh/docs/concepts/architecture/garbage-collection.md
rename to content/zh-cn/docs/concepts/architecture/garbage-collection.md
diff --git a/content/zh/docs/concepts/architecture/nodes.md b/content/zh-cn/docs/concepts/architecture/nodes.md
similarity index 100%
rename from content/zh/docs/concepts/architecture/nodes.md
rename to content/zh-cn/docs/concepts/architecture/nodes.md
diff --git a/content/zh/docs/concepts/cluster-administration/_index.md b/content/zh-cn/docs/concepts/cluster-administration/_index.md
similarity index 96%
rename from content/zh/docs/concepts/cluster-administration/_index.md
rename to content/zh-cn/docs/concepts/cluster-administration/_index.md
index e1e929cfa6..d37c50dcad 100644
--- a/content/zh/docs/concepts/cluster-administration/_index.md
+++ b/content/zh-cn/docs/concepts/cluster-administration/_index.md
@@ -123,14 +123,14 @@ Before choosing a guide, here are some considerations:
### Securing the kubelet
* [Master-Node communication](/docs/concepts/architecture/master-node-communication/)
-* [TLS bootstrapping](/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/)
+* [TLS bootstrapping](/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/)
* [Kubelet authentication/authorization](/docs/admin/kubelet-authentication-authorization/)
-->
### 保护 kubelet {#securing-the-kubelet}
* [主控节点通信](/zh/docs/concepts/architecture/control-plane-node-communication/)
-* [TLS 引导](/zh/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/)
-* [Kubelet 认证/授权](/zh/docs/reference/command-line-tools-reference/kubelet-authentication-authorization/)
+* [TLS 引导](/zh/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/)
+* [Kubelet 认证/授权](/zh/docs/reference/access-authn-authz/kubelet-authn-authz/)
## 网络和网络策略
@@ -54,7 +54,7 @@ Add-ons 扩展了 Kubernetes 的功能。
* [Cilium](https://github.com/cilium/cilium) 是一个 L3 网络和网络策略插件,能够透明的实施 HTTP/API/L7 策略。
同时支持路由(routing)和覆盖/封装(overlay/encapsulation)模式。
* [CNI-Genie](https://github.com/Huawei-PaaS/CNI-Genie) 使 Kubernetes 无缝连接到一种 CNI 插件,
- 例如:Flannel、Calico、Canal、Romana 或者 Weave。
+ 例如:Flannel、Calico、Canal 或者 Weave。
* [Contiv](https://contivpp.io/) 为各种用例和丰富的策略框架提供可配置的网络
(使用 BGP 的本机 L3、使用 vxlan 的覆盖、标准 L2 和 Cisco-SDN/ACI)。
Contiv 项目完全[开源](https://github.com/contiv)。
@@ -84,9 +84,8 @@ Add-ons 扩展了 Kubernetes 的功能。
CaaS / PaaS 平台(例如关键容器服务(PKS)和 OpenShift)之间的集成。
* [Nuage](https://github.com/nuagenetworks/nuage-kubernetes/blob/v5.1.1-1/docs/kubernetes-1-installation.rst)
是一个 SDN 平台,可在 Kubernetes Pods 和非 Kubernetes 环境之间提供基于策略的联网,并具有可视化和安全监控。
-* Romana 是一个 pod 网络的第三层解决方案,并支持
- [NetworkPolicy API](/zh/docs/concepts/services-networking/network-policies/)。
- Kubeadm add-on 安装细节可以在[这里](https://github.com/romana/romana/tree/master/containerize)找到。
+* [Romana](https://github.com/romana) 是一个 Pod 网络的第三层解决方案,并支持
+ [NetworkPolicy](/zh-cn/docs/concepts/services-networking/network-policies/) API。
* [Weave Net](https://www.weave.works/docs/net/latest/kubernetes/kube-addon/)
提供在网络分组两端参与工作的网络和网络策略,并且不需要额外的数据库。
@@ -129,7 +128,7 @@ Add-ons 扩展了 Kubernetes 的功能。
运行虚拟机的 add-ons。通常运行在裸机集群上。
* [节点问题检测器](https://github.com/kubernetes/node-problem-detector) 在 Linux 节点上运行,
并将系统问题报告为[事件](/docs/reference/kubernetes-api/cluster-resources/event-v1/)
- 或[节点状况](/zh/docs/concepts/architecture/nodes/#condition)。
+ 或[节点状况](/zh-cn/docs/concepts/architecture/nodes/#condition)。
@@ -62,7 +67,7 @@ as an introduction to various technologies and serves as a jumping-off point.
The following networking options are sorted alphabetically - the order does not
imply any preferential status.
-->
-## 如何实现 Kubernetes 的网络模型
+## 如何实现 Kubernetes 的网络模型 {#how-to-implement-the-kubernetes-networking-model}
有很多种方式可以实现这种网络模型,本文档并不是对各种实现技术的详细研究,
但是希望可以作为对各种技术的详细介绍,并且成为你研究的起点。
@@ -105,7 +110,7 @@ Using this CNI plugin allows Kubernetes pods to have the same IP address inside
Additionally, the CNI can be run alongside [Calico for network policy enforcement](https://docs.aws.amazon.com/eks/latest/userguide/calico.html). The AWS VPC CNI project is open source with [documentation on GitHub](https://github.com/aws/amazon-vpc-cni-k8s).
-->
-### Kubernetes 的 AWS VPC CNI
+### Kubernetes 的 AWS VPC CNI {#aws-vpc-cni-for-kubernetes}
[AWS VPC CNI](https://github.com/aws/amazon-vpc-cni-k8s) 为 Kubernetes 集群提供了集成的
AWS 虚拟私有云(VPC)网络。该 CNI 插件提供了高吞吐量和可用性,低延迟以及最小的网络抖动。
@@ -113,7 +118,7 @@ AWS 虚拟私有云(VPC)网络。该 CNI 插件提供了高吞吐量和可
这包括使用 VPC 流日志、VPC 路由策略和安全组进行网络流量隔离的功能。
使用该 CNI 插件,可使 Kubernetes Pod 拥有与在 VPC 网络上相同的 IP 地址。
-CNI 将 AWS 弹性网络接口(ENI)分配给每个 Kubernetes 节点,并将每个 ENI 的辅助 IP 范围用于该节点上的 Pod 。
+CNI 将 AWS 弹性网络接口(ENI)分配给每个 Kubernetes 节点,并将每个 ENI 的辅助 IP 范围用于该节点上的 Pod。
CNI 包含用于 ENI 和 IP 地址的预分配的控件,以便加快 Pod 的启动时间,并且能够支持多达 2000 个节点的大型集群。
此外,CNI 可以与
@@ -121,20 +126,20 @@ CNI 包含用于 ENI 和 IP 地址的预分配的控件,以便加快 Pod 的
AWS VPC CNI 项目是开源的,请查看 [GitHub 上的文档](https://github.com/aws/amazon-vpc-cni-k8s)。
-### Kubernetes 的 Azure CNI
+### Kubernetes 的 Azure CNI {#azure-cni-for-kubernetes}
[Azure CNI](https://docs.microsoft.com/en-us/azure/virtual-network/container-networking-overview)
是一个[开源插件](https://github.com/Azure/azure-container-networking/blob/master/docs/cni.md),
将 Kubernetes Pods 和 Azure 虚拟网络(也称为 VNet)集成在一起,可提供与 VM 相当的网络性能。
-Pod 可以通过 Express Route 或者 站点到站点的 VPN 来连接到对等的 VNet ,
+Pod 可以通过 Express Route 或者 站点到站点的 VPN 来连接到对等的 VNet,
也可以从这些网络来直接访问 Pod。Pod 可以访问受服务端点或者受保护链接的 Azure 服务,比如存储和 SQL。
你可以使用 VNet 安全策略和路由来筛选 Pod 流量。
-该插件通过利用在 Kubernetes 节点的网络接口上预分配的辅助 IP 池将 VNet 分配给 Pod 。
+该插件通过利用在 Kubernetes 节点的网络接口上预分配的辅助 IP 池将 VNet 分配给 Pod。
Azure CNI 可以在
[Azure Kubernetes Service (AKS)](https://docs.microsoft.com/en-us/azure/aks/configure-azure-cni) 中获得。
@@ -142,7 +147,7 @@ Azure CNI 可以在
### Calico
@@ -150,7 +155,8 @@ Azure CNI 可以在
用于基于容器、虚拟机和本地主机的工作负载。
Calico 支持多个数据面,包括:纯 Linux eBPF 的数据面、标准的 Linux 联网数据面
以及 Windows HNS 数据面。Calico 在提供完整的联网堆栈的同时,还可与
-[云驱动 CNIs](https://docs.projectcalico.org/networking/determine-best-networking#calico-compatible-cni-plugins-and-cloud-provider-integrations) 联合使用,以保证网络策略实施。
+[云驱动 CNIs](https://projectcalico.docs.tigera.io/networking/determine-best-networking#calico-compatible-cni-plugins-and-cloud-provider-integrations)
+联合使用,以保证网络策略实施。
-### 华为的 CNI-Genie
+### 华为的 CNI-Genie {#cni-genie-from-huawei}
[CNI-Genie](https://github.com/cni-genie/CNI-Genie) 是一个 CNI 插件,
可以让 Kubernetes 在运行时使用不同的[网络模型](#the-kubernetes-network-model)的
[实现同时被访问](https://github.com/cni-genie/CNI-Genie/blob/master/docs/multiple-cni-plugins/README.md#what-cni-genie-feature-1-multiple-cni-plugins-enables)。
这包括以
[CNI 插件](https://github.com/containernetworking/cni#3rd-party-plugins)运行的任何实现,比如
-[Flannel](https://github.com/coreos/flannel#flannel)、
+[Flannel](https://github.com/flannel-io/flannel#flannel)、
[Calico](https://projectcalico.docs.tigera.io/about/about-calico/)、
[Weave-net](https://www.weave.works/oss/net/)。
@@ -240,13 +246,11 @@ Kubernetes, using the [fd.io](https://fd.io/) data plane.
### Contiv-VPP
[Contiv-VPP](https://contivpp.io/) 是用于 Kubernetes 的用户空间、面向性能的网络插件,使用 [fd.io](https://fd.io/) 数据平面。
-
-### Contrail/Tungsten Fabric
-
[Contrail](https://www.juniper.net/us/en/products-services/sdn/contrail/contrail-networking/)
是基于 [Tungsten Fabric](https://tungsten.io) 的,真正开放的多云网络虚拟化和策略管理平台。
Contrail 和 Tungsten Fabric 与各种编排系统集成在一起,例如 Kubernetes、OpenShift、OpenStack 和 Mesos,
@@ -298,7 +302,7 @@ Kubernetes 所需要的覆盖网络。已经有许多人报告了使用 Flannel
### Hybridnet
[Hybridnet](https://github.com/alibaba/hybridnet) 是一个为混合云设计的开源 CNI 插件,
-它为一个或多个集群中的容器提供覆盖和底层网络。 Overlay 和 underlay 容器可以在同一个节点上运行,
+它为一个或多个集群中的容器提供覆盖和底层网络。Overlay 和 underlay 容器可以在同一个节点上运行,
并具有集群范围的双向网络连接。
### L2 networks and linux bridging
-如果你具有一个“哑”的L2网络,例如“裸机”环境中的简单交换机,则应该能够执行与上述 GCE 设置类似的操作。
+如果你具有一个“哑”的 L2 网络,例如“裸机”环境中的简单交换机,则应该能够执行与上述 GCE 设置类似的操作。
请注意,这些说明仅是非常简单的尝试过-似乎可行,但尚未经过全面测试。
如果你使用此技术并完善了流程,请告诉我们。
-根据 Lars Kellogg-Stedman 的这份非常不错的“Linux 网桥设备”
+根据 Lars Kellogg-Stedman 的这份非常不错的 “Linux 网桥设备”
[使用说明](https://blog.oddbit.com/2014/08/11/four-ways-to-connect-a-docker/)来进行操作。
+### OVN4NFV-K8s-Plugin(基于 OVN 的 CNI 控制器和插件) {#ovn4nfv-k8s-plugin-ovn-based-cni-controller-plugin}
+
+[OVN4NFV-K8S-Plugin](https://github.com/opnfv/ovn4nfv-k8s-plugin) 是基于 OVN 的
+CNI 控制器插件,提供基于云原生的服务功能链 (SFC)、多个 OVN
+覆盖网络、动态子网创建、虚拟网络的动态创建、VLAN Provider 网络、Direct Provider
+网络且可与其他多网络插件组合,非常适合多集群网络中基于边缘的云原生工作负载。
+
-### OVN (开放式虚拟网络)
+### OVN(开放式虚拟网络) {#ovn-open-virtual-networking}
OVN 是一个由 Open vSwitch 社区开发的开源的网络虚拟化解决方案。
它允许创建逻辑交换器、逻辑路由、状态 ACL、负载均衡等等来建立不同的虚拟网络拓扑。
-该项目有一个特定的Kubernetes插件和文档 [ovn-kubernetes](https://github.com/openvswitch/ovn-kubernetes)。
+该项目在 [ovn-kubernetes](https://github.com/openvswitch/ovn-kubernetes)
+提供特定的 Kubernetes 插件和文档。
-### Weaveworks 的 Weave Net
+### Weaveworks 的 Weave Net {#weave-net-from-weaveworks}
-[Weave Net](https://www.weave.works/oss/net/) 是 Kubernetes 及其
-托管应用程序的弹性且易于使用的网络系统。
+[Weave Net](https://www.weave.works/oss/net/) 为 Kubernetes
+及其托管应用提供的、弹性且易用的网络系统。
Weave Net 可以作为 [CNI 插件](https://www.weave.works/docs/net/latest/cni-plugin/) 运行或者独立运行。
在这两种运行方式里,都不需要任何配置或额外的代码即可运行,并且在两种情况下,
网络都为每个 Pod 提供一个 IP 地址 -- 这是 Kubernetes 的标准配置。
@@ -456,9 +473,8 @@ Weave Net 可以作为 [CNI 插件](https://www.weave.works/docs/net/latest/cni-
-网络模型的早期设计、运行原理以及未来的一些计划,都在
-[联网设计文档](https://git.k8s.io/community/contributors/design-proposals/network/networking.md)
-里有更详细的描述。
+网络模型的早期设计、运行原理以及未来的一些计划,
+都在[联网设计文档](https://git.k8s.io/community/contributors/design-proposals/network/networking.md)里有更详细的描述。
diff --git a/content/zh/docs/concepts/cluster-administration/proxies.md b/content/zh-cn/docs/concepts/cluster-administration/proxies.md
similarity index 100%
rename from content/zh/docs/concepts/cluster-administration/proxies.md
rename to content/zh-cn/docs/concepts/cluster-administration/proxies.md
diff --git a/content/zh/docs/concepts/cluster-administration/system-logs.md b/content/zh-cn/docs/concepts/cluster-administration/system-logs.md
similarity index 100%
rename from content/zh/docs/concepts/cluster-administration/system-logs.md
rename to content/zh-cn/docs/concepts/cluster-administration/system-logs.md
diff --git a/content/zh/docs/concepts/cluster-administration/system-metrics.md b/content/zh-cn/docs/concepts/cluster-administration/system-metrics.md
similarity index 100%
rename from content/zh/docs/concepts/cluster-administration/system-metrics.md
rename to content/zh-cn/docs/concepts/cluster-administration/system-metrics.md
diff --git a/content/zh/docs/concepts/cluster-administration/system-traces.md b/content/zh-cn/docs/concepts/cluster-administration/system-traces.md
similarity index 100%
rename from content/zh/docs/concepts/cluster-administration/system-traces.md
rename to content/zh-cn/docs/concepts/cluster-administration/system-traces.md
diff --git a/content/zh/docs/concepts/configuration/_index.md b/content/zh-cn/docs/concepts/configuration/_index.md
similarity index 100%
rename from content/zh/docs/concepts/configuration/_index.md
rename to content/zh-cn/docs/concepts/configuration/_index.md
diff --git a/content/zh/docs/concepts/configuration/configmap.md b/content/zh-cn/docs/concepts/configuration/configmap.md
similarity index 100%
rename from content/zh/docs/concepts/configuration/configmap.md
rename to content/zh-cn/docs/concepts/configuration/configmap.md
diff --git a/content/zh/docs/concepts/configuration/manage-resources-containers.md b/content/zh-cn/docs/concepts/configuration/manage-resources-containers.md
similarity index 100%
rename from content/zh/docs/concepts/configuration/manage-resources-containers.md
rename to content/zh-cn/docs/concepts/configuration/manage-resources-containers.md
diff --git a/content/zh/docs/concepts/configuration/organize-cluster-access-kubeconfig.md b/content/zh-cn/docs/concepts/configuration/organize-cluster-access-kubeconfig.md
similarity index 100%
rename from content/zh/docs/concepts/configuration/organize-cluster-access-kubeconfig.md
rename to content/zh-cn/docs/concepts/configuration/organize-cluster-access-kubeconfig.md
diff --git a/content/zh/docs/concepts/configuration/overview.md b/content/zh-cn/docs/concepts/configuration/overview.md
similarity index 100%
rename from content/zh/docs/concepts/configuration/overview.md
rename to content/zh-cn/docs/concepts/configuration/overview.md
diff --git a/content/zh/docs/concepts/configuration/secret.md b/content/zh-cn/docs/concepts/configuration/secret.md
similarity index 91%
rename from content/zh/docs/concepts/configuration/secret.md
rename to content/zh-cn/docs/concepts/configuration/secret.md
index 917d318703..c4dc8fb7fe 100644
--- a/content/zh/docs/concepts/configuration/secret.md
+++ b/content/zh-cn/docs/concepts/configuration/secret.md
@@ -35,12 +35,12 @@ Secret 是一种包含少量敏感信息例如密码、令牌或密钥的对象
这样的信息可能会被放在 {{< glossary_tooltip term_id="pod" >}} 规约中或者镜像中。
使用 Secret 意味着你不需要在应用程序代码中包含机密数据。
-
-默认情况下,Kubernetes Secret 未加密地存储在 API 服务器的底层数据存储(etcd)中。
+默认情况下,Kubernetes Secret 未加密地存储在 API 服务器的底层数据存储(etcd)中。
任何拥有 API 访问权限的人都可以检索或修改 Secret,任何有权访问 etcd 的人也可以。
此外,任何有权限在命名空间中创建 Pod 的人都可以使用该访问权限读取该命名空间中的任何 Secret;
这包括间接访问,例如创建 Deployment 的能力。
@@ -75,7 +75,7 @@ In order to safely use Secrets, take at least the following steps:
为了安全地使用 Secret,请至少执行以下步骤:
1. 为 Secret [启用静态加密](/zh/docs/tasks/administer-cluster/encrypt-data/);
-1. 启用或配置 [RBAC 规则](/zh/docs/reference/access-authn-authz/authorization/)来限制读取和写入
+1. [启用或配置 RBAC 规则](/zh/docs/reference/access-authn-authz/authorization/)来限制读取和写入
Secret 的数据(包括通过间接方式)。需要注意的是,被准许创建 Pod 的人也隐式地被授权获取
Secret 内容。
1. 在适当的情况下,还可以使用 RBAC 等机制来限制允许哪些主体创建新 Secret 或替换现有 Secret。
@@ -258,6 +258,10 @@ You can edit an existing Secret using kubectl:
kubectl edit secrets mysecret
```
+
这一命令会启动你的默认编辑器,允许你更新 `data` 字段中存放的 base64 编码的 Secret 值;
例如:
@@ -443,11 +447,15 @@ You can still [manually create](/docs/tasks/configure-pod-container/configure-se
a service account token Secret; for example, if you need a token that never expires.
However, using the [TokenRequest](/docs/reference/kubernetes-api/authentication-resources/token-request-v1/)
subresource to obtain a token to access the API is recommended instead.
+You can use the [`kubectl create token`](/docs/reference/generated/kubectl/kubectl-commands#-em-token-em-)
+command to obtain a token from the `TokenRequest` API.
-->
你仍然可以[手动创建](/zh/docs/tasks/configure-pod-container/configure-service-account/#manually-create-a-service-account-api-token)
服务账号令牌。例如,当你需要一个永远都不过期的令牌时。
不过,仍然建议使用 [TokenRequest](/docs/reference/kubernetes-api/authentication-resources/token-request-v1/)
子资源来获得访问 API 服务器的令牌。
+你可以使用 [`kubectl create token`](/docs/reference/generated/kubectl/kubectl-commands#-em-token-em-)
+命令调用 `TokenRequest` API 获得令牌。
{{< /note >}}
-#### 将 Secret 键投射到特定目录
+#### 将 Secret 键投射到特定目录 {#projection-of-secret-keys-to-specific-paths}
你也可以控制 Secret 键所投射到的卷中的路径。
你可以使用 `.spec.volumes[].secret.items` 字段来更改每个主键的目标路径:
@@ -517,7 +525,7 @@ You can also set a default mode for the entire Secret volume and override per ke
For example, you can specify a default mode like this:
-->
-#### Secret 文件的访问权限
+#### Secret 文件的访问权限 {#secret-files-permissions}
你可以为某个 Secret 主键设置 POSIX 文件访问权限位。
如果你不指定访问权限,默认会使用 `0644`。
@@ -782,7 +790,7 @@ of the secret data.
This is the result of commands executed inside the container from the example above:
-->
-#### 通过环境变量使用 Secret 值
+#### 通过环境变量使用 Secret 值 {#consuming-secret-values-from-environment-variables}
在通过环境变量来使用 Secret 的容器中,Secret 主键展现为普通的环境变量。
这些变量的取值是 Secret 数据的 Base64 解码值。
@@ -862,7 +870,7 @@ You can use an `imagePullSecrets` to pass a secret that contains a Docker (or ot
password to the kubelet. The kubelet uses this information to pull a private image on behalf of your Pod.
See the [PodSpec API](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podspec-v1-core) for more information about the `imagePullSecrets` field.
-->
-#### 使用 imagePullSecrets
+#### 使用 imagePullSecrets {#using-imagepullsecrets-1}
`imagePullSecrets` 字段是一个列表,包含对同一名字空间中 Secret 的引用。
你可以使用 `imagePullSecrets` 将包含 Docker(或其他)镜像仓库密码的 Secret
@@ -876,7 +884,7 @@ See the [PodSpec API](/docs/reference/generated/kubernetes-api/{{< param "versio
You can learn how to specify `imagePullSecrets` from the [container images](/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod)
documentation.
-->
-##### 手动设定 imagePullSecret
+##### 手动设定 imagePullSecret {#manually-specifying-an-imagepullsecret}
你可以通过阅读[容器镜像](/zh/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod)
文档了解如何设置 `imagePullSecrets`。
@@ -891,7 +899,7 @@ field set to that of the service account.
See [Add ImagePullSecrets to a service account](/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account)
for a detailed explanation of that process.
-->
-##### 设置 imagePullSecrets 为自动挂载
+##### 设置 imagePullSecrets 为自动挂载 {#arranging-for-imagepullsecrets-to-be-automatically-attached}
你可以手动创建 `imagePullSecret`,并在一个 ServiceAccount 中引用它。
对使用该 ServiceAccount 创建的所有 Pod,或者默认使用该 ServiceAccount 创建的 Pod
@@ -919,7 +927,7 @@ Create a secret
-->
## 使用场景 {#use-case}
-### 使用场景:作为容器环境变量
+### 使用场景:作为容器环境变量 {#use-case-as-container-environment-variables}
创建 Secret:
@@ -970,7 +978,7 @@ spec:
Create a Secret containing some SSH keys:
-->
-### 使用场景:带 SSH 密钥的 Pod
+### 使用场景:带 SSH 密钥的 Pod {#use-case-pod-with-ssh-keys}
创建包含一些 SSH 密钥的 Secret:
@@ -1061,7 +1069,7 @@ credentials.
You can create a `kustomization.yaml` with a `secretGenerator` field or run
`kubectl create secret`.
-->
-### 使用场景:带有生产、测试环境凭据的 Pod
+### 使用场景:带有生产、测试环境凭据的 Pod {#use-case-pods-with-prod-test-credentials}
这一示例所展示的一个 Pod 会使用包含生产环境凭据的 Secret,另一个 Pod
使用包含测试环境凭据的 Secret。
@@ -1247,7 +1255,7 @@ You can make your data "hidden" by defining a key that begins with a dot.
This key represents a dotfile or "hidden" file. For example, when the following secret
is mounted into a volume, `secret-volume`:
-->
-### 使用场景:在 Secret 卷中带句点的文件
+### 使用场景:在 Secret 卷中带句点的文件 {#use-case-dotfiles-in-a-secret-volume}
通过定义以句点(`.`)开头的主键,你可以“隐藏”你的数据。
这些主键代表的是以句点开头的文件或“隐藏”文件。
@@ -1308,7 +1316,7 @@ logic, and then sign some messages with an HMAC. Because it has complex
application logic, there might be an unnoticed remote file reading exploit in
the server, which could expose the private key to an attacker.
-->
-### 使用场景:仅对 Pod 中一个容器可见的 Secret
+### 使用场景:仅对 Pod 中一个容器可见的 Secret {#use-case-secret-visible-to-one-container-in-a-pod}
考虑一个需要处理 HTTP 请求,执行某些复杂的业务逻辑,之后使用 HMAC
来对某些消息进行签名的程序。因为这一程序的应用逻辑很复杂,
@@ -1341,7 +1349,7 @@ the [Secret](/docs/reference/kubernetes-api/config-and-storage-resources/secret-
resource, or certain equivalent `kubectl` command line flags (if available).
The Secret type is used to facilitate programmatic handling of the Secret data.
-Kubernetes provides several builtin types for some common usage scenarios.
+Kubernetes provides several built-in types for some common usage scenarios.
These types vary in terms of the validations performed and the constraints
Kubernetes imposes on them.
-->
@@ -1355,10 +1363,10 @@ Kubernetes 提供若干种内置的类型,用于一些常见的使用场景。
针对这些类型,Kubernetes 所执行的合法性检查操作以及对其所实施的限制各不相同。
通过为 Secret 对象的 `type` 字段设置一个非空的字符串值,你也可以定义并使用自己
-Secret 类型。如果 `type` 值为空字符串,则被视为 `Opaque` 类型。
+Secret 类型(如果 `type` 值为空字符串,则被视为 `Opaque` 类型)。
Kubernetes 并不对类型的名称作任何限制。不过,如果你要使用内置类型之一,
@@ -1433,35 +1441,70 @@ empty-secret Opaque 0 2m6s
`DATA` 列显示 Secret 中保存的数据条目个数。
-在这个例子种,`0` 意味着我们刚刚创建了一个空的 Secret。
+在这个例子种,`0` 意味着你刚刚创建了一个空的 Secret。
### 服务账号令牌 Secret {#service-account-token-secrets}
-类型为 `kubernetes.io/service-account-token` 的 Secret 用来存放标识某
-{{< glossary_tooltip text="服务账号" term_id="service-account" >}}的令牌。
+类型为 `kubernetes.io/service-account-token` 的 Secret
+用来存放标识某{{< glossary_tooltip text="服务账号" term_id="service-account" >}}的令牌凭据。
+
+
+从 v1.22 开始,这种类型的 Secret 不再被用来向 Pod 中加载凭据数据,
+建议通过 [TokenRequest](/zh-cn/docs/reference/kubernetes-api/authentication-resources/token-request-v1/)
+API 来获得令牌,而不是使用服务账号令牌 Secret 对象。
+通过 `TokenRequest` API 获得的令牌比保存在 Secret 对象中的令牌更加安全,
+因为这些令牌有着被限定的生命期,并且不会被其他 API 客户端读取。
+你可以使用 [`kubectl create token`](/docs/reference/generated/kubectl/kubectl-commands#-em-token-em-)
+命令调用 `TokenRequest` API 获得令牌。
+
+
+只有在你无法使用 `TokenRequest` API 来获取令牌,
+并且你能够接受因为将永不过期的令牌凭据写入到可读取的 API 对象而带来的安全风险时,
+才应该创建服务账号令牌 Secret 对象。
+
+
使用这种 Secret 类型时,你需要确保对象的注解 `kubernetes.io/service-account-name`
-被设置为某个已有的服务账号名称。某个 Kubernetes
-{{< glossary_tooltip text="控制器" term_id="controller" >}}会填写 Secret
-的其它字段,例如 `kubernetes.io/service-account.uid` 注解以及 `data` 字段中的
+被设置为某个已有的服务账号名称。
+如果你同时负责 ServiceAccount 和 Secret 对象的创建,应该先创建 ServiceAccount 对象。
+
+
+当 Secret 对象被创建之后,某个 Kubernetes{{< glossary_tooltip text="控制器" term_id="controller" >}}会填写
+Secret 的其它字段,例如 `kubernetes.io/service-account.uid` 注解以及 `data` 字段中的
`token` 键值,使之包含实际的令牌内容。
下面的配置实例声明了一个服务账号令牌 Secret:
@@ -1494,45 +1537,33 @@ data:
```
-Kubernetes 在创建 Pod 时会自动创建一个服务账号 Secret 并自动修改你的 Pod
-以使用该 Secret。该服务账号令牌 Secret 中包含了访问 Kubernetes API
-所需要的凭据。
-
-如果需要,可以禁止或者重载这种自动创建并使用 API 凭据的操作。
-不过,如果你仅仅是希望能够安全地访问 API 服务器,这是建议的工作方式。
+创建了 Secret 之后,等待 Kubernetes 在 `data` 字段中填充 `token` 主键。
参考 [ServiceAccount](/zh/docs/tasks/configure-pod-container/configure-service-account/)
文档了解服务账号的工作原理。你也可以查看
[`Pod`](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#pod-v1-core)
资源中的 `automountServiceAccountToken` 和 `serviceAccountName` 字段文档,
-进一步了解从 Pod 中引用服务账号。
+进一步了解从 Pod 中引用服务账号凭据。
### Docker 配置 Secret {#docker-config-secrets}
-你可以使用下面两种 `type` 值之一来创建 Secret,用以存放访问 Docker 仓库
-来下载镜像的凭据。
+你可以使用下面两种 `type` 值之一来创建 Secret,用以存放用于访问容器鏡像倉庫的凭据:
- `kubernetes.io/dockercfg`
- `kubernetes.io/dockerconfigjson`
@@ -1550,7 +1581,7 @@ Secret 的 `data` 字段中包含名为 `.dockercfg` 的主键,其对应键值
编码的某 `~/.dockercfg` 文件的内容。
当你使用清单文件来创建这两类 Secret 时,API 服务器会检查 `data` 字段中是否
存在所期望的主键,并且验证其中所提供的键值是否是合法的 JSON 数据。
不过,API 服务器不会检查 JSON 数据本身是否是一个合法的 Docker 配置文件内容。
+
+当你没有 Docker 配置文件,或者你想使用 `kubectl` 创建一个 Secret
+来访问容器倉庫时,你可以这样做:
+
```shell
kubectl create secret docker-registry secret-tiger-docker \
--docker-email=tiger@acme.example \
--docker-username=tiger \
- --docker-password=pass113 \
+ --docker-password=pass1234 \
--docker-server=my-registry.example:5000
```
上面的命令创建一个类型为 `kubernetes.io/dockerconfigjson` 的 Secret。
如果你对 `.data.dockerconfigjson` 内容进行转储并执行 base64 解码:
+```shell
+kubectl get secret secret-tiger-docker -o jsonpath='{.data.*}' | base64 -d
+```
+
+
+那么输出等价于这个 JSON 文档(这也是一个有效的 Docker 配置文件):
+
```json
{
"auths": {
"my-registry.example:5000": {
"username": "tiger",
- "password": "pass113",
- "email": "tiger@acme.com",
- "auth": "dGlnZXI6cGFzczExMw=="
+ "password": "pass1234",
+ "email": "tiger@acme.example",
+ "auth": "dGlnZXI6cGFzczEyMzQ="
}
}
}
@@ -1642,15 +1687,15 @@ Anyone who can read that Secret can learn the registry access bearer token.
The `kubernetes.io/basic-auth` type is provided for storing credentials needed
for basic authentication. When using this Secret type, the `data` field of the
-Secret must contain the following two keys:
+Secret must contain one of the following two keys:
-- `username`: the user name for authentication;
-- `password`: the password or token for authentication.
+- `username`: the user name for authentication
+- `password`: the password or token for authentication
-->
### 基本身份认证 Secret {#basic-authentication-secret}
`kubernetes.io/basic-auth` 类型用来存放用于基本身份认证所需的凭据信息。
-使用这种 Secret 类型时,Secret 的 `data` 字段必须包含以下两个键:
+使用这种 Secret 类型时,Secret 的 `data` 字段必须包含以下两个键之一:
- `username`: 用于身份认证的用户名;
- `password`: 用于身份认证的密码或令牌。
@@ -1660,11 +1705,11 @@ Both values for the above two keys are base64 encoded strings. You can, of
course, provide the clear text content using the `stringData` for Secret
creation.
-The following YAML is an example config for a basic authentication Secret:
+The following manifest is an example of a basic authentication Secret:
-->
以上两个键的键值都是 base64 编码的字符串。
当然你也可以在创建 Secret 时使用 `stringData` 字段来提供明文形式的内容。
-下面的 YAML 是基本身份认证 Secret 的一个示例清单:
+以下清单是基本身份验证 Secret 的示例:
```yaml
apiVersion: v1
@@ -1673,13 +1718,13 @@ metadata:
name: secret-basic-auth
type: kubernetes.io/basic-auth
stringData:
- username: admin # kubernetes.io/basic-auth 类型的必需字段
+ username: admin # kubernetes.io/basic-auth 类型的必需字段
password: t0p-Secret # kubernetes.io/basic-auth 类型的必需字段
```
### 启动引导令牌 Secret {#bootstrap-token-secrets}
@@ -1890,11 +1935,11 @@ data:
```
-## Secret 的信息安全问题
+## Secret 的信息安全问题 {#information-security-for-secrets}
尽管 ConfigMap 和 Secret 的工作方式类似,但 Kubernetes 对 Secret 有一些额外的保护。
@@ -2096,7 +2141,7 @@ on that node.
variable configuration so that the other containers do not have access to that
Secret.
-->
-### 针对开发人员的安全性建议
+### 针对开发人员的安全性建议 {#security-recommendations-for-developers}
- 应用在从环境变量或卷中读取了机密信息内容之后仍要对其进行保护。例如,
你的应用应该避免用明文的方式将 Secret 数据写入日志,或者将其传递给不可信的第三方。
@@ -2117,7 +2162,7 @@ on that node.
- When deploying applications that interact with the Secret API, you should
limit access using
[authorization policies](/docs/reference/access-authn-authz/authorization/) such as
- [RBAC]( /docs/reference/access-authn-authz/rbac/).
+ [RBAC](/docs/reference/access-authn-authz/rbac/).
-->
- 部署与 Secret API 交互的应用时,你应该使用 [RBAC](/zh/docs/reference/access-authn-authz/rbac/)
这类[鉴权策略](/zh/docs/reference/access-authn-authz/authorization/)来限制访问。
@@ -2134,7 +2179,7 @@ on that node.
-### 针对集群管理员的安全性建议
+### 针对集群管理员的安全性建议 {#security-recommendations-for-cluster-administrators}
{{< caution >}}
- 保留(使用 Kubernetes API)对集群中所有 Secret 对象执行 `watch` 或 `list` 操作的能力,
这样只有特权级最高、系统级别的组件能够执行这类操作。
@@ -2185,9 +2230,9 @@ Pod 来访问 Secret 的内容。
## {{% heading "whatsnext" %}}
- 学习如何[使用 `kubectl` 管理 Secret](/zh/docs/tasks/configmap-secret/managing-secret-using-kubectl/)
diff --git a/content/zh-cn/docs/concepts/configuration/windows-resource-management.md b/content/zh-cn/docs/concepts/configuration/windows-resource-management.md
new file mode 100644
index 0000000000..a34682f5ae
--- /dev/null
+++ b/content/zh-cn/docs/concepts/configuration/windows-resource-management.md
@@ -0,0 +1,134 @@
+---
+title: Windows 节点的资源管理
+content_type: concept
+weight: 75
+---
+
+
+
+本页概述了 Linux 和 Windows 在资源管理方式上的区别。
+
+
+
+在 Linux 节点上,{{< glossary_tooltip text="cgroup" term_id="cgroup" >}} 用作资源控制的 Pod 边界。
+在这个边界内创建容器以便于隔离网络、进程和文件系统。
+Linux cgroup API 可用于收集 CPU、I/O 和内存使用统计数据。
+
+与此相反,Windows 中每个容器对应一个[**作业对象**](https://docs.microsoft.com/zh-cn/windows/win32/procthread/job-objects),
+与系统命名空间过滤器一起使用,将所有进程包含在一个容器中,提供与主机的逻辑隔离。
+(作业对象是一种 Windows 进程隔离机制,不同于 Kubernetes 提及的 {{< glossary_tooltip term_id="job" text="Job" >}})。
+
+如果没有命名空间过滤,就无法运行 Windows 容器。
+这意味着在主机环境中无法让系统特权生效,因此特权容器在 Windows 上不可用。
+容器不能使用来自主机的标识,因为安全帐户管理器(Security Account Manager,SAM)是独立的。
+
+
+## 内存管理 {#resource-management-memory}
+
+Windows 不像 Linux 一样提供杀手(killer)机制,杀死内存不足的进程。
+Windows 始终将所有用户态内存分配视为虚拟内存,并强制使用页面文件(pagefile)。
+
+Windows 节点不会为进程过量使用内存。
+最终结果是 Windows 不会像 Linux 那样达到内存不足的情况,Windows 将进程页面放到磁盘,
+不会因为内存不足(OOM)而终止进程。
+如果内存配置过量且所有物理内存都已耗尽,则换页性能就会降低。
+
+## CPU 管理 {#resource-management-cpu}
+
+Windows 可以限制为不同进程分配的 CPU 时间长度,但无法保证最小的 CPU 时间长度。
+
+在 Windows 上,kubelet 支持使用命令行标志来设置 kubelet 进程的[调度优先级](https://docs.microsoft.com/zh-cn/windows/win32/procthread/scheduling-priorities):
+`--windows-priorityclass`。
+与 Windows 主机上运行的其他进程相比,此标志允许 kubelet 进程获取更多的 CPU 时间片。
+有关允许值及其含义的更多信息,请访问 [Windows 优先级类](https://docs.microsoft.com/zh-cn/windows/win32/procthread/scheduling-priorities#priority-class)。
+为了确保运行的 Pod 不会耗尽 kubelet 的 CPU 时钟周期,
+要将此标志设置为 `ABOVE_NORMAL_PRIORITY_CLASS` 或更高。
+
+
+## 资源预留 {#resource-reservation}
+
+为了满足操作系统、容器运行时和 kubelet 等 Kubernetes 主机进程使用的内存和 CPU,
+你可以(且应该)用 `--kube-reserved` 和/或 `--system-reserved` kubelet 标志来预留内存和 CPU 资源。
+在 Windows 上,这些值仅用于计算节点的[可分配](/zh/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable)资源。
+
+
+{{< caution >}}
+在你部署工作负载时,需对容器设置内存和 CPU 资源的限制。
+这也会从 `NodeAllocatable` 中减去,帮助集群范围的调度器决定哪些 Pod 放到哪些节点上。
+
+若调度 Pod 时未设置限制值,可能对 Windows 节点过量配置资源。
+在极端情况下,这会让节点变得不健康。
+{{< /caution >}}
+
+
+在 Windows 上,一种好的做法是预留至少 2GiB 的内存。
+
+要决定预留多少 CPU,需明确每个节点的最大 Pod 密度,
+并监控节点上运行的系统服务的 CPU 使用率,然后选择一个满足工作负载需求的值。
diff --git a/content/zh/docs/concepts/containers/_index.md b/content/zh-cn/docs/concepts/containers/_index.md
similarity index 100%
rename from content/zh/docs/concepts/containers/_index.md
rename to content/zh-cn/docs/concepts/containers/_index.md
diff --git a/content/zh/docs/concepts/containers/container-environment.md b/content/zh-cn/docs/concepts/containers/container-environment.md
similarity index 100%
rename from content/zh/docs/concepts/containers/container-environment.md
rename to content/zh-cn/docs/concepts/containers/container-environment.md
diff --git a/content/zh/docs/concepts/containers/container-lifecycle-hooks.md b/content/zh-cn/docs/concepts/containers/container-lifecycle-hooks.md
similarity index 100%
rename from content/zh/docs/concepts/containers/container-lifecycle-hooks.md
rename to content/zh-cn/docs/concepts/containers/container-lifecycle-hooks.md
diff --git a/content/zh/docs/concepts/containers/images.md b/content/zh-cn/docs/concepts/containers/images.md
similarity index 100%
rename from content/zh/docs/concepts/containers/images.md
rename to content/zh-cn/docs/concepts/containers/images.md
diff --git a/content/zh/docs/concepts/containers/runtime-class.md b/content/zh-cn/docs/concepts/containers/runtime-class.md
similarity index 100%
rename from content/zh/docs/concepts/containers/runtime-class.md
rename to content/zh-cn/docs/concepts/containers/runtime-class.md
diff --git a/content/zh/docs/concepts/extend-kubernetes/_index.md b/content/zh-cn/docs/concepts/extend-kubernetes/_index.md
similarity index 100%
rename from content/zh/docs/concepts/extend-kubernetes/_index.md
rename to content/zh-cn/docs/concepts/extend-kubernetes/_index.md
diff --git a/content/zh/docs/concepts/extend-kubernetes/api-extension/_index.md b/content/zh-cn/docs/concepts/extend-kubernetes/api-extension/_index.md
similarity index 100%
rename from content/zh/docs/concepts/extend-kubernetes/api-extension/_index.md
rename to content/zh-cn/docs/concepts/extend-kubernetes/api-extension/_index.md
diff --git a/content/zh/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation.md b/content/zh-cn/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation.md
similarity index 100%
rename from content/zh/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation.md
rename to content/zh-cn/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation.md
diff --git a/content/zh/docs/concepts/extend-kubernetes/api-extension/custom-resources.md b/content/zh-cn/docs/concepts/extend-kubernetes/api-extension/custom-resources.md
similarity index 100%
rename from content/zh/docs/concepts/extend-kubernetes/api-extension/custom-resources.md
rename to content/zh-cn/docs/concepts/extend-kubernetes/api-extension/custom-resources.md
diff --git a/content/zh/docs/concepts/extend-kubernetes/compute-storage-net/_index.md b/content/zh-cn/docs/concepts/extend-kubernetes/compute-storage-net/_index.md
similarity index 100%
rename from content/zh/docs/concepts/extend-kubernetes/compute-storage-net/_index.md
rename to content/zh-cn/docs/concepts/extend-kubernetes/compute-storage-net/_index.md
diff --git a/content/zh/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md b/content/zh-cn/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md
similarity index 100%
rename from content/zh/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md
rename to content/zh-cn/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md
diff --git a/content/zh/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins.md b/content/zh-cn/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins.md
similarity index 54%
rename from content/zh/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins.md
rename to content/zh-cn/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins.md
index ab63e7eb85..fea8c05193 100644
--- a/content/zh/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins.md
+++ b/content/zh-cn/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins.md
@@ -20,6 +20,11 @@ Kubernetes {{< skew currentVersion >}} 支持[容器网络接口](https://github
你必须使用和你的集群相兼容并且满足你的需求的 CNI 插件。
在更广泛的 Kubernetes 生态系统中你可以使用不同的插件(开源和闭源)。
+
+要实现 [Kubernetes 网络模型](/zh-cn/docs/concepts/services-networking/#the-kubernetes-network-model),你需要一个 CNI 插件。
+
-## 安装
+## 安装 {#installation}
-CNI 插件需要实现 [Kubernetes 网络模型](/zh/docs/concepts/services-networking/#the-kubernetes-network-model)。
-CRI 管理它自己的 CNI 插件。
-在使用插件时,需要记住两个 kubelet 命令行参数:
+在网络语境中,容器运行时(Container Runtime)是在节点上的守护进程,
+被配置用来为 kubelet 提供 CRI 服务。具体而言,容器运行时必须配置为加载所需的
+CNI 插件,从而实现 Kubernetes 网络模型。
-* `cni-bin-dir`: kubelet 在启动时探测这个目录中的插件
-* `network-plugin`: 要使用的网络插件来自 `cni-bin-dir`。
- 它必须与从插件目录探测到的插件报告的名称匹配。
- 对于 CNI 插件,其值为 "cni"。
+{{< note >}}
+
+在 Kubernetes 1.24 之前,CNI 插件也可以由 kubelet 使用命令行参数 `cni-bin-dir`
+和 `network-plugin` 管理。Kubernetes 1.24 移除了这些命令行参数,
+CNI 的管理不再是 kubelet 的工作。
+
+
+如果你在移除 dockershim 之后遇到问题,请参阅[排查 CNI 插件相关的错误](/zh-cn/docs/tasks/administer-cluster/migrating-from-dockershim/troubleshooting-cni-plugin-related-errors/)。
+{{< /note >}}
+
+
+要了解容器运行时如何管理 CNI 插件的具体信息,可参见对应容器运行时的文档,例如:
+
+- [containerd](https://github.com/containerd/containerd/blob/main/script/setup/install-cni)
+- [CRI-O](https://github.com/cri-o/cri-o/blob/main/contrib/cni/README.md)
+
+
+要了解如何安装和管理 CNI 插件的具体信息,可参阅对应的插件或
+[网络驱动(Networking Provider)](/zh-cn/docs/concepts/cluster-administration/networking/#how-to-implement-the-kubernetes-networking-model)
+的文档。
-## 网络插件要求
+## 网络插件要求 {#network-plugin-requirements}
-除了提供
-[`NetworkPlugin` 接口](https://github.com/kubernetes/kubernetes/tree/{{< param "fullversion" >}}/pkg/kubelet/dockershim/network/plugins.go)
-来配置和清理 Pod 网络之外,该插件还可能需要对 kube-proxy 的特定支持。
-iptables 代理显然依赖于 iptables,插件可能需要确保 iptables 能够监控容器的网络通信。
+对于插件开发人员以及时常会构建并部署 Kubernetes 的用户而言,
+插件可能也需要特定的配置来支持 kube-proxy。
+iptables 代理依赖于 iptables,插件可能需要确保 iptables 能够监控容器的网络通信。
例如,如果插件将容器连接到 Linux 网桥,插件必须将 `net/bridge/bridge-nf-call-iptables`
-系统参数设置为`1`,以确保 iptables 代理正常工作。
+sysctl 参数设置为 `1`,以确保 iptables 代理正常工作。
如果插件不使用 Linux 网桥(而是类似于 Open vSwitch 或者其它一些机制),
它应该确保为代理对容器通信执行正确的路由。
+
+
默认情况下,如果未指定 kubelet 网络插件,则使用 `noop` 插件,
该插件设置 `net/bridge/bridge-nf-call-iptables=1`,以确保简单的配置
(如带网桥的 Docker )与 iptables 代理正常工作。
-### CNI
+### 本地回路 CNI {#loopback-cni}
-通过给 Kubelet 传递 `--network-plugin=cni` 命令行选项可以选择 CNI 插件。
-Kubelet 从 `--cni-conf-dir` (默认是 `/etc/cni/net.d`) 读取文件并使用
-该文件中的 CNI 配置来设置各个 Pod 的网络。
-CNI 配置文件必须与
-[CNI 规约](https://github.com/containernetworking/cni/blob/master/SPEC.md#network-configuration)
-匹配,并且配置所引用的所有所需的 CNI 插件都应存在于
-`--cni-bin-dir`(默认是 `/opt/cni/bin`)下。
-
-如果这个目录中有多个 CNI 配置文件,kubelet 将会使用按文件名的字典顺序排列
-的第一个作为配置文件。
-
-除了配置文件指定的 CNI 插件外,Kubernetes 还需要标准的 CNI
-[`lo`](https://github.com/containernetworking/plugins/blob/master/plugins/main/loopback/loopback.go)
-插件,最低版本是0.2.0。
+除了安装到节点上用于实现 Kubernetes 网络模型的 CNI 插件外,Kubernetes
+还需要容器运行时提供一个本地回路接口 `lo`,用于各个沙箱(Pod 沙箱、虚机沙箱……)。
+实现本地回路接口的工作可以通过复用
+[CNI 本地回路插件](https://github.com/containernetworking/plugins/blob/master/plugins/main/loopback/loopback.go)来实现,
+也可以通过开发自己的代码来实现
+(参阅 [CRI-O 中的示例](https://github.com/cri-o/ocicni/blob/release-1.24/pkg/ocicni/util_linux.go#L91))。
-#### 支持 hostPort
+### 支持 hostPort {#support-hostport}
CNI 网络插件支持 `hostPort`。 你可以使用官方
[portmap](https://github.com/containernetworking/plugins/tree/master/plugins/meta/portmap)
@@ -149,7 +170,7 @@ CNI 网络插件支持 `hostPort`。 你可以使用官方
```
-#### 支持流量整形
+### 支持流量整形 {#support-traffic-shaping}
**实验功能**
@@ -216,16 +237,6 @@ metadata:
kubernetes.io/egress-bandwidth: 1M
...
```
-
-## 用法总结
-
-* `--network-plugin=cni` 用来表明我们要使用 `cni` 网络插件,实际的 CNI 插件
- 可执行文件位于 `--cni-bin-dir`(默认是 `/opt/cni/bin`)下, CNI 插件配置位于
- `--cni-conf-dir`(默认是 `/etc/cni/net.d`)下。
## {{% heading "whatsnext" %}}
diff --git a/content/zh/docs/concepts/extend-kubernetes/operator.md b/content/zh-cn/docs/concepts/extend-kubernetes/operator.md
similarity index 98%
rename from content/zh/docs/concepts/extend-kubernetes/operator.md
rename to content/zh-cn/docs/concepts/extend-kubernetes/operator.md
index c9734f4798..7dd8e6fbd3 100644
--- a/content/zh/docs/concepts/extend-kubernetes/operator.md
+++ b/content/zh-cn/docs/concepts/extend-kubernetes/operator.md
@@ -212,6 +212,7 @@ Operator.
{{% thirdparty-content %}}
* [Charmed Operator Framework](https://juju.is/)
+* [Java Operator SDK](https://github.com/java-operator-sdk/java-operator-sdk)
* [Kopf](https://github.com/nolar/kopf) (Kubernetes Operator Pythonic Framework)
* [kubebuilder](https://book.kubebuilder.io/)
* [KubeOps](https://buehler.github.io/dotnet-operator-sdk/) (dotnet operator SDK)
@@ -226,6 +227,7 @@ you implement yourself
{{% thirdparty-content %}}
* [Charmed Operator Framework](https://juju.is/)
+* [Java Operator SDK](https://github.com/java-operator-sdk/java-operator-sdk)
* [Kopf](https://github.com/nolar/kopf) (Kubernetes Operator Pythonic Framework)
* [kubebuilder](https://book.kubebuilder.io/)
* [KubeOps](https://buehler.github.io/dotnet-operator-sdk/) (dotnet operator SDK)
diff --git a/content/zh/docs/concepts/extend-kubernetes/service-catalog.md b/content/zh-cn/docs/concepts/extend-kubernetes/service-catalog.md
similarity index 100%
rename from content/zh/docs/concepts/extend-kubernetes/service-catalog.md
rename to content/zh-cn/docs/concepts/extend-kubernetes/service-catalog.md
diff --git a/content/zh/docs/concepts/overview/_index.md b/content/zh-cn/docs/concepts/overview/_index.md
similarity index 100%
rename from content/zh/docs/concepts/overview/_index.md
rename to content/zh-cn/docs/concepts/overview/_index.md
diff --git a/content/zh/docs/concepts/overview/components.md b/content/zh-cn/docs/concepts/overview/components.md
similarity index 88%
rename from content/zh/docs/concepts/overview/components.md
rename to content/zh-cn/docs/concepts/overview/components.md
index cb88373eb7..902edf5cd3 100644
--- a/content/zh/docs/concepts/overview/components.md
+++ b/content/zh-cn/docs/concepts/overview/components.md
@@ -33,10 +33,10 @@ a complete and working Kubernetes cluster.
-->
-当你部署完 Kubernetes,即拥有了一个完整的集群。
+当你部署完 Kubernetes,便拥有了一个完整的集群。
{{< glossary_definition term_id="cluster" length="all" prepend="一个 Kubernetes">}}
-本文档概述了交付正常运行的 Kubernetes 集群所需的各种组件。
+本文档概述了一个正常运行的 Kubernetes 集群所需的各种组件。
{{< figure src="/images/docs/components-of-kubernetes.svg" alt="Kubernetes 的组件" caption="Kubernetes 集群的组件" class="diagram-large" >}}
@@ -49,8 +49,9 @@ The control plane's components make global decisions about the cluster (for exam
-->
## 控制平面组件(Control Plane Components) {#control-plane-components}
-控制平面的组件对集群做出全局决策(比如调度),以及检测和响应集群事件(例如,当不满足部署的
-`replicas` 字段时,启动新的 {{< glossary_tooltip text="pod" term_id="pod">}})。
+控制平面组件会为集群做出全局决策,比如资源的调度。
+以及检测和响应集群事件,例如当不满足部署的 `replicas` 字段时,
+要启动新的 {{< glossary_tooltip text="pod" term_id="pod">}})。
## Node 组件 {#node-components}
-节点组件在每个节点上运行,维护运行的 Pod 并提供 Kubernetes 运行环境。
+节点组件会在每个节点上运行,负责维护运行的 Pod 并提供 Kubernetes 运行环境。
### kubelet
@@ -201,11 +203,12 @@ Kubernetes 启动的容器自动将此 DNS 服务器包含在其 DNS 搜索列
[Dashboard](/docs/tasks/access-application-cluster/web-ui-dashboard/) is a general purpose, web-based UI for Kubernetes clusters. It allows users to manage and troubleshoot applications running in the cluster, as well as the cluster itself.
-->
-### Web 界面(仪表盘)
+### Web 界面(仪表盘) {#web-ui-dashboard}
[Dashboard](/zh/docs/tasks/access-application-cluster/web-ui-dashboard/)
是 Kubernetes 集群的通用的、基于 Web 的用户界面。
-它使用户可以管理集群中运行的应用程序以及集群本身并进行故障排除。
+它使用户可以管理集群中运行的应用程序以及集群本身,
+并进行故障排除。
-### 容器资源监控
+### 容器资源监控 {#container-resource-monitoring}
[容器资源监控](/zh/docs/tasks/debug/debug-cluster/resource-usage-monitoring/)
-将关于容器的一些常见的时间序列度量值保存到一个集中的数据库中,并提供用于浏览这些数据的界面。
+将关于容器的一些常见的时间序列度量值保存到一个集中的数据库中,
+并提供浏览这些数据的界面。
-### 集群层面日志
+### 集群层面日志 {#cluster-level-logging}
-[集群层面日志](/zh/docs/concepts/cluster-administration/logging/) 机制负责将容器的日志数据
-保存到一个集中的日志存储中,该存储能够提供搜索和浏览接口。
+[集群层面日志](/zh/docs/concepts/cluster-administration/logging/)
+机制负责将容器的日志数据保存到一个集中的日志存储中,
+这种集中日志存储提供搜索和浏览接口。
## {{% heading "whatsnext" %}}
diff --git a/content/zh/docs/concepts/overview/kubernetes-api.md b/content/zh-cn/docs/concepts/overview/kubernetes-api.md
similarity index 100%
rename from content/zh/docs/concepts/overview/kubernetes-api.md
rename to content/zh-cn/docs/concepts/overview/kubernetes-api.md
diff --git a/content/zh/docs/concepts/overview/what-is-kubernetes.md b/content/zh-cn/docs/concepts/overview/what-is-kubernetes.md
similarity index 74%
rename from content/zh/docs/concepts/overview/what-is-kubernetes.md
rename to content/zh-cn/docs/concepts/overview/what-is-kubernetes.md
index e28baf718f..e26ea7c861 100644
--- a/content/zh/docs/concepts/overview/what-is-kubernetes.md
+++ b/content/zh-cn/docs/concepts/overview/what-is-kubernetes.md
@@ -32,20 +32,21 @@ This page is an overview of Kubernetes.
Kubernetes is a portable, extensible, open source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.
-->
Kubernetes 是一个可移植、可扩展的开源平台,用于管理容器化的工作负载和服务,可促进声明式配置和自动化。
-Kubernetes 拥有一个庞大且快速增长的生态系统,其服务、支持和工具的使用范围广泛。
+Kubernetes 拥有一个庞大且快速增长的生态,其服务、支持和工具的使用范围相当广泛。
**Kubernetes** 这个名字源于希腊语,意为“舵手”或“飞行员”。k8s 这个缩写是因为 k 和 s 之间有八个字符的关系。
-Google 在 2014 年开源了 Kubernetes 项目。Kubernetes 建立在
-[Google 大规模运行生产工作负载十几年经验](https://research.google/pubs/pub43438)的基础上,结合了社区中最优秀的想法和实践。
+Google 在 2014 年开源了 Kubernetes 项目。
+Kubernetes 建立在[Google 大规模运行生产工作负载十几年经验](https://research.google/pubs/pub43438)的基础上,
+结合了社区中最优秀的想法和实践。
-## 时光回溯
+## 时光回溯 {#going-back-in-time}
让我们回顾一下为何 Kubernetes 能够裨益四方。
@@ -61,11 +62,13 @@ Early on, organizations ran applications on physical servers. There was no way t
-->
**传统部署时代:**
-早期,各个组织机构在物理服务器上运行应用程序。无法为物理服务器中的应用程序定义资源边界,这会导致资源分配问题。
-例如,如果在物理服务器上运行多个应用程序,则可能会出现一个应用程序占用大部分资源的情况,
-结果可能导致其他应用程序的性能下降。
-一种解决方案是在不同的物理服务器上运行每个应用程序,但是由于资源利用不足而无法扩展,
-并且维护许多物理服务器的成本很高。
+早期,各机构是在物理服务器上运行应用程序。
+由于无法限制在物理服务器中运行的应用程序资源使用,因此会导致资源分配问题。
+例如,如果在物理服务器上运行多个应用程序,
+则可能会出现一个应用程序占用大部分资源的情况,而导致其他应用程序的性能下降。
+一种解决方案是将每个应用程序都运行在不同的物理服务器上,
+但是当某个应用程式资源利用率不高时,剩余资源无法被分配给其他应用程式,
+而且维护许多物理服务器的成本很高。
**虚拟化部署时代:**
-作为解决方案,引入了虚拟化。虚拟化技术允许你在单个物理服务器的 CPU 上运行多个虚拟机(VM)。
-虚拟化允许应用程序在 VM 之间隔离,并提供一定程度的安全,因为一个应用程序的信息
-不能被另一应用程序随意访问。
+因此,虚拟化技术被引入了。虚拟化技术允许你在单个物理服务器的 CPU 上运行多台虚拟机(VM)。
+虚拟化能使应用程序在不同 VM 之间被彼此隔离,且能提供一定程度的安全性,
+因为一个应用程序的信息不能被另一应用程序随意访问。
-虚拟化技术能够更好地利用物理服务器上的资源,并且因为可轻松地添加或更新应用程序
-而可以实现更好的可伸缩性,降低硬件成本等等。
+虚拟化技术能够更好地利用物理服务器的资源,并且因为可轻松地添加或更新应用程序,
+而因此可以具有更高的可伸缩性,以及降低硬件成本等等的好处。
-每个 VM 是一台完整的计算机,在虚拟化硬件之上运行所有组件,包括其自己的操作系统。
+每个 VM 是一台完整的计算机,在虚拟化硬件之上运行所有组件,包括其自己的操作系统(OS)。
**容器部署时代:**
-容器类似于 VM,但是它们具有被放宽的隔离属性,可以在应用程序之间共享操作系统(OS)。
-因此,容器被认为是轻量级的。容器与 VM 类似,具有自己的文件系统、CPU、内存、进程空间等。
+容器类似于 VM,但是更宽松的隔离特性,使容器之间可以共享操作系统(OS)。
+因此,容器比起 VM 被认为是更轻量级的。且与 VM 类似,每个容器都具有自己的文件系统、CPU、内存、进程空间等。
由于它们与基础架构分离,因此可以跨云和 OS 发行版本进行移植。
* 敏捷应用程序的创建和部署:与使用 VM 镜像相比,提高了容器镜像创建的简便性和效率。
-* 持续开发、集成和部署:通过快速简单的回滚(由于镜像不可变性),支持可靠且频繁的
- 容器镜像构建和部署。
-* 关注开发与运维的分离:在构建/发布时而不是在部署时创建应用程序容器镜像,
+* 持续开发、集成和部署:通过快速简单的回滚(由于镜像不可变性),
+ 提供可靠且频繁的容器镜像构建和部署。
+* 关注开发与运维的分离:在构建、发布时创建应用程序容器镜像,而不是在部署时,
从而将应用程序与基础架构分离。
-* 可观察性:不仅可以显示操作系统级别的信息和指标,还可以显示应用程序的运行状况和其他指标信号。
-* 跨开发、测试和生产的环境一致性:在便携式计算机上与在云中相同地运行。
+* 可观察性:不仅可以显示 OS 级别的信息和指标,还可以显示应用程序的运行状况和其他指标信号。
+* 跨开发、测试和生产的环境一致性:在笔记本计算机上也可以和在云中运行一样的应用程序。
* 跨云和操作系统发行版本的可移植性:可在 Ubuntu、RHEL、CoreOS、本地、
Google Kubernetes Engine 和其他任何地方运行。
-* 以应用程序为中心的管理:提高抽象级别,从在虚拟硬件上运行 OS 到使用逻辑资源在
- OS 上运行应用程序。
+* 以应用程序为中心的管理:提高抽象级别,从在虚拟硬件上运行 OS 到使用逻辑资源在 OS 上运行应用程序。
* 松散耦合、分布式、弹性、解放的微服务:应用程序被分解成较小的独立部分,
并且可以动态部署和管理 - 而不是在一台大型单机上整体运行。
* 资源隔离:可预测的应用程序性能。
@@ -133,18 +135,20 @@ Containers are becoming popular because they have many benefits. Some of the con
-## 为什么需要 Kubernetes,它能做什么?
+## 为什么需要 Kubernetes,它能做什么? {#why-you-need-kubernetes-and-what-can-it-do}
-容器是打包和运行应用程序的好方式。在生产环境中,你需要管理运行应用程序的容器,并确保不会停机。
-例如,如果一个容器发生故障,则需要启动另一个容器。如果系统处理此行为,会不会更容易?
+容器是打包和运行应用程序的好方式。在生产环境中,
+你需要管理运行着应用程序的容器,并确保服务不会下线。
+例如,如果一个容器发生故障,则你需要启动另一个容器。
+如果此行为交由给系统处理,是不是会更容易一些?
-这就是 Kubernetes 来解决这些问题的方法!
+这就是 Kubernetes 要来做的事情!
Kubernetes 为你提供了一个可弹性运行分布式系统的框架。
Kubernetes 会满足你的扩展要求、故障转移、部署模式等。
例如,Kubernetes 可以轻松管理系统的 Canary 部署。
@@ -160,7 +164,8 @@ Kubernetes can expose a container using the DNS name or using their own IP addre
-->
* **服务发现和负载均衡**
- Kubernetes 可以使用 DNS 名称或自己的 IP 地址公开容器,如果进入容器的流量很大,
+ Kubernetes 可以使用 DNS 名称或自己的 IP 地址来曝露容器。
+ 如果进入容器的流量很大,
Kubernetes 可以负载均衡并分配网络流量,从而使部署稳定。
* **自动部署和回滚**
- 你可以使用 Kubernetes 描述已部署容器的所需状态,它可以以受控的速率将实际状态
- 更改为期望状态。例如,你可以自动化 Kubernetes 来为你的部署创建新容器,
+ 你可以使用 Kubernetes 描述已部署容器的所需状态,
+ 它可以以受控的速率将实际状态更改为期望状态。
+ 例如,你可以自动化 Kubernetes 来为你的部署创建新容器,
删除现有容器并将它们的所有资源用于新容器。
* **自我修复**
- Kubernetes 重新启动失败的容器、替换容器、杀死不响应用户定义的
- 运行状况检查的容器,并且在准备好服务之前不将其通告给客户端。
+ Kubernetes 将重新启动失败的容器、替换容器、杀死不响应用户定义的运行状况检查的容器,
+ 并且在准备好服务之前不将其通告给客户端。
-## Kubernetes 不是什么
+## Kubernetes 不是什么 {#what-kubernetes-is-not}
Kubernetes 不是传统的、包罗万象的 PaaS(平台即服务)系统。
-由于 Kubernetes 在容器级别而不是在硬件级别运行,它提供了 PaaS 产品共有的一些普遍适用的功能,
+由于 Kubernetes 是在容器级别运行,而非在硬件级别,
+它提供了 PaaS 产品共有的一些普遍适用的功能,
例如部署、扩展、负载均衡、日志记录和监视。
-但是,Kubernetes 不是单体系统,默认解决方案都是可选和可插拔的。
-Kubernetes 提供了构建开发人员平台的基础,但是在重要的地方保留了用户的选择和灵活性。
+但是,Kubernetes 不是单体式(monolithic)系统,那些默认解决方案都是可选、可插拔的。
+Kubernetes 为构建开发人员平台提供了基础,但是在重要的地方保留了用户选择权,能有更高的灵活性。
-* 不要求日志记录、监视或警报解决方案。
- 它提供了一些集成作为概念证明,并提供了收集和导出指标的机制。
-* 不提供或不要求配置语言/系统(例如 jsonnet),它提供了声明性 API,
+* 不是日志记录、监视或警报的解决方案。
+ 它集成了一些功能作为概念证明,并提供了收集和导出指标的机制。
+* 不提供也不要求配置用的语言、系统(例如 jsonnet),它提供了声明性 API,
该声明性 API 可以由任意形式的声明性规范所构成。
* 不提供也不采用任何全面的机器配置、维护、管理或自我修复系统。
* 此外,Kubernetes 不仅仅是一个编排系统,实际上它消除了编排的需要。
编排的技术定义是执行已定义的工作流程:首先执行 A,然后执行 B,再执行 C。
- 相比之下,Kubernetes 包含一组独立的、可组合的控制过程,
- 这些过程连续地将当前状态驱动到所提供的所需状态。
- 如何从 A 到 C 的方式无关紧要,也不需要集中控制,这使得系统更易于使用
- 且功能更强大、系统更健壮、更为弹性和可扩展。
+ 而 Kubernetes 包含了一组独立可组合的控制过程,
+ 可以连续地将当前状态驱动到所提供的预期状态。
+ 你不需要在乎如何从 A 移动到 C,也不需要集中控制,这使得系统更易于使用
+ 且功能更强大、系统更健壮,更为弹性和可扩展。
## {{% heading "whatsnext" %}}
@@ -266,5 +273,5 @@ Kubernetes:
* Take a look at the [Kubernetes Components](/docs/concepts/overview/components/)
* Ready to [Get Started](/docs/setup/)?
-->
-* 查阅 [Kubernetes 组件](/zh/docs/concepts/overview/components/)
-* 开始 [Kubernetes 入门](/zh/docs/setup/)?
+* 查阅[Kubernetes 组件](/zh/docs/concepts/overview/components/)
+* 开始[Kubernetes 的建置](/zh/docs/setup/)吧!
diff --git a/content/zh/docs/concepts/overview/working-with-objects/_index.md b/content/zh-cn/docs/concepts/overview/working-with-objects/_index.md
similarity index 100%
rename from content/zh/docs/concepts/overview/working-with-objects/_index.md
rename to content/zh-cn/docs/concepts/overview/working-with-objects/_index.md
diff --git a/content/zh/docs/concepts/overview/working-with-objects/annotations.md b/content/zh-cn/docs/concepts/overview/working-with-objects/annotations.md
similarity index 100%
rename from content/zh/docs/concepts/overview/working-with-objects/annotations.md
rename to content/zh-cn/docs/concepts/overview/working-with-objects/annotations.md
diff --git a/content/zh/docs/concepts/overview/working-with-objects/common-labels.md b/content/zh-cn/docs/concepts/overview/working-with-objects/common-labels.md
similarity index 100%
rename from content/zh/docs/concepts/overview/working-with-objects/common-labels.md
rename to content/zh-cn/docs/concepts/overview/working-with-objects/common-labels.md
diff --git a/content/zh/docs/concepts/overview/working-with-objects/field-selectors.md b/content/zh-cn/docs/concepts/overview/working-with-objects/field-selectors.md
similarity index 100%
rename from content/zh/docs/concepts/overview/working-with-objects/field-selectors.md
rename to content/zh-cn/docs/concepts/overview/working-with-objects/field-selectors.md
diff --git a/content/zh/docs/concepts/overview/working-with-objects/finalizers.md b/content/zh-cn/docs/concepts/overview/working-with-objects/finalizers.md
similarity index 100%
rename from content/zh/docs/concepts/overview/working-with-objects/finalizers.md
rename to content/zh-cn/docs/concepts/overview/working-with-objects/finalizers.md
diff --git a/content/zh/docs/concepts/overview/working-with-objects/kubernetes-objects.md b/content/zh-cn/docs/concepts/overview/working-with-objects/kubernetes-objects.md
similarity index 63%
rename from content/zh/docs/concepts/overview/working-with-objects/kubernetes-objects.md
rename to content/zh-cn/docs/concepts/overview/working-with-objects/kubernetes-objects.md
index 23afa65eab..1cd32dc950 100644
--- a/content/zh/docs/concepts/overview/working-with-objects/kubernetes-objects.md
+++ b/content/zh-cn/docs/concepts/overview/working-with-objects/kubernetes-objects.md
@@ -20,42 +20,54 @@ card:
-本页说明了 Kubernetes 对象在 Kubernetes API 中是如何表示的,以及如何在 `.yaml` 格式的文件中表示。
-
+本页说明了在 Kubernetes API 中是如何表示 Kubernetes 对象的,
+以及使用 `.yaml` 格式的文件表示 Kubernetes 对象。
-## 理解 Kubernetes 对象
+## 理解 Kubernetes 对象 {#kubernetes-objects}
在 Kubernetes 系统中,*Kubernetes 对象* 是持久化的实体。
-Kubernetes 使用这些实体去表示整个集群的状态。特别地,它们描述了如下信息:
+Kubernetes 使用这些实体去表示整个集群的状态。
+比較特别地是,它们描述了如下信息:
-* 哪些容器化应用在运行(以及在哪些节点上)
+* 哪些容器化应用正在运行(以及在哪些节点上运行)
* 可以被应用使用的资源
* 关于应用运行时表现的策略,比如重启策略、升级策略,以及容错策略
-Kubernetes 对象是 “目标性记录” —— 一旦创建对象,Kubernetes 系统将持续工作以确保对象存在。
-通过创建对象,本质上是在告知 Kubernetes 系统,所需要的集群工作负载看起来是什么样子的,
-这就是 Kubernetes 集群的 **期望状态(Desired State)**。
+Kubernetes 对象是“目标性记录”——一旦创建对象,Kubernetes 系统将不断工作以确保对象存在。
+通过创建对象,你就是在告知 Kubernetes 系统,你想要的集群工作负载状态看起来应是什么样子的,
+这就是 Kubernetes 集群所谓的 **期望状态(Desired State)**。
操作 Kubernetes 对象 —— 无论是创建、修改,或者删除 —— 需要使用
[Kubernetes API](/zh/docs/concepts/overview/kubernetes-api)。
-比如,当使用 `kubectl` 命令行接口时,CLI 会执行必要的 Kubernetes API 调用,
-也可以在程序中使用
-[客户端库](/zh/docs/reference/using-api/client-libraries/)直接调用 Kubernetes API。
+比如,当使用 `kubectl` 命令行接口(CLI)时,CLI 会调用必要的 Kubernetes API;
+也可以在程序中使用[客户端库](/zh-cn/docs/reference/using-api/client-libraries/),
+来直接调用 Kubernetes API。
-`status` 描述了对象的 _当前状态(Current State)_,它是由 Kubernetes 系统和组件
-设置并更新的。在任何时刻,Kubernetes
-{{< glossary_tooltip text="控制平面" term_id="control-plane" >}}
-都一直积极地管理着对象的实际状态,以使之与期望状态相匹配。
+`status` 描述了对象的**当前状态(Current State)**,它是由 Kubernetes 系统和组件设置并更新的。
+在任何时刻,Kubernetes {{< glossary_tooltip text="控制平面" term_id="control-plane" >}}
+都一直都在积极地管理着对象的实际状态,以使之达成期望状态。
例如,Kubernetes 中的 Deployment 对象能够表示运行在集群中的应用。
-当创建 Deployment 时,可能需要设置 Deployment 的 `spec`,以指定该应用需要有 3 个副本运行。
-Kubernetes 系统读取 Deployment 规约,并启动我们所期望的应用的 3 个实例
-—— 更新状态以与规约相匹配。
-如果这些实例中有的失败了(一种状态变更),Kubernetes 系统通过执行修正操作
-来响应规约和状态间的不一致 —— 在这里意味着它会启动一个新的实例来替换。
+当创建 Deployment 时,可能会去设置 Deployment 的 `spec`,以指定该应用要有 3 个副本运行。
+Kubernetes 系统读取 Deployment 的 `spec`,
+并启动我们所期望的应用的 3 个实例 —— 更新状态以与规约相匹配。
+如果这些实例中有的失败了(一种状态变更),Kubernetes 系统会通过执行修正操作
+来响应 `spec` 和状态间的不一致 —— 意味着它会启动一个新的实例来替换。
-
关于对象 spec、status 和 metadata 的更多信息,可参阅
[Kubernetes API 约定](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md)。
-### 描述 Kubernetes 对象
+### 描述 Kubernetes 对象 {#describing-a-kubernetes-object}
-创建 Kubernetes 对象时,必须提供对象的规约,用来描述该对象的期望状态,
+创建 Kubernetes 对象时,必须提供对象的 `spec`,用来描述该对象的期望状态,
以及关于对象的一些基本信息(例如名称)。
-当使用 Kubernetes API 创建对象时(或者直接创建,或者基于 `kubectl`),
-API 请求必须在请求体中包含 JSON 格式的信息。
-**大多数情况下,需要在 .yaml 文件中为 `kubectl` 提供这些信息**。
+当使用 Kubernetes API 创建对象时(直接创建,或经由 `kubectl`),
+API 请求必须在请求本体中包含 JSON 格式的信息。
+**大多数情况下,你需要提供 `.yaml` 文件为 kubectl 提供这些信息**。
`kubectl` 在发起 API 请求时,将这些信息转换成 JSON 格式。
-这里有一个 `.yaml` 示例文件,展示了 Kubernetes Deployment 的必需字段和对象规约:
+这里有一个 `.yaml` 示例文件,展示了 Kubernetes Deployment 的必需字段和对象 `spec`:
{{< codenew file="application/deployment.yaml" >}}
@@ -135,7 +150,7 @@ One way to create a Deployment using a `.yaml` file like the one above is to use
[`kubectl apply`](/docs/reference/generated/kubectl/kubectl-commands#apply) command
in the `kubectl` command-line interface, passing the `.yaml` file as an argument. Here's an example:
-->
-使用类似于上面的 `.yaml` 文件来创建 Deployment 的一种方式是使用 `kubectl` 命令行接口(CLI)中的
+相较于上面使用 `.yaml` 文件来创建 Deployment,另一种类似的方式是使用 `kubectl` 命令行接口(CLI)中的
[`kubectl apply`](/docs/reference/generated/kubectl/kubectl-commands#apply) 命令,
将 `.yaml` 文件作为参数。下面是一个示例:
@@ -146,7 +161,7 @@ kubectl apply -f https://k8s.io/examples/application/deployment.yaml
-输出类似如下这样:
+输出类似下面这样:
```
deployment.apps/nginx-deployment created
@@ -162,21 +177,24 @@ In the `.yaml` file for the Kubernetes object you want to create, you'll need to
* `metadata` - Data that helps uniquely identify the object, including a `name` string, `UID`, and optional `namespace`
* `spec` - What state you desire for the object
-->
-### 必需字段 {#required-fields}
+### 必需字段 {#required-fields}
-在想要创建的 Kubernetes 对象对应的 `.yaml` 文件中,需要配置如下的字段:
+在想要创建的 Kubernetes 对象所对应的 `.yaml` 文件中,需要配置的字段如下:
* `apiVersion` - 创建该对象所使用的 Kubernetes API 的版本
* `kind` - 想要创建的对象的类别
-* `metadata` - 帮助唯一性标识对象的一些数据,包括一个 `name` 字符串、UID 和可选的 `namespace`
+* `metadata` - 帮助唯一性标识对象的一些数据,包括一个 `name` 字符串、`UID` 和可选的 `namespace`
* `spec` - 你所期望的该对象的状态
-对象 `spec` 的精确格式对每个 Kubernetes 对象来说是不同的,包含了特定于该对象的嵌套字段。
-[Kubernetes API 参考](https://kubernetes.io/docs/reference/kubernetes-api/)
-能够帮助我们找到任何我们想创建的对象的规约格式。
+对每个 Kubernetes 对象而言,其 `spec` 之精确格式都是不同的,包含了特定于该对象的嵌套字段。
+我们能在 [Kubernetes API 参考](/zh-cn/docs/reference/kubernetes-api/)
+找到我们想要在 Kubernetes 上创建的任何对象的规约格式。
-- 不同的团队可以在不同的命名空间下工作,目前这是非约束性的,在未来的版本中可能会通过
- ACL (Access Control List 访问控制列表) 来实现强制性约束。
+- 不同的团队可以在不同的命名空间下工作。这可以通过 [RBAC](/zh-cn/docs/reference/access-authn-authz/rbac/) 强制执行。
- 集群管理员可以为每个命名空间创建一个或多个 ResourceQuota 对象。
- 当用户在命名空间下创建资源(如 Pod、Service 等)时,Kubernetes 的配额系统会
跟踪集群的资源使用情况,以确保使用的资源用量不超过 ResourceQuota 中定义的硬性资源限额。
@@ -65,14 +63,14 @@ Resource quotas work like this:
提示: 可使用 `LimitRanger` 准入控制器来为没有设置计算资源需求的 Pod 设置默认值。
若想避免这类问题,请参考
- [演练](/zh/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/)示例。
+ [演练](/zh-cn/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/)示例。
ResourceQuota 对象的名称必须是合法的
-[DNS 子域名](/zh/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)。
+[DNS 子域名](/zh-cn/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)。
## 存储资源配额
-用户可以对给定命名空间下的[存储资源](/zh/docs/concepts/storage/persistent-volumes/)
+用户可以对给定命名空间下的[存储资源](/zh-cn/docs/concepts/storage/persistent-volumes/)
总量进行限制。
此外,还可以根据相关的存储类(Storage Class)来限制存储资源的消耗。
@@ -218,9 +216,9 @@ In addition, you can limit consumption of storage resources based on associated
| 资源名称 | 描述 |
| --------------------- | ----------------------------------------------------------- |
| `requests.storage` | 所有 PVC,存储资源的需求总量不能超过该值。 |
-| `persistentvolumeclaims` | 在该命名空间中所允许的 [PVC](/zh/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) 总量。 |
+| `persistentvolumeclaims` | 在该命名空间中所允许的 [PVC](/zh-cn/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) 总量。 |
| `.storageclass.storage.k8s.io/requests.storage` | 在所有与 `` 相关的持久卷申领中,存储请求的总和不能超过该值。 |
-| `.storageclass.storage.k8s.io/persistentvolumeclaims` | 在与 storage-class-name 相关的所有持久卷申领中,命名空间中可以存在的[持久卷申领](/zh/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)总数。 |
+| `.storageclass.storage.k8s.io/persistentvolumeclaims` | 在与 storage-class-name 相关的所有持久卷申领中,命名空间中可以存在的[持久卷申领](/zh-cn/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)总数。 |
如果所使用的是 CRI 容器运行时,容器日志会被计入临时存储配额。
这可能会导致存储配额耗尽的 Pods 被意外地驱逐出节点。
-参考[日志架构](/zh/docs/concepts/cluster-administration/logging/)
+参考[日志架构](/zh-cn/docs/concepts/cluster-administration/logging/)
了解详细信息。
{{< /note >}}
@@ -343,7 +341,7 @@ The following types are supported:
| 资源名称 | 描述 |
| ------------------------------- | ------------------------------------------------- |
| `configmaps` | 在该命名空间中允许存在的 ConfigMap 总数上限。 |
-| `persistentvolumeclaims` | 在该命名空间中允许存在的 [PVC](/zh/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) 的总数上限。 |
+| `persistentvolumeclaims` | 在该命名空间中允许存在的 [PVC](/zh-cn/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) 的总数上限。 |
| `pods` | 在该命名空间中允许存在的非终止状态的 Pod 总数上限。Pod 终止状态等价于 Pod 的 `.status.phase in (Failed, Succeeded)` 为真。 |
| `replicationcontrollers` | 在该命名空间中允许存在的 ReplicationController 总数上限。 |
| `resourcequotas` | 在该命名空间中允许存在的 ResourceQuota 总数上限。 |
@@ -396,8 +394,8 @@ Resources specified on the quota outside of the allowed set results in a validat
| `NotTerminating` | 匹配所有 `spec.activeDeadlineSeconds` 是 nil 的 Pod。 |
| `BestEffort` | 匹配所有 Qos 是 BestEffort 的 Pod。 |
| `NotBestEffort` | 匹配所有 Qos 不是 BestEffort 的 Pod。 |
-| `PriorityClass` | 匹配所有引用了所指定的[优先级类](/zh/docs/concepts/scheduling-eviction/pod-priority-preemption)的 Pods。 |
-| `CrossNamespacePodAffinity` | 匹配那些设置了跨名字空间 [(反)亲和性条件](/zh/docs/concepts/scheduling-eviction/assign-pod-node)的 Pod。 |
+| `PriorityClass` | 匹配所有引用了所指定的[优先级类](/zh-cn/docs/concepts/scheduling-eviction/pod-priority-preemption)的 Pods。 |
+| `CrossNamespacePodAffinity` | 匹配那些设置了跨名字空间 [(反)亲和性条件](/zh-cn/docs/concepts/scheduling-eviction/assign-pod-node)的 Pod。 |
-Pod 可以创建为特定的[优先级](/zh/docs/concepts/scheduling-eviction/pod-priority-preemption/#pod-priority)。
+Pod 可以创建为特定的[优先级](/zh-cn/docs/concepts/scheduling-eviction/pod-priority-preemption/#pod-priority)。
通过使用配额规约中的 `scopeSelector` 字段,用户可以根据 Pod 的优先级控制其系统资源消耗。
- 查看[资源配额设计文档](https://git.k8s.io/community/contributors/design-proposals/resource-management/admission_control_resource_quota.md)
-- 查看[如何使用资源配额的详细示例](/zh/docs/tasks/administer-cluster/quota-api-object/)。
+- 查看[如何使用资源配额的详细示例](/zh-cn/docs/tasks/administer-cluster/quota-api-object/)。
- 阅读[优先级类配额支持的设计文档](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/scheduling/pod-priority-resourcequota.md)。
了解更多信息。
- 参阅 [LimitedResources](https://github.com/kubernetes/kubernetes/pull/36765)
diff --git a/content/zh/docs/concepts/scheduling-eviction/_index.md b/content/zh-cn/docs/concepts/scheduling-eviction/_index.md
similarity index 100%
rename from content/zh/docs/concepts/scheduling-eviction/_index.md
rename to content/zh-cn/docs/concepts/scheduling-eviction/_index.md
diff --git a/content/zh/docs/concepts/scheduling-eviction/api-eviction.md b/content/zh-cn/docs/concepts/scheduling-eviction/api-eviction.md
similarity index 100%
rename from content/zh/docs/concepts/scheduling-eviction/api-eviction.md
rename to content/zh-cn/docs/concepts/scheduling-eviction/api-eviction.md
diff --git a/content/zh/docs/concepts/scheduling-eviction/assign-pod-node.md b/content/zh-cn/docs/concepts/scheduling-eviction/assign-pod-node.md
similarity index 98%
rename from content/zh/docs/concepts/scheduling-eviction/assign-pod-node.md
rename to content/zh-cn/docs/concepts/scheduling-eviction/assign-pod-node.md
index a210302498..3dcd46b8c4 100644
--- a/content/zh/docs/concepts/scheduling-eviction/assign-pod-node.md
+++ b/content/zh-cn/docs/concepts/scheduling-eviction/assign-pod-node.md
@@ -551,12 +551,11 @@ same zone currently running Pods with the `Security=S2` Pod label.
并且节点具有标签 `topology.kubernetes.io/zone=R`,Pod 不能被调度到该节点上。
-查阅[设计文档](https://git.k8s.io/community/contributors/design-proposals/scheduling/podaffinity.md)
-以了解 Pod 亲和性与反亲和性的更多示例。
+查阅[设计文档](https://github.com/kubernetes/design-proposals-archive/blob/main/scheduling/podaffinity.md)
+以进一步熟悉 Pod 亲和性与反亲和性的示例。
-如果定义了 ResourceQuata, 则容器请求的总量以及 `overhead` 字段都将计算在内。
+如果定义了 [ResourceQuata](/zh/docs/concepts/policy/resource-quotas/),
+则容器请求的总量以及 `overhead` 字段都将计算在内。
+
+
+
+
+在 kube-scheduler 的[调度插件](/zh-cn/docs/reference/scheduling/config/#scheduling-plugins)
+`NodeResourcesFit` 中存在两种支持资源装箱(bin packing)的策略:`MostAllocated` 和
+`RequestedToCapacityRatio`。
+
+
+
+
+## 使用 MostAllocated 策略启用资源装箱 {#enabling-bin-packing-using-mostallocated-strategy}
+
+`MostAllocated` 策略基于资源的利用率来为节点计分,优选分配比率较高的节点。
+针对每种资源类型,你可以设置一个权重值以改变其对节点得分的影响。
+
+要为插件 `NodeResourcesFit` 设置 `MostAllocated` 策略,
+可以使用一个类似于下面这样的[调度器配置](/zh-cn/docs/reference/scheduling/config/):
+
+```yaml
+apiVersion: kubescheduler.config.k8s.io/v1beta3
+kind: KubeSchedulerConfiguration
+profiles:
+- pluginConfig:
+ - args:
+ scoringStrategy:
+ resources:
+ - name: cpu
+ weight: 1
+ - name: memory
+ weight: 1
+ - name: intel.com/foo
+ weight: 3
+ - name: intel.com/bar
+ weight: 3
+ type: MostAllocated
+ name: NodeResourcesFit
+```
+
+
+要进一步了解其它参数及其默认配置,请参阅
+[`NodeResourcesFitArgs`](/zh-cn/docs/reference/config-api/kube-scheduler-config.v1beta3/#kubescheduler-config-k8s-io-v1beta3-NodeResourcesFitArgs)
+的 API 文档。
+
+
+## 使用 RequestedToCapacityRatio 策略来启用资源装箱 {#enabling-bin-packing-using-requestedtocapacityratio}
+
+`RequestedToCapacityRatio` 策略允许用户基于请求值与容量的比率,针对参与节点计分的每类资源设置权重。
+这一策略是的用户可以使用合适的参数来对扩展资源执行装箱操作,进而提升大规模集群中稀有资源的利用率。
+此策略根据所分配资源的一个配置函数来评价节点。
+`NodeResourcesFit` 计分函数中的 `RequestedToCapacityRatio` 可以通过字段
+[scoringStrategy](/zh-cn/docs/reference/config-api/kube-scheduler-config.v1beta3/#kubescheduler-config-k8s-io-v1beta3-ScoringStrategy)
+来控制。
+在 `scoringStrategy` 字段中,你可以配置两个参数:`requestedToCapacityRatioParam`
+和 `resources`。`requestedToCapacityRatioParam` 参数中的 `shape`
+设置使得用户能够调整函数的算法,基于 `utilization` 和 `score` 值计算最少请求或最多请求。
+`resources` 参数中包含计分过程中需要考虑的资源的 `name`,以及用来设置每种资源权重的 `weight`。
+
+
+下面是一个配置示例,使用 `requestedToCapacityRatio` 字段为扩展资源 `intel.com/foo`
+和 `intel.com/bar` 设置装箱行为:
+
+```yaml
+apiVersion: kubescheduler.config.k8s.io/v1beta3
+kind: KubeSchedulerConfiguration
+profiles:
+- pluginConfig:
+ - args:
+ scoringStrategy:
+ resources:
+ - name: intel.com/foo
+ weight: 3
+ - name: intel.com/bar
+ weight: 3
+ requestedToCapacityRatioParam:
+ shape:
+ - utilization: 0
+ score: 0
+ - utilization: 100
+ score: 10
+ type: RequestedToCapacityRatio
+ name: NodeResourcesFit
+```
+
+
+使用 kube-scheduler 标志 `--config=/path/to/config/file`
+引用 `KubeSchedulerConfiguration` 文件,可以将配置传递给调度器。
+
+
+要进一步了解其它参数及其默认配置,可以参阅
+[`NodeResourcesFitArgs`](/zh-cn/docs/reference/config-api/kube-scheduler-config.v1beta3/#kubescheduler-config-k8s-io-v1beta3-NodeResourcesFitArgs)
+的 API 文档。
+
+
+### 调整计分函数 {#tuning-the-score-function}
+
+`shape` 用于指定 `RequestedToCapacityRatio` 函数的行为。
+
+```yaml
+shape:
+ - utilization: 0
+ score: 0
+ - utilization: 100
+ score: 10
+```
+
+
+上面的参数在 `utilization` 为 0% 时给节点评分为 0,在 `utilization` 为
+100% 时给节点评分为 10,因此启用了装箱行为。
+要启用最少请求(least requested)模式,必须按如下方式反转得分值。
+
+```yaml
+ shape:
+ - utilization: 0
+ score: 10
+ - utilization: 100
+ score: 0
+```
+
+
+`resources` 是一个可选参数,默认情况下设置为:
+
+``` yaml
+resources:
+ - name: cpu
+ weight: 1
+ - name: memory
+ weight: 1
+```
+
+
+它可以像下面这样用来添加扩展资源:
+
+```yaml
+resources:
+ - name: intel.com/foo
+ weight: 5
+ - name: cpu
+ weight: 3
+ - name: memory
+ weight: 1
+```
+
+
+`weight` 参数是可选的,如果未指定,则设置为 1。
+同时,`weight` 不能设置为负值。
+
+
+### 节点容量分配的评分 {#node-scoring-for-capacity-allocation}
+
+本节适用于希望了解此功能的内部细节的人员。
+以下是如何针对给定的一组值来计算节点得分的示例。
+
+
+请求的资源:
+
+```
+intel.com/foo : 2
+memory: 256MB
+cpu: 2
+```
+
+
+资源权重:
+
+```
+intel.com/foo : 5
+memory: 1
+cpu: 3
+```
+
+```
+FunctionShapePoint {{0, 0}, {100, 10}}
+```
+
+
+节点 1 配置:
+
+```
+可用:
+ intel.com/foo : 4
+ memory : 1 GB
+ cpu: 8
+
+已用:
+ intel.com/foo: 1
+ memory: 256MB
+ cpu: 1
+```
+
+
+节点得分:
+
+```
+intel.com/foo = resourceScoringFunction((2+1),4)
+ = (100 - ((4-3)*100/4)
+ = (100 - 25)
+ = 75 # requested + used = 75% * available
+ = rawScoringFunction(75)
+ = 7 # floor(75/10)
+
+memory = resourceScoringFunction((256+256),1024)
+ = (100 -((1024-512)*100/1024))
+ = 50 # requested + used = 50% * available
+ = rawScoringFunction(50)
+ = 5 # floor(50/10)
+
+cpu = resourceScoringFunction((2+1),8)
+ = (100 -((8-3)*100/8))
+ = 37.5 # requested + used = 37.5% * available
+ = rawScoringFunction(37.5)
+ = 3 # floor(37.5/10)
+
+NodeScore = (7 * 5) + (5 * 1) + (3 * 3) / (5 + 1 + 3)
+ = 5
+```
+
+
+节点 2 配置:
+
+```
+可用:
+ intel.com/foo: 8
+ memory: 1GB
+ cpu: 8
+
+已用:
+ intel.com/foo: 2
+ memory: 512MB
+ cpu: 6
+```
+
+
+节点得分:
+
+```
+intel.com/foo = resourceScoringFunction((2+2),8)
+ = (100 - ((8-4)*100/8)
+ = (100 - 50)
+ = 50
+ = rawScoringFunction(50)
+ = 5
+
+memory = resourceScoringFunction((256+512),1024)
+ = (100 -((1024-768)*100/1024))
+ = 75
+ = rawScoringFunction(75)
+ = 7
+
+cpu = resourceScoringFunction((2+6),8)
+ = (100 -((8-8)*100/8))
+ = 100
+ = rawScoringFunction(100)
+ = 10
+
+NodeScore = (5 * 5) + (7 * 1) + (10 * 3) / (5 + 1 + 3)
+ = 7
+```
+
+## {{% heading "whatsnext" %}}
+
+
+- 继续阅读[调度器框架](/zh-cn/docs/concepts/scheduling-eviction/scheduling-framework/)
+- 继续阅读[调度器配置](/zh-cn/docs/reference/scheduling/config/)
+
diff --git a/content/zh/docs/concepts/scheduling-eviction/scheduler-perf-tuning.md b/content/zh-cn/docs/concepts/scheduling-eviction/scheduler-perf-tuning.md
similarity index 100%
rename from content/zh/docs/concepts/scheduling-eviction/scheduler-perf-tuning.md
rename to content/zh-cn/docs/concepts/scheduling-eviction/scheduler-perf-tuning.md
diff --git a/content/zh/docs/concepts/scheduling-eviction/scheduling-framework.md b/content/zh-cn/docs/concepts/scheduling-eviction/scheduling-framework.md
similarity index 100%
rename from content/zh/docs/concepts/scheduling-eviction/scheduling-framework.md
rename to content/zh-cn/docs/concepts/scheduling-eviction/scheduling-framework.md
diff --git a/content/zh/docs/concepts/scheduling-eviction/taint-and-toleration.md b/content/zh-cn/docs/concepts/scheduling-eviction/taint-and-toleration.md
similarity index 100%
rename from content/zh/docs/concepts/scheduling-eviction/taint-and-toleration.md
rename to content/zh-cn/docs/concepts/scheduling-eviction/taint-and-toleration.md
diff --git a/content/zh/docs/concepts/security/_index.md b/content/zh-cn/docs/concepts/security/_index.md
similarity index 100%
rename from content/zh/docs/concepts/security/_index.md
rename to content/zh-cn/docs/concepts/security/_index.md
diff --git a/content/zh/docs/concepts/security/controlling-access.md b/content/zh-cn/docs/concepts/security/controlling-access.md
similarity index 100%
rename from content/zh/docs/concepts/security/controlling-access.md
rename to content/zh-cn/docs/concepts/security/controlling-access.md
diff --git a/content/zh/docs/concepts/security/overview.md b/content/zh-cn/docs/concepts/security/overview.md
similarity index 96%
rename from content/zh/docs/concepts/security/overview.md
rename to content/zh-cn/docs/concepts/security/overview.md
index 29cc2a06a2..9a9e9845a7 100644
--- a/content/zh/docs/concepts/security/overview.md
+++ b/content/zh-cn/docs/concepts/security/overview.md
@@ -5,6 +5,15 @@ description: >
content_type: concept
weight: 1
---
+
-## 云原生安全的 4 个 C
+## 云原生安全的 4 个 C {#the-4c-s-of-cloud-native-security}
你可以分层去考虑安全性,云原生安全的 4 个 C 分别是云(Cloud)、集群(Cluster)、容器(Container)和代码(Code)。
@@ -53,7 +62,10 @@ security at the Code level.
云原生安全模型的每一层都是基于下一个最外层,代码层受益于强大的基础安全层(云、集群、容器)。
你无法通过在代码层解决安全问题来为基础层中糟糕的安全标准提供保护。
-## 云
+
+## 云 {#cloud}
-### 云提供商安全性
+### 云提供商安全性 {#cloud-provider-security}
如果你是在你自己的硬件或者其他不同的云提供商上运行 Kubernetes 集群,
请查阅相关文档来获取最好的安全实践。
@@ -137,7 +149,7 @@ There are two areas of concern for securing Kubernetes:
* Securing the cluster components that are configurable
* Securing the applications which run in the cluster
-->
-## 集群
+## 集群 {#cluster}
保护 Kubernetes 有两个方面需要注意:
@@ -205,7 +217,7 @@ Image Signing and Enforcement | Sign container images to maintain a system of tr
Disallow privileged users | When constructing containers, consult your documentation for how to create users inside of the containers that have the least level of operating system privilege necessary in order to carry out the goal of the container.
Use container runtime with stronger isolation | Select [container runtime classes](/docs/concepts/containers/runtime-class/) that provide stronger isolation
-->
-## 容器
+## 容器 {#container}
容器安全性不在本指南的探讨范围内。下面是一些探索此主题的建议和连接:
@@ -222,7 +234,7 @@ Application code is one of the primary attack surfaces over which you have the m
While securing application code is outside of the Kubernetes security topic, here
are recommendations to protect application code:
-->
-## 代码
+## 代码 {#code}
应用程序代码是你最能够控制的主要攻击面之一,虽然保护应用程序代码不在 Kubernetes 安全主题范围内,但以下是保护应用程序代码的建议:
@@ -241,7 +253,7 @@ Dynamic probing attacks | There are a few automated tools that you can run again
{{< /table >}}
-->
-### 代码安全性
+### 代码安全性 {#code-security}
{{< table caption="代码安全" >}}
@@ -250,7 +262,7 @@ Dynamic probing attacks | There are a few automated tools that you can run again
仅通过 TLS 访问 | 如果你的代码需要通过 TCP 通信,请提前与客户端执行 TLS 握手。除少数情况外,请加密传输中的所有内容。更进一步,加密服务之间的网络流量是一个好主意。这可以通过被称为双向 TLS 或 [mTLS](https://en.wikipedia.org/wiki/Mutual_authentication) 的过程来完成,该过程对两个证书持有服务之间的通信执行双向验证。 |
限制通信端口范围 | 此建议可能有点不言自明,但是在任何可能的情况下,你都只应公开服务上对于通信或度量收集绝对必要的端口。|
第三方依赖性安全 | 最好定期扫描应用程序的第三方库以了解已知的安全漏洞。每种编程语言都有一个自动执行此检查的工具。 |
-静态代码分析 | 大多数语言都提供给了一种方法,来分析代码段中是否存在潜在的不安全的编码实践。只要有可能,你都应该使用自动工具执行检查,该工具可以扫描代码库以查找常见的安全错误,一些工具可以在以下连接中找到:https://owasp.org/www-community/Source_Code_Analysis_Tools |
+静态代码分析 | 大多数语言都提供给了一种方法,来分析代码段中是否存在潜在的不安全的编码实践。只要有可能,你都应该使用自动工具执行检查,该工具可以扫描代码库以查找常见的安全错误,一些工具可以在以下连接中找到: https://owasp.org/www-community/Source_Code_Analysis_Tools |
动态探测攻击 | 你可以对服务运行一些自动化工具,来尝试一些众所周知的服务攻击。这些攻击包括 SQL 注入、CSRF 和 XSS。[OWASP Zed Attack](https://owasp.org/www-project-zap/) 代理工具是最受欢迎的动态分析工具之一。 |
{{< /table >}}
diff --git a/content/zh/docs/concepts/security/pod-security-admission.md b/content/zh-cn/docs/concepts/security/pod-security-admission.md
similarity index 89%
rename from content/zh/docs/concepts/security/pod-security-admission.md
rename to content/zh-cn/docs/concepts/security/pod-security-admission.md
index 87fddd9ddb..54ae5436a0 100644
--- a/content/zh/docs/concepts/security/pod-security-admission.md
+++ b/content/zh-cn/docs/concepts/security/pod-security-admission.md
@@ -33,7 +33,7 @@ Kubernetes [Pod 安全性标准(Security Standards)](/zh/docs/concepts/secur
为 Pod 定义不同的隔离级别。这些标准能够让你以一种清晰、一致的方式定义如何限制 Pod 行为。
-## 启用 `PodSecurity` 准入插件 {#enabling-the-podsecurity-admission-plugin}
+## {{% heading "prerequisites" %}}
-在 v1.23 中,`PodSecurity` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
-是一项 Beta 功能特性,默认被启用。
+要使用此机制,你的集群必须强制执行 Pod 安全准入。
-在 v1.22 中,`PodSecurity` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
-是一项 Alpha 功能特性,必须在 `kube-apiserver` 上启用才能使用内置的准入插件。
-
-```shell
---feature-gates="...,PodSecurity=true"
-```
+### 内置 Pod 安全准入强制执行
-## 替代方案:安装 `PodSecurity` 准入 Webhook {#webhook}
+在 Kubernetes v{{< skew currentVersion >}} 中,`PodSecurity`
+[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)是一项 Beta 特性,
+默认被启用。你必须启用此功能门控。如果你运行的是不同版本的 Kubernetes,请查阅该版本的文档。
-对于无法应用内置 `PodSecurity` 准入插件的环境,无论是因为集群版本低于 v1.22,
-或者 `PodSecurity` 特性无法被启用,都可以使用 Beta 版本的
-[验证性准入 Webhook](https://git.k8s.io/pod-security-admission/webhook)。
-来使用 `PodSecurity` 准入逻辑。
+
+
+
+### 替代方案:安装 `PodSecurity` 准入 Webhook {#webhook}
+
+`PodSecurity` 准入逻辑也可用作[验证性准入 Webhook](https://git.k8s.io/pod-security-admission/webhook)。
+该实现也是 Beta 版本。
+对于无法启用内置 `PodSecurity` 准入插件的环境,你可以改为通过验证准入 Webhook 启用该逻辑。
+
diff --git a/content/zh-cn/docs/concepts/security/pod-security-policy.md b/content/zh-cn/docs/concepts/security/pod-security-policy.md
new file mode 100644
index 0000000000..6bb83482f6
--- /dev/null
+++ b/content/zh-cn/docs/concepts/security/pod-security-policy.md
@@ -0,0 +1,1360 @@
+---
+title: Pod 安全策略
+content_type: concept
+weight: 30
+---
+
+
+
+{{< feature-state for_k8s_version="v1.21" state="deprecated" >}}
+
+{{< caution >}}
+
+PodSecurityPolicy 在 Kubernetes v1.21 版本中被弃用,**将在 v1.25 中删除**。
+我们建议迁移到 [Pod 安全性准入](/zh/docs/concepts/security/pod-security-admission),
+或者第三方的准入插件。
+若需了解迁移指南,可参阅[从 PodSecurityPolicy 迁移到内置的 PodSecurity 准入控制器](/zh/docs/tasks/configure-pod-container/migrate-from-psp/)。
+关于弃用的更多信息,请查阅 [PodSecurityPolicy Deprecation: Past, Present, and Future](/blog/2021/04/06/podsecuritypolicy-deprecation-past-present-and-future/)。
+{{< /caution >}}
+
+
+Pod 安全策略使得对 Pod 创建和更新进行细粒度的权限控制成为可能。
+
+
+
+
+## 什么是 Pod 安全策略? {#what-is-a-pod-security-policy}
+
+_Pod 安全策略(Pod Security Policy)_ 是集群级别的资源,它能够控制 Pod 规约
+中与安全性相关的各个方面。
+[PodSecurityPolicy](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritypolicy-v1beta1-policy)
+对象定义了一组 Pod 运行时必须遵循的条件及相关字段的默认值,只有 Pod 满足这些条件才会被系统接受。
+Pod 安全策略允许管理员控制如下方面:
+
+
+| 控制的角度 | 字段名称 |
+| ----------------------------------- | --------------------------------- |
+| 运行特权容器 | [`privileged`](#privileged) |
+| 使用宿主名字空间 | [`hostPID`、`hostIPC`](#host-namespaces) |
+| 使用宿主的网络和端口 | [`hostNetwork`, `hostPorts`](#host-namespaces) |
+| 控制卷类型的使用 | [`volumes`](#volumes-and-file-systems) |
+| 使用宿主文件系统 | [`allowedHostPaths`](#volumes-and-file-systems) |
+| 允许使用特定的 FlexVolume 驱动 | [`allowedFlexVolumes`](#flexvolume-drivers) |
+| 分配拥有 Pod 卷的 FSGroup 账号 | [`fsGroup`](#volumes-and-file-systems) |
+| 以只读方式访问根文件系统 | [`readOnlyRootFilesystem`](#volumes-and-file-systems) |
+| 设置容器的用户和组 ID | [`runAsUser`, `runAsGroup`, `supplementalGroups`](#users-and-groups) |
+| 限制 root 账号特权级提升 | [`allowPrivilegeEscalation`, `defaultAllowPrivilegeEscalation`](#privilege-escalation) |
+| Linux 权能字(Capabilities) | [`defaultAddCapabilities`, `requiredDropCapabilities`, `allowedCapabilities`](#capabilities) |
+| 设置容器的 SELinux 上下文 | [`seLinux`](#selinux) |
+| 指定容器可以挂载的 proc 类型 | [`allowedProcMountTypes`](#allowedprocmounttypes) |
+| 指定容器使用的 AppArmor 模版 | [annotations](#apparmor) |
+| 指定容器使用的 seccomp 模版 | [annotations](#seccomp) |
+| 指定容器使用的 sysctl 模版 | [`forbiddenSysctls`,`allowedUnsafeSysctls`](#sysctl) |
+
+
+## 启用 Pod 安全策略 {#enabling-pod-security-policies}
+
+Pod 安全策略实现为一种可选的[准入控制器](/zh/docs/reference/access-authn-authz/admission-controllers/#podsecuritypolicy)。
+[启用了准入控制器](/zh/docs/reference/access-authn-authz/admission-controllers/#how-do-i-turn-on-an-admission-control-plug-in)即可强制实施
+Pod 安全策略,不过如果没有授权认可策略之前即启用准入控制器 **将导致集群中无法创建任何 Pod**。
+
+
+由于 Pod 安全策略 API(`policy/v1beta1/podsecuritypolicy`)是独立于准入控制器
+来启用的,对于现有集群而言,建议在启用准入控制器之前先添加策略并对其授权。
+
+
+## 授权策略 {#authorizing-policies}
+
+PodSecurityPolicy 资源被创建时,并不执行任何操作。为了使用该资源,
+需要对发出请求的用户或者目标 Pod
+的[服务账号](/zh/docs/tasks/configure-pod-container/configure-service-account/)授权,
+通过允许其对策略执行 `use` 动词允许其使用该策略。
+
+
+大多数 Kubernetes Pod 不是由用户直接创建的。相反,这些 Pod 是由
+[Deployment](/zh/docs/concepts/workloads/controllers/deployment/)、
+[ReplicaSet](/zh/docs/concepts/workloads/controllers/replicaset/)
+或者经由控制器管理器模版化的控制器创建。
+赋予控制器访问策略的权限意味着对应控制器所创建的 *所有* Pod 都可访问策略。
+因此,对策略进行授权的优先方案是为 Pod 的服务账号授予访问权限
+(参见[示例](#run-another-pod))。
+
+
+### 通过 RBAC 授权 {#via-rbac}
+
+[RBAC](/zh/docs/reference/access-authn-authz/rbac/) 是一种标准的 Kubernetes
+鉴权模式,可以很容易地用来授权策略访问。
+
+首先,某 `Role` 或 `ClusterRole` 需要获得使用 `use` 访问目标策略的权限。
+访问授权的规则看起来像这样:
+
+```yaml
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name:
+rules:
+- apiGroups: ['policy']
+ resources: ['podsecuritypolicies']
+ verbs: ['use']
+ resourceNames:
+ - <要授权的策略列表>
+```
+
+
+接下来将该 `Role`(或 `ClusterRole`)绑定到授权的用户:
+
+```yaml
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ name: <绑定名称>
+roleRef:
+ kind: ClusterRole
+ name: <角色名称>
+ apiGroup: rbac.authorization.k8s.io
+subjects:
+ # 授权命名空间下的所有服务账号(推荐):
+ - kind: Group
+ apiGroup: rbac.authorization.k8s.io
+ name: system:serviceaccounts:
+ # 授权特定的服务账号(不建议这样操作):
+ - kind: ServiceAccount
+ name: <被授权的服务账号名称>
+ namespace: <被授权的 Pod 名字空间>
+ # 授权特定的用户(不建议这样操作):
+ - kind: User
+ apiGroup: rbac.authorization.k8s.io
+ name: <被授权的用户名>
+```
+
+
+如果使用的是 `RoleBinding`(而不是 `ClusterRoleBinding`),授权仅限于与该
+`RoleBinding` 处于同一名字空间中的 Pod。
+可以考虑将这种授权模式和系统组结合,对名字空间中的所有 Pod 授予访问权限。
+
+```yaml
+# 授权某名字空间中所有服务账号
+- kind: Group
+ apiGroup: rbac.authorization.k8s.io
+ name: system:serviceaccounts
+# 或者与此等价,授权给某名字空间中所有被认证过的用户
+- kind: Group
+ apiGroup: rbac.authorization.k8s.io
+ name: system:authenticated
+```
+
+
+参阅[角色绑定示例](/zh/docs/reference/access-authn-authz/rbac#role-binding-examples)查看
+RBAC 绑定的更多实例。
+参阅[下文](#example),查看对 PodSecurityPolicy 进行授权的完整示例。
+
+
+## 推荐实践 {#recommended-practice}
+
+PodSecurityPolicy 正在被一个新的、简化的 `PodSecurity`
+{{< glossary_tooltip text="准入控制器" term_id="admission-controller" >}}替代。
+有关此变更的更多详细信息,请参阅
+[PodSecurityPolicy Deprecation: Past, Present, and Future](/blog/2021/04/06/podsecuritypolicy-deprecation-past-present-and-future/)。
+参照下述指导,简化从 PodSecurityPolicy 迁移到新的准入控制器步骤:
+
+
+1. 将 PodSecurityPolicies 限制为
+ [Pod 安全性标准](/zh/docs/concepts/security/pod-security-standards)所定义的策略:
+
+ - {{< example file="policy/privileged-psp.yaml" >}}Privileged{{< /example >}}
+ - {{< example file="policy/baseline-psp.yaml" >}}Baseline{{< /example >}}
+ - {{< example file="policy/restricted-psp.yaml" >}}Restricted{{< /example >}}
+
+
+2. 通过配置 `system:serviceaccounts:` 组(`` 是目标名字空间),
+ 仅将 PSP 绑定到整个命名空间。示例:
+
+ ```yaml
+ apiVersion: rbac.authorization.k8s.io/v1
+ # 此集群角色绑定允许 "development" 名字空间中的所有 Pod 使用 baseline PSP。
+ kind: ClusterRoleBinding
+ metadata:
+ name: psp-baseline-namespaces
+ roleRef:
+ kind: ClusterRole
+ name: psp-baseline
+ apiGroup: rbac.authorization.k8s.io
+ subjects:
+ - kind: Group
+ name: system:serviceaccounts:development
+ apiGroup: rbac.authorization.k8s.io
+ - kind: Group
+ name: system:serviceaccounts:canary
+ apiGroup: rbac.authorization.k8s.io
+ ```
+
+
+### 故障排查 {#troubleshooting}
+
+- [控制器管理器组件](/zh/docs/reference/command-line-tools-reference/kube-controller-manager/)
+ 必须运行在安全的 API 端口之上,并且不能拥有超级用户的访问权限。
+ 参阅[控制 Kubernetes API 的访问](/zh/docs/concepts/security/controlling-access)以了解
+ API 服务器的访问控制。
+
+ 如果控制器管理器通过可信的 API 端口连接(也称作 `localhost` 监听组件),
+ 其请求会绕过身份认证和鉴权模块控制,从而导致所有 PodSecurityPolicy 对象都被允许,
+ 用户亦能授予自身创建特权容器的特权。
+
+ 关于配置控制器管理器鉴权的进一步细节,
+ 请参阅[控制器角色](/zh/docs/reference/access-authn-authz/rbac/#controller-roles)。
+
+
+## 策略顺序 {#policy-order}
+
+除了限制 Pod 创建与更新,Pod 安全策略也可用来为其所控制的很多字段设置默认值。
+当存在多个策略对象时,Pod 安全策略控制器依据以下条件选择策略:
+
+
+1. 优先考虑允许 Pod 保持原样,不会更改 Pod 字段默认值或其他配置的 PodSecurityPolicy。
+ 这类非更改性质的 PodSecurityPolicy 对象之间的顺序无关紧要。
+2. 如果必须要为 Pod 设置默认值或者其他配置,(按名称顺序)选择第一个允许
+ Pod 操作的 PodSecurityPolicy 对象。
+
+{{< note >}}
+
+在更新操作期间(这时不允许更改 Pod 规约),仅使用非更改性质的
+PodSecurityPolicy 来对 Pod 执行验证操作。
+{{< /note >}}
+
+
+## 示例 {#example}
+
+本示例假定你已经有一个启动了 PodSecurityPolicy 准入控制器的集群并且你拥有集群管理员特权。
+
+
+### 配置 {#set-up}
+
+为运行此示例,配置一个名字空间和一个服务账号。我们将用这个服务账号来模拟一个非管理员账号的用户。
+
+```shell
+kubectl create namespace psp-example
+kubectl create serviceaccount -n psp-example fake-user
+kubectl create rolebinding -n psp-example fake-editor --clusterrole=edit --serviceaccount=psp-example:fake-user
+```
+
+
+创建两个别名,以更清晰地展示我们所使用的用户账号,同时减少一些键盘输入:
+
+```shell
+alias kubectl-admin='kubectl -n psp-example'
+alias kubectl-user='kubectl --as=system:serviceaccount:psp-example:fake-user -n psp-example'
+```
+
+
+### 创建一个策略和一个 Pod
+
+在一个文件中定义一个示例的 PodSecurityPolicy 对象。
+这里的策略只是用来禁止创建有特权要求的 Pods。
+PodSecurityPolicy 对象的名称必须是合法的
+[DNS 子域名](/zh/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)。
+
+{{< codenew file="policy/example-psp.yaml" >}}
+
+
+使用 kubectl 执行创建操作:
+
+```shell
+kubectl-admin create -f example-psp.yaml
+```
+
+
+现在,作为一个非特权用户,尝试创建一个简单的 Pod:
+
+```shell
+kubectl-user create -f- <
+输出类似于:
+```
+Error from server (Forbidden): error when creating "STDIN": pods "pause" is forbidden: unable to validate against any pod security policy: []
+```
+
+
+**发生了什么?** 尽管 PodSecurityPolicy 被创建,Pod 的服务账号或者
+`fake-user` 用户都没有使用该策略的权限。
+
+```shell
+kubectl-user auth can-i use podsecuritypolicy/example
+```
+
+```
+no
+```
+
+创建角色绑定,赋予 `fake-user` `use`(使用)示例策略的权限:
+
+{{< note >}}
+
+不建议使用这种方法!
+欲了解优先考虑的方法,请参见[下节](#run-another-pod)。
+{{< /note >}}
+
+```shell
+kubectl-admin create role psp:unprivileged \
+ --verb=use \
+ --resource=podsecuritypolicy \
+ --resource-name=example
+```
+
+输出:
+
+```
+role "psp:unprivileged" created
+```
+
+```shell
+kubectl-admin create rolebinding fake-user:psp:unprivileged \
+ --role=psp:unprivileged \
+ --serviceaccount=psp-example:fake-user
+```
+
+输出:
+
+```
+rolebinding "fake-user:psp:unprivileged" created
+```
+
+```shell
+kubectl-user auth can-i use podsecuritypolicy/example
+```
+
+输出:
+
+```
+yes
+```
+
+
+现在重试创建 Pod:
+
+```shell
+kubectl-user create -f- <
+输出类似于:
+
+```
+pod "pause" created
+```
+
+
+此次尝试不出所料地成功了!
+不过任何创建特权 Pod 的尝试还是会被拒绝:
+
+```shell
+kubectl-user create -f- <
+
+输出类似于:
+```
+Error from server (Forbidden): error when creating "STDIN": pods "privileged" is forbidden: unable to validate against any pod security policy: [spec.containers[0].securityContext.privileged: Invalid value: true: Privileged containers are not allowed]
+```
+
+
+继续此例之前先删除该 Pod:
+
+```shell
+kubectl-user delete pod pause
+```
+
+
+### 运行另一个 Pod {#run-another-pod}
+
+我们再试一次,稍微有些不同:
+
+```shell
+kubectl-user create deployment pause --image=k8s.gcr.io/pause
+```
+
+输出为:
+
+```
+deployment "pause" created
+```
+
+```shell
+kubectl-user get pods
+```
+
+输出为:
+
+```
+No resources found.
+```
+
+```shell
+kubectl-user get events | head -n 2
+```
+
+输出为:
+```
+LASTSEEN FIRSTSEEN COUNT NAME KIND SUBOBJECT TYPE REASON SOURCE MESSAGE
+1m 2m 15 pause-7774d79b5 ReplicaSet Warning FailedCreate replicaset-controller Error creating: pods "pause-7774d79b5-" is forbidden: no providers available to validate pod request
+```
+
+
+**发生了什么?** 我们已经为用户 `fake-user` 绑定了 `psp:unprivileged` 角色,
+为什么还会收到错误 `Error creating: pods "pause-7774d79b5-" is
+forbidden: no providers available to validate pod request
+(创建错误:pods "pause-7774d79b5" 被禁止:没有可用来验证 pod 请求的驱动)`?
+答案在于源文件 - `replicaset-controller`。
+`fake-user` 用户成功地创建了 Deployment,而后者也成功地创建了 ReplicaSet,
+不过当 ReplicaSet 创建 Pod 时,发现未被授权使用示例 PodSecurityPolicy 资源。
+
+
+为了修复这一问题,将 `psp:unprivileged` 角色绑定到 Pod 的服务账号。
+在这里,因为我们没有给出服务账号名称,默认的服务账号是 `default`。
+
+```shell
+kubectl-admin create rolebinding default:psp:unprivileged \
+ --role=psp:unprivileged \
+ --serviceaccount=psp-example:default
+```
+
+输出为:
+
+```none
+rolebinding "default:psp:unprivileged" created
+```
+
+
+现在如果你给 ReplicaSet 控制器一分钟的时间来重试,该控制器最终将能够
+成功地创建 Pod:
+
+```shell
+kubectl-user get pods --watch
+```
+
+输出类似于:
+
+```none
+NAME READY STATUS RESTARTS AGE
+pause-7774d79b5-qrgcb 0/1 Pending 0 1s
+pause-7774d79b5-qrgcb 0/1 Pending 0 1s
+pause-7774d79b5-qrgcb 0/1 ContainerCreating 0 1s
+pause-7774d79b5-qrgcb 1/1 Running 0 2s
+```
+
+
+### 清理 {#clean-up}
+
+删除名字空间即可清理大部分示例资源:
+
+```shell
+kubectl-admin delete ns psp-example
+```
+
+输出类似于:
+
+```
+namespace "psp-example" deleted
+```
+
+
+注意 `PodSecurityPolicy` 资源不是名字空间域的资源,必须单独清理:
+
+```shell
+kubectl-admin delete psp example
+```
+
+输出类似于:
+
+```none
+podsecuritypolicy "example" deleted
+```
+
+
+### 示例策略 {#example-policies}
+
+下面是一个你可以创建的约束性非常弱的策略,其效果等价于没有使用 Pod 安全策略准入控制器:
+
+{{< codenew file="policy/privileged-psp.yaml" >}}
+
+
+下面是一个具有约束性的策略,要求用户以非特权账号运行,禁止可能的向 root 权限的升级,
+同时要求使用若干安全机制。
+
+{{< codenew file="policy/restricted-psp.yaml" >}}
+
+
+更多的示例可参考
+[Pod 安全标准](/zh/docs/concepts/security/pod-security-standards/#policy-instantiation)。
+
+
+## 策略参考 {#policy-reference}
+
+### Privileged
+
+**Privileged** - 决定是否 Pod 中的某容器可以启用特权模式。
+默认情况下,容器是不可以访问宿主上的任何设备的,不过一个“privileged(特权的)”
+容器则被授权访问宿主上所有设备。
+这种容器几乎享有宿主上运行的进程的所有访问权限。
+对于需要使用 Linux 权能字(如操控网络堆栈和访问设备)的容器而言是有用的。
+
+
+### 宿主名字空间 {#host-namespaces}
+
+**HostPID** - 控制 Pod 中容器是否可以共享宿主上的进程 ID 空间。
+注意,如果与 `ptrace` 相结合,这种授权可能被利用,导致向容器外的特权逃逸
+(默认情况下 `ptrace` 是被禁止的)。
+
+**HostIPC** - 控制 Pod 容器是否可共享宿主上的 IPC 名字空间。
+
+**HostNetwork** - 控制是否 Pod 可以使用节点的网络名字空间。
+此类授权将允许 Pod 访问本地回路(loopback)设备、在本地主机(localhost)
+上监听的服务、还可能用来监听同一节点上其他 Pod 的网络活动。
+
+**HostPorts** -提供可以在宿主网络名字空间中可使用的端口范围列表。
+该属性定义为一组 `HostPortRange` 对象的列表,每个对象中包含
+`min`(含)与 `max`(含)值的设置。
+默认不允许访问宿主端口。
+
+
+### 卷和文件系统 {#volumes-and-file-systems}
+
+**Volumes** - 提供一组被允许的卷类型列表。可被允许的值对应于创建卷时可以设置的卷来源。
+卷类型的完整列表可参见[卷类型](/zh/docs/concepts/storage/volumes/#types-of-volumes)。
+此外,`*` 可以用来允许所有卷类型。
+
+对于新的 Pod 安全策略设置而言,建议设置的卷类型的**最小列表**包含:
+
+- `configMap`
+- `downwardAPI`
+- `emptyDir`
+- `persistentVolumeClaim`
+- `secret`
+- `projected`
+
+{{< warning >}}
+
+PodSecurityPolicy 并不限制可以被 `PersistentVolumeClaim` 所引用的
+`PersistentVolume` 对象的类型。
+此外 `hostPath` 类型的 `PersistentVolume` 不支持只读访问模式。
+应该仅赋予受信用户创建 `PersistentVolume` 对象的访问权限。
+{{< /warning >}}
+
+
+**FSGroup** - 控制应用到某些卷上的附加用户组。
+
+- *MustRunAs* - 要求至少指定一个 `range`。
+ 使用范围中的最小值作为默认值。所有 range 值都会被用来执行验证。
+- *MayRunAs* - 要求至少指定一个 `range`。
+ 允许不设置 `FSGroups`,且无默认值。
+ 如果 `FSGroup` 被设置,则所有 range 值都会被用来执行验证检查。
+- *RunAsAny* - 不提供默认值。允许设置任意 `fsGroup` ID 值。
+
+
+**AllowedHostPaths** - 设置一组宿主文件目录,这些目录项可以在 `hostPath` 卷中使用。
+列表为空意味着对所使用的宿主目录没有限制。
+此选项定义包含一个对象列表,表中对象包含 `pathPrefix` 字段,用来表示允许
+`hostPath` 卷挂载以所指定前缀开头的路径。
+对象中还包含一个 `readOnly` 字段,用来表示对应的卷必须以只读方式挂载。
+例如:
+
+
+```yaml
+allowedHostPaths:
+ # 下面的设置允许 "/foo"、"/foo/"、"/foo/bar" 等路径,但禁止
+ # "/fool"、"/etc/foo" 这些路径。
+ # "/foo/../" 总会被当作非法路径。
+ - pathPrefix: "/foo"
+ readOnly: true # 仅允许只读模式挂载
+```
+
+{{< warning >}}
+
+容器如果对宿主文件系统拥有不受限制的访问权限,就可以有很多种方式提升自己的特权,
+包括读取其他容器中的数据、滥用系统服务(如 `kubelet`)的凭据信息等。
+
+
+由可写入的目录所构造的 `hostPath` 卷能够允许容器写入数据到宿主文件系统,
+并且在写入时避开 `pathPrefix` 所设置的目录限制。
+`readOnly: true` 这一设置在 Kubernetes 1.11 版本之后可用。
+必须针对 `allowedHostPaths` 中的 *所有* 条目设置此属性才能有效地限制容器只能访问
+`pathPrefix` 所指定的目录。
+{{< /warning >}}
+
+
+**ReadOnlyRootFilesystem** - 要求容器必须以只读方式挂载根文件系统来运行
+(即不允许存在可写入层)。
+
+
+### FlexVolume 驱动 {#flexvolume-drivers}
+
+此配置指定一个可以被 FlexVolume 卷使用的驱动程序的列表。
+空的列表或者 nil 值意味着对驱动没有任何限制。
+请确保[`volumes`](#volumes-and-file-systems) 字段包含了 `flexVolume` 卷类型,
+否则所有 FlexVolume 驱动都被禁止。
+
+
+
+```yaml
+apiVersion: policy/v1beta1
+kind: PodSecurityPolicy
+metadata:
+ name: allow-flex-volumes
+spec:
+ # spec 的其他字段
+ volumes:
+ - flexVolume
+ allowedFlexVolumes:
+ - driver: example/lvm
+ - driver: example/cifs
+```
+
+
+### 用户和组 {#users-and-groups}
+
+**RunAsUser** - 控制使用哪个用户 ID 来运行容器。
+
+- *MustRunAs* - 必须至少设置一个 `range`。使用该范围内的第一个值作为默认值。
+ 所有范围值都会被验证检查。
+
+- *MustRunAsNonRoot* - 要求提交的 Pod 具有非零 `runAsUser` 值,或在镜像中
+ (使用 UID 数值)定义了 `USER` 环境变量。
+ 如果 Pod 既没有设置 `runAsNonRoot`,也没有设置 `runAsUser`,则该 Pod
+ 会被修改以设置 `runAsNonRoot=true`,从而要求容器通过 `USER` 指令给出非零的数值形式的用户 ID。
+ 此配置没有默认值。采用此配置时,强烈建议设置 `allowPrivilegeEscalation=false`。
+- *RunAsAny* - 没有提供默认值。允许指定任何 `runAsUser` 配置。
+
+
+**RunAsGroup** - 控制运行容器时使用的主用户组 ID。
+
+- *MustRunAs* - 要求至少指定一个 `range` 值。第一个范围中的最小值作为默认值。
+ 所有范围值都被用来执行验证检查。
+- *MayRunAs* - 不要求设置 `RunAsGroup`。
+ 不过,如果指定了 `RunAsGroup` 被设置,所设置值必须处于所定义的范围内。
+- *RunAsAny* - 未指定默认值。允许 `runAsGroup` 设置任何值。
+
+
+**SupplementalGroups** - 控制容器可以添加的组 ID。
+
+- *MustRunAs* - 要求至少指定一个 `range` 值。第一个范围中的最小值用作默认值。
+ 所有范围值都被用来执行验证检查。
+- *MayRunAs* - 要求至少指定一个 `range` 值。
+ 允许不指定 `supplementalGroups` 且不设置默认值。
+ 如果 `supplementalGroups` 被设置,则所有 range 值都被用来执行验证检查。
+- *RunAsAny* - 未指定默认值。允许为 `supplementalGroups` 设置任何值。
+
+
+### 特权提升 {#privilege-escalation}
+
+这一组选项控制容器的`allowPrivilegeEscalation` 属性。该属性直接决定是否为容器进程设置
+[`no_new_privs`](https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt)
+参数。此参数会禁止 `setuid` 属性的可执行文件更改有效用户 ID(EUID),
+并且禁止启用额外权能的文件。例如,`no_new_privs` 会禁止使用 `ping` 工具。
+如果想有效地实施 `MustRunAsNonRoot` 控制,需要配置这一选项。
+
+
+**AllowPrivilegeEscalation** - 决定是否用户可以将容器的安全上下文设置为
+`allowPrivilegeEscalation=true`。默认设置下,这样做是允许的,
+目的是避免造成现有的 `setuid` 应用无法运行。将此选项设置为 `false`
+可以确保容器的所有子进程都无法获得比父进程更多的特权。
+
+
+**DefaultAllowPrivilegeEscalation** - 为 `allowPrivilegeEscalation` 选项设置默认值。
+不设置此选项时的默认行为是允许特权提升,以便运行 setuid 程序。
+如果不希望运行 setuid 程序,可以使用此字段将选项的默认值设置为禁止,
+同时仍然允许 Pod 显式地请求 `allowPrivilegeEscalation`。
+
+
+### 权能字 {#capabilities}
+
+Linux 权能字(Capabilities)将传统上与超级用户相关联的特权作了细粒度的分解。
+其中某些权能字可以用来提升特权,打破容器边界,可以通过 PodSecurityPolicy 来限制。
+关于 Linux 权能字的更多细节,可参阅
+[capabilities(7)](http://man7.org/linux/man-pages/man7/capabilities.7.html)。
+
+下列字段都可以配置为权能字的列表。表中的每一项都是 `ALL_CAPS` 中的一个权能字名称,
+只是需要去掉 `CAP_` 前缀。
+
+
+**AllowedCapabilities** - 给出可以被添加到容器的权能字列表。
+默认的权能字集合是被隐式允许的那些。空集合意味着只能使用默认权能字集合,
+不允许添加额外的权能字。`*` 可以用来设置允许所有权能字。
+
+
+**RequiredDropCapabilities** - 必须从容器中去除的权能字。
+所给的权能字会从默认权能字集合中去除,并且一定不可以添加。
+`RequiredDropCapabilities` 中列举的权能字不能出现在
+`AllowedCapabilities` 或 `DefaultAddCapabilities` 所给的列表中。
+
+
+**DefaultAddCapabilities** - 默认添加到容器的权能字集合。
+这一集合是作为容器运行时所设值的补充。
+关于使用 Docker 容器运行引擎时默认的权能字列表,
+可参阅你的容器运行时的文档来了解使用 Linux 权能字的信息。
+
+
+### SELinux
+
+- *MustRunAs* - 要求必须配置 `seLinuxOptions`。默认使用 `seLinuxOptions`。
+ 针对 `seLinuxOptions` 所给值执行验证检查。
+- *RunAsAny* - 没有提供默认值。允许任意指定的 `seLinuxOptions` 选项。
+
+
+### AllowedProcMountTypes
+
+`allowedProcMountTypes` 是一组可以允许的 proc 挂载类型列表。
+空表或者 nil 值表示只能使用 `DefaultProcMountType`。
+
+`DefaultProcMount` 使用容器运行时的默认值设置来决定 `/proc` 的只读挂载模式和路径屏蔽。
+大多数容器运行时都会屏蔽 `/proc` 下面的某些路径以避免特殊设备或信息被不小心暴露给容器。
+这一配置使所有 `Default` 字符串值来表示。
+
+此外唯一的ProcMountType 是 `UnmaskedProcMount`,意味着即将绕过容器运行时的路径屏蔽行为,
+确保新创建的 `/proc` 不会被容器修改。此配置用字符串 `Unmasked` 来表示。
+
+
+### AppArmor
+
+通过 PodSecurityPolicy 上的注解来控制。
+详情请参阅
+[AppArmor 文档](/zh/docs/tutorials/policy/apparmor/#podsecuritypolicy-annotations)。
+
+
+
+### Seccomp
+
+从 Kubernetes v1.19 开始,你可以使用 Pod 或容器的 `securityContext` 中的 `seccompProfile`
+字段来[控制 seccomp 配置的使用](/zh/docs/tutorials/security/seccomp/)。
+在更早的版本中,seccomp 是通过为 Pod 添加注解来控制的。
+相同的 PodSecurityPolicy 可以用于不同版本,进而控制如何应用对应的字段或注解。
+
+**seccomp.security.alpha.kubernetes.io/defaultProfileName** -
+注解用来指定为容器配置默认的 seccomp 模版。可选值为:
+
+
+- `unconfined` - 如果没有指定其他替代方案,Seccomp 不会被应用到容器进程上
+ (Kubernets 中的默认设置)。
+- `runtime/default` - 使用默认的容器运行时模版。
+- `docker/default` - 使用 Docker 的默认 seccomp 模版。自 1.11 版本废弃。
+ 应改为使用 `runtime/default`。
+- `localhost/<路径名>` - 指定节点上路径 `/<路径名>` 下的一个文件作为其模版。
+ 其中 `` 是通过 `kubelet` 的标志 `--seccomp-profile-root` 来指定的。
+ 如果未定义 `--seccomp-profile-root` 标志,则使用默认的路径 `/seccomp`,
+ 其中 `` 是通过 `--root-dir` 标志来设置的。
+
+ {{< note >}}
+
+ 从 Kubernetes v1.19 开始,`--seccomp-profile-root` 标志已被启用。
+ 用户应尝试使用默认路径。
+ {{< /note >}}
+
+
+**seccomp.security.alpha.kubernetes.io/allowedProfileNames** - 指定可以为
+Pod seccomp 注解配置的值的注解。取值为一个可用值的列表。
+表中每项可以是上述各值之一,还可以是 `*`,用来表示允许所有的模版。
+如果没有设置此注解,意味着默认的 seccomp 模版是不可更改的。
+
+
+### Sysctl
+
+默认情况下,所有的安全的 sysctl 都是被允许的。
+
+
+- `forbiddenSysctls` - 用来排除某些特定的 sysctl。
+ 你可以在此列表中禁止一些安全的或者不安全的 sysctl。
+ 此选项设置为 `*` 意味着禁止设置所有 sysctl。
+- `allowedUnsafeSysctls` - 用来启用那些被默认列表所禁用的 sysctl,
+ 前提是所启用的 sysctl 没有被列在 `forbiddenSysctls` 中。
+
+
+参阅 [Sysctl 文档](/zh/docs/tasks/administer-cluster/sysctl-cluster/#podsecuritypolicy)。
+
+## {{% heading "whatsnext" %}}
+
+
+- 参阅 [PodSecurityPolicy Deprecation: Past, Present, and
+ Future](/blog/2021/04/06/podsecuritypolicy-deprecation-past-present-and-future/),
+ 了解 Pod 安全策略的未来。
+
+- 参阅[Pod 安全标准](/zh/docs/concepts/security/pod-security-standards/),
+ 了解策略建议。
+- 阅读 [Pod 安全策略参考](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritypolicy-v1beta1-policy),
+ 了解 API 细节。
+
diff --git a/content/zh/docs/concepts/security/pod-security-standards.md b/content/zh-cn/docs/concepts/security/pod-security-standards.md
similarity index 95%
rename from content/zh/docs/concepts/security/pod-security-standards.md
rename to content/zh-cn/docs/concepts/security/pod-security-standards.md
index e2e6d7890f..4bd324ceb0 100644
--- a/content/zh/docs/concepts/security/pod-security-standards.md
+++ b/content/zh-cn/docs/concepts/security/pod-security-standards.md
@@ -1,5 +1,7 @@
---
title: Pod 安全性标准
+description: >
+ 详细了解 Pod 安全性标准(Pod Security Standards)中所定义的不同策略级别。
content_type: concept
weight: 10
---
@@ -7,6 +9,8 @@ weight: 10
reviewers:
- tallclair
title: Pod Security Standards
+description: >
+ A detailed look at the different policy levels defined in the Pod Security Standards.
content_type: concept
weight: 10
-->
@@ -49,18 +53,17 @@ Pod 安全性标准定义了三种不同的 _策略(Policy)_,以广泛覆
**The _Privileged_ policy is purposely-open, and entirely unrestricted.** This type of policy is
typically aimed at system- and infrastructure-level workloads managed by privileged, trusted users.
-The privileged policy is defined by an absence of restrictions. For allow-by-default enforcement
-mechanisms (such as gatekeeper), the privileged profile may be an absence of applied constraints
-rather than an instantiated policy. In contrast, for a deny-by-default mechanism (such as Pod
-Security Policy) the privileged policy should enable all controls (disable all restrictions).
+The Privileged policy is defined by an absence of restrictions. Allow-by-default
+mechanisms (such as gatekeeper) may be Privileged by default. In contrast, for a deny-by-default mechanism (such as Pod
+Security Policy) the Privileged policy should disable all restrictions.
-->
**_Privileged_ 策略是有目的地开放且完全无限制的策略。**
此类策略通常针对由特权较高、受信任的用户所管理的系统级或基础设施级负载。
-Privileged 策略定义中限制较少。对于默认允许(Allow-by-default)实施机制(例如 gatekeeper),
-Privileged 框架可能意味着不应用任何约束而不是实施某策略实例。
-与此不同,对于默认拒绝(Deny-by-default)实施机制(如 Pod 安全策略)而言,
-Privileged 策略应该默认允许所有控制(即,禁止所有限制)。
+Privileged 策略定义中限制较少。默认允许的(Allow-by-default)实施机制(例如 gatekeeper)
+可以缺省设置为 Privileged。
+与此不同,对于默认拒绝(Deny-by-default)的实施机制(如 Pod 安全策略)而言,
+Privileged 策略应该禁止所有限制。
### Baseline
@@ -842,6 +845,22 @@ of individual policies are not defined here.
- {{< example file="policy/baseline-psp.yaml" >}}Baseline{{< /example >}}
- {{< example file="policy/restricted-psp.yaml" >}}Restricted{{< /example >}}
+
+### 替代方案 {#alternatives}
+
+{{% thirdparty-content %}}
+
+
+在 Kubernetes 生态系统中还在开发一些其他的替代方案,例如:
+
+- [Kubewarden](https://github.com/kubewarden)
+- [Kyverno](https://kyverno.io/policies/pod-security/)
+- [OPA Gatekeeper](https://github.com/open-policy-agent/gatekeeper)
+
安全策略则是控制面用来对安全上下文以及安全性上下文之外的参数实施某种设置的机制。
在 2020 年 7 月,
[Pod 安全性策略](/zh/docs/concepts/security/pod-security-policy/)已被废弃,
取而代之的是内置的 [Pod 安全性准入控制器](/zh/docs/concepts/security/pod-security-admission/)。
-Kubernetes 生态系统中还在开发一些其他的替代方案,例如
-- [OPA Gatekeeper](https://github.com/open-policy-agent/gatekeeper)。
-- [Kubewarden](https://github.com/kubewarden)。
-- [Kyverno](https://kyverno.io/policies/pod-security/)。
-
-
如果你为一个 Windows Pod 应用了 Restricted 策略,**可能会** 对该 Pod 的运行时产生影响。
Restricted 策略需要强制执行 Linux 特有的限制(如 seccomp Profile,并且禁止特权提升)。
如果 kubelet 和/或其容器运行时忽略了 Linux 特有的值,那么应该不影响 Windows Pod 正常工作。
然而,对于使用 Windows 容器的 Pod 来说,缺乏强制执行意味着相比于 Restricted 策略,没有任何额外的限制。
+
你应该只在 Privileged 策略下使用 HostProcess 标志来创建 HostProcess Pod。
在 Baseline 和 Restricted 策略下,创建 Windows HostProcess Pod 是被禁止的,
因此任何 HostProcess Pod 都应该被认为是有特权的。
@@ -945,7 +952,14 @@ Restricted 策略需要强制执行 Linux 特有的限制(如 seccomp Profile
There is not currently an API standard that controls whether a Pod is considered sandboxed or
not. Sandbox Pods may be identified by the use of a sandboxed runtime (such as gVisor or Kata
Containers), but there is no standard definition of what a sandboxed runtime is.
+-->
+### 沙箱(Sandboxed) Pod 怎么处理?
+现在还没有 API 标准来控制 Pod 是否被视作沙箱化 Pod。
+沙箱 Pod 可以通过其是否使用沙箱化运行时(如 gVisor 或 Kata Container)来辨别,
+不过目前还没有关于什么是沙箱化运行时的标准定义。
+
+
-### 沙箱(Sandboxed) Pod 怎么处理?
-
-现在还没有 API 标准来控制 Pod 是否被视作沙箱化 Pod。
-沙箱 Pod 可以通过其是否使用沙箱化运行时(如 gVisor 或 Kata Container)来辨别,不过
-目前还没有关于什么是沙箱化运行时的标准定义。
-
沙箱化负载所需要的保护可能彼此各不相同。例如,当负载与下层内核直接隔离开来时,
限制特权化操作的许可就不那么重要。这使得那些需要更多许可权限的负载仍能被有效隔离。
此外,沙箱化负载的保护高度依赖于沙箱化的实现方法。
因此,现在还没有针对所有沙箱化负载的建议策略。
+
diff --git a/content/zh-cn/docs/concepts/security/rbac-good-practices.md b/content/zh-cn/docs/concepts/security/rbac-good-practices.md
new file mode 100644
index 0000000000..07f54b9b32
--- /dev/null
+++ b/content/zh-cn/docs/concepts/security/rbac-good-practices.md
@@ -0,0 +1,355 @@
+---
+title: 基于角色的访问控制良好实践
+description: >
+ 为集群操作人员提供的良好的 RBAC 设计原则和实践。
+content_type: concept
+---
+
+
+
+
+
+
+
+Kubernetes {{< glossary_tooltip text="RBAC" term_id="rbac" >}}
+是一项重要的安全控制措施,用于保证集群用户和工作负载只能访问履行自身角色所需的资源。
+在为集群用户设计权限时,请务必确保集群管理员知道可能发生特权提级的地方,
+降低因过多权限而导致安全事件的风险。
+
+此文档的良好实践应该与通用
+[RBAC 文档](/zh/docs/reference/access-authn-authz/rbac/#restrictions-on-role-creation-or-update)一起阅读。
+
+
+
+
+## 通用的良好实践 {#general-good-practice}
+
+### 最小特权 {#least-privilege}
+
+
+理想情况下,分配给用户和服务帐户的 RBAC 权限应该是最小的。
+仅应使用操作明确需要的权限,虽然每个集群会有所不同,但可以应用的一些常规规则:
+
+
+- 尽可能在命名空间级别分配权限。授予用户在特定命名空间中的权限时使用 RoleBinding
+ 而不是 ClusterRoleBinding。
+- 尽可能避免通过通配符设置权限,尤其是对所有资源的权限。
+ 由于 Kubernetes 是一个可扩展的系统,因此通过通配符来授予访问权限不仅会授予集群中当前的所有对象类型,
+ 还包含所有未来被创建的所有对象类型。
+- 管理员不应使用 `cluster-admin` 账号,除非特别需要。为低特权帐户提供
+ [伪装权限](/zh/docs/reference/access-authn-authz/authentication/#user-impersonation)
+ 可以避免意外修改集群资源。
+- 避免将用户添加到 `system:masters` 组。任何属于此组成员的用户都会绕过所有 RBAC 权限检查,
+ 始终具有不受限制的超级用户访问权限,并且不能通过删除 `RoleBinding` 或 `ClusterRoleBinding`
+ 来取消其权限。顺便说一句,如果集群是使用 Webhook 鉴权,此组的成员身份也会绕过该
+ Webhook(来自属于该组成员的用户的请求永远不会发送到 Webhook)。
+
+
+### 最大限度地减少特权令牌的分发 {#minimize-distribution-of-privileged-tokens}
+
+
+理想情况下,不应为 Pod 分配具有强大权限(例如,在[特权提级的风险](#privilege-escalation-risks)中列出的任一权限)的服务帐户。
+如果工作负载需要比较大的权限,请考虑以下做法:
+- 限制运行此类 Pod 的节点数量。确保你运行的任何 DaemonSet 都是必需的,
+ 并且以最小权限运行,以限制容器逃逸的影响范围。
+- 避免将此类 Pod 与不可信任或公开的 Pod 在一起运行。
+ 考虑使用[污点和容忍度](/zh/docs/concepts/scheduling-eviction/taint-and-toleration/)、
+ [节点亲和性](/zh/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity)或
+ [Pod 反亲和性](/zh/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity)确保
+ Pod 不会与不可信或不太受信任的 Pod 一起运行。
+ 特别注意可信度不高的 Pod 不符合 **Restricted** Pod 安全标准的情况。
+
+### 加固 {#hardening}
+
+Kubernetes 默认提供访问权限并非是每个集群都需要的。
+审查默认提供的 RBAC 权限为安全加固提供了机会。
+一般来说,不应该更改 `system:` 帐户的某些权限,有一些方式来强化现有集群的权限:
+
+
+- 审查 `system:unauthenticated` 组的绑定,并在可能的情况下将其删除,
+ 因为这会给所有能够访问 API 服务器的人以网络级别的权限。
+- 通过设置 `automountServiceAccountToken: false` 来避免服务账号令牌的默认自动挂载,
+ 有关更多详细信息,请参阅[使用默认服务账号令牌](/zh/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server)。
+ 此参数可覆盖 Pod 服务账号设置,而需要服务账号令牌的工作负载仍可以挂载。
+
+
+### 定期检查 {#periodic-review}
+定期检查 Kubernetes RBAC 设置是否有冗余条目和提权可能性是至关重要的。
+如果攻击者能够创建与已删除用户同名的用户账号,
+他们可以自动继承被删除用户的所有权限,尤其是分配给该用户的权限。
+
+
+## Kubernetes RBAC - 权限提权的风险 {#privilege-escalation-risks}
+
+在 Kubernetes RBAC 中有许多特权,如果被授予,
+用户或服务帐户可以提升其在集群中的权限并可能影响集群外的系统。
+
+本节旨在提醒集群操作员需要注意的不同领域,
+以确保他们不会无意中授予超出预期的集群访问权限。
+
+
+### 列举 Secret {#listing-secrets}
+
+大家都很清楚,若允许对 Secrets 执行 `get` 访问,用户就获得了访问 Secret 内容的能力。
+同样需要注意的是:`list` 和 `watch` 访问也会授权用户获取 Secret 的内容。
+例如,当返回 List 响应时(例如,通过
+`kubectl get secrets -A -o yaml`),响应包含所有 Secret 的内容。
+
+
+### 工作负载的创建 {#workload-creation}
+
+能够创建工作负载的用户(Pod 或管理 Pod 的[工作负载资源](/zh/docs/concepts/workloads/controllers/))
+能够访问下层的节点,除非基于 Kubernetes 的
+[Pod 安全标准](/zh/docs/concepts/security/pod-security-standards/)做限制。
+
+
+可以运行特权 Pod 的用户可以利用该访问权限获得节点访问权限,
+并可能进一步提升他们的特权。如果你不完全信任某用户或其他主体,
+不相信他们能够创建比较安全且相互隔离的 Pod,你应该强制实施 **Baseline**
+或 **Restricted** Pod 安全标准。
+你可以使用 [Pod 安全性准入](/zh/docs/concepts/security/pod-security-admission/)或其他(第三方)机制来强制实施这些限制。
+
+
+你还可以使用已弃用的 [PodSecurityPolicy](/zh/docs/concepts/policy/pod-security-policy/)
+机制以限制用户创建特权 Pod 的能力 (特别注意:PodSecurityPolicy 已计划在版本 1.25 中删除)。
+
+
+在命名空间中创建工作负载还会授予对该命名空间中 Secret 的间接访问权限。
+在 kube-system 或类似特权的命名空间中创建 Pod
+可以授予用户不需要通过 RBAC 即可获取 Secret 访问权限。
+
+
+### 持久卷的创建 {#persistent-volume-creation}
+
+如 [PodSecurityPolicy](/zh/docs/concepts/policy/pod-security-policy/#volumes-and-file-systems)
+文档中所述,创建 PersistentVolumes 的权限可以提权访问底层主机。
+如果需要访问 PersistentVolume,受信任的管理员应该创建 `PersistentVolume`,
+受约束的用户应该使用 `PersistentVolumeClaim` 访问该存储。
+
+
+### 访问 Node 的 `proxy` 子资源 {#access-to-proxy-subresource-of-nodes}
+
+有权访问 Node 对象的 proxy 子资源的用户有权访问 Kubelet API,
+这允许在他们有权访问的节点上的所有 Pod 上执行命令。
+此访问绕过审计日志记录和准入控制,因此在授予对此资源的权限前应小心。
+
+
+### esclate 动词 {#escalate-verb}
+通常,RBAC 系统会阻止用户创建比他所拥有的更多权限的 `ClusterRole`。
+而 `escalate` 动词是个例外。如
+[RBAC 文档](/zh/docs/reference/access-authn-authz/rbac/#restrictions-on-role-creation-or-update)
+中所述,拥有此权限的用户可以有效地提升他们的权限。
+
+
+### bind 动词 {#bind-verb}
+
+与 `escalate` 动作类似,授予此权限的用户可以绕过 Kubernetes
+对权限提升的内置保护,用户可以创建并绑定尚不具有的权限的角色。
+
+
+### impersonate 动词 {#impersonate-verb}
+
+此动词允许用户伪装并获得集群中其他用户的权限。
+授予它时应小心,以确保通过其中一个伪装账号不会获得过多的权限。
+
+
+### CSR 和证书颁发 {#csrs-and-certificate-issuing}
+
+CSR API 允许用户拥有 `create` CSR 的权限和 `update`
+`certificatesigningrequests/approval` 的权限,
+其中签名者是 `kubernetes.io/kube-apiserver-client`,
+通过此签名创建的客户端证书允许用户向集群进行身份验证。
+这些客户端证书可以包含任意的名称,包括 Kubernetes 系统组件的副本。
+这将有利于特权提级。
+
+
+### 令牌请求 {#token-request}
+
+拥有 `serviceaccounts/token` 的 `create` 权限的用户可以创建
+TokenRequest 来发布现有服务帐户的令牌。
+
+
+### 控制准入 Webhook {#control-admission-webhooks}
+
+可以控制 `validatingwebhookconfigurations` 或 `mutatingwebhookconfigurations`
+的用户可以控制能读取任何允许进入集群的对象的 webhook,
+并且在有变更 webhook 的情况下,还可以变更准入的对象。
+
+
+## Kubernetes RBAC - 拒绝服务攻击的风险 {#denial-of-service-risks}
+
+### 对象创建拒绝服务 {#object-creation-dos}
+有权在集群中创建对象的用户根据创建对象的大小和数量可能会创建足够大的对象,
+产生拒绝服务状况,如 [Kubernetes 使用的 etcd 容易受到 OOM 攻击](https://github.com/kubernetes/kubernetes/issues/107325)中的讨论。
+允许太不受信任或者不受信任的用户对系统进行有限的访问在多租户集群中是特别重要的。
+
+缓解此问题的一种选择是使用[资源配额](/zh/docs/concepts/policy/resource-quotas/#object-count-quota)以限制可以创建的对象数量。
\ No newline at end of file
diff --git a/content/zh-cn/docs/concepts/security/windows-security.md b/content/zh-cn/docs/concepts/security/windows-security.md
new file mode 100644
index 0000000000..9527297be0
--- /dev/null
+++ b/content/zh-cn/docs/concepts/security/windows-security.md
@@ -0,0 +1,109 @@
+---
+title: Windows 节点的安全性
+content_type: concept
+weight: 75
+---
+
+
+
+
+
+本篇介绍特定于 Windows 操作系统的安全注意事项和最佳实践。
+
+
+
+
+## 保护节点上的 Secret 数据
+
+
+在 Windows 上,来自 Secret 的数据以明文形式写入节点的本地存储
+(与在 Linux 上使用 tmpfs / 内存中文件系统不同)。
+作为集群操作员,你应该采取以下两项额外措施:
+
+
+1. 使用文件 ACL 来保护 Secret 的文件位置。
+2. 使用 [BitLocker](https://docs.microsoft.com/windows/security/information-protection/bitlocker/bitlocker-how-to-deploy-on-windows-server)
+ 进行卷级加密。
+
+
+## 容器用户
+
+
+可以为 Windows Pod 或容器指定 [RunAsUsername](/zh/docs/tasks/configure-pod-container/configure-runasusername)
+以作为特定用户执行容器进程。这大致相当于 [RunAsUser](/zh/docs/concepts/policy/pod-security-policy/#users-and-groups)。
+
+
+Windows 容器提供两个默认用户帐户,ContainerUser 和 ContainerAdministrator。
+在微软的 Windows 容器安全文档
+[何时使用 ContainerAdmin 和 ContainerUser 用户帐户](https://docs.microsoft.com/zh-cn/virtualization/windowscontainers/manage-containers/container-security#when-to-use-containeradmin-and-containeruser-user-accounts)
+中介绍了这两个用户帐户之间的区别。
+
+
+在容器构建过程中,可以将本地用户添加到容器镜像中。
+
+{{< note >}}
+
+* 基于 [Nano Server](https://hub.docker.com/_/microsoft-windows-nanoserver) 的镜像默认以 `ContainerUser` 运行
+* 基于 [Server Core](https://hub.docker.com/_/microsoft-windows-servercore) 的镜像默认以 `ContainerAdministrator` 运行
+{{< /note >}}
+
+
+Windows 容器还可以通过使用[组管理的服务账号](/zh/docs/tasks/configure-pod-container/configure-gmsa/)作为
+Active Directory 身份运行。
+
+
+## Pod 级安全隔离
+
+
+Windows 节点不支持特定于 Linux 的 Pod 安全上下文机制(例如 SELinux、AppArmor、Seccomp 或自定义 POSIX 权能字)。
+
+
+Windows 上[不支持](/zh-cn/docs/concepts/windows/intro/#compatibility-v1-pod-spec-containers-securitycontext)特权容器。
+然而,可以在 Windows 上使用 [HostProcess 容器](/zh-cn/docs/tasks/configure-pod-container/create-hostprocess-pod)来执行
+Linux 上特权容器执行的许多任务。
diff --git a/content/zh/docs/concepts/services-networking/_index.md b/content/zh-cn/docs/concepts/services-networking/_index.md
similarity index 72%
rename from content/zh/docs/concepts/services-networking/_index.md
rename to content/zh-cn/docs/concepts/services-networking/_index.md
index 01d327577f..0f92a136d2 100644
--- a/content/zh/docs/concepts/services-networking/_index.md
+++ b/content/zh-cn/docs/concepts/services-networking/_index.md
@@ -7,43 +7,46 @@ description: Kubernetes 网络背后的概念和资源。
## Kubernetes 网络模型 {#the-kubernetes-network-model}
-每一个 [`Pod`](/zh/docs/concepts/workloads/pods/) 都有它自己的IP地址,
-这就意味着你不需要显式地在 `Pod` 之间创建链接, 你几乎不需要处理容器端口到主机端口之间的映射。
+集群中每一个 [`Pod`](/zh-cn/docs/concepts/workloads/pods/) 都会获得自己的、
+独一无二的 IP 地址,
+这就意味着你不需要显式地在 `Pod` 之间创建链接,你几乎不需要处理容器端口到主机端口之间的映射。
这将形成一个干净的、向后兼容的模型;在这个模型里,从端口分配、命名、服务发现、
-[负载均衡](/zh/docs/concepts/services-networking/ingress/#load-balancing)、应用配置和迁移的角度来看,
-`Pod` 可以被视作虚拟机或者物理主机。
+[负载均衡](/zh/docs/concepts/services-networking/ingress/#load-balancing)、
+应用配置和迁移的角度来看,`Pod` 可以被视作虚拟机或者物理主机。
+
Kubernetes 强制要求所有网络设施都满足以下基本要求(从而排除了有意隔离网络的策略):
-* [节点](/zh/docs/concepts/architecture/nodes/)上的 Pod 可以不通过 NAT 和其他任何节点上的 Pod 通信
+
+* Pod 能够与所有其他[节点](/zh-cn/docs/concepts/architecture/nodes/)上的 Pod 通信,
+ 且不需要网络地址转译(NAT)
* 节点上的代理(比如:系统守护进程、kubelet)可以和节点上的所有 Pod 通信
-备注:对于支持在主机网络中运行 `Pod` 的平台(比如:Linux):
-
-* 运行在节点主机网络里的 Pod 可以不通过 NAT 和所有节点上的 Pod 通信
+
+说明:对于支持在主机网络中运行 `Pod` 的平台(比如:Linux),
+当 Pod 挂接到节点的宿主网络上时,它们仍可以不通过 NAT 和所有节点上的 Pod 通信。
Kubernetes 网络解决四方面的问题:
-- 一个 Pod 中的容器之间[通过本地回路(loopback)通信](/zh/docs/concepts/services-networking/dns-pod-service/)。
+
+- 一个 Pod 中的容器之间[通过本地回路(loopback)通信](/zh-cn/docs/concepts/services-networking/dns-pod-service/)。
- 集群网络在不同 pod 之间提供通信。
-- [Service 资源](/zh/docs/concepts/services-networking/service/)允许你
- [对外暴露 Pods 中运行的应用程序](/zh/docs/concepts/services-networking/connect-applications-service/),
+- [Service 资源](/zh-cn/docs/concepts/services-networking/service/)允许你
+ [向外暴露 Pods 中运行的应用](/zh-cn/docs/concepts/services-networking/connect-applications-service/),
以支持来自于集群外部的访问。
-- 可以使用 Services 来[发布仅供集群内部使用的服务](/zh/docs/concepts/services-networking/service-traffic-policy/)。
+- 可以使用 Services 来[发布仅供集群内部使用的服务](/zh-cn/docs/concepts/services-networking/service-traffic-policy/)。
diff --git a/content/zh/docs/concepts/services-networking/connect-applications-service.md b/content/zh-cn/docs/concepts/services-networking/connect-applications-service.md
similarity index 100%
rename from content/zh/docs/concepts/services-networking/connect-applications-service.md
rename to content/zh-cn/docs/concepts/services-networking/connect-applications-service.md
diff --git a/content/zh/docs/concepts/services-networking/dns-pod-service.md b/content/zh-cn/docs/concepts/services-networking/dns-pod-service.md
similarity index 70%
rename from content/zh/docs/concepts/services-networking/dns-pod-service.md
rename to content/zh-cn/docs/concepts/services-networking/dns-pod-service.md
index 2b9dfeb36f..2bee2ba425 100644
--- a/content/zh/docs/concepts/services-networking/dns-pod-service.md
+++ b/content/zh-cn/docs/concepts/services-networking/dns-pod-service.md
@@ -15,11 +15,11 @@ weight: 20
-Kubernetes 为服务和 Pods 创建 DNS 记录。
-你可以使用一致的 DNS 名称而非 IP 地址来访问服务。
+Kubernetes 为 Service 和 Pod 创建 DNS 记录。
+你可以使用一致的 DNS 名称而非 IP 地址访问 Service。
@@ -30,40 +30,39 @@ Kubernetes DNS schedules a DNS Pod and Service on the cluster, and configures
the kubelets to tell individual containers to use the DNS Service's IP to
resolve DNS names.
-->
-## 介绍
+## 介绍 {#introduction}
-Kubernetes DNS 在集群上调度 DNS Pod 和服务,并配置 kubelet 以告知各个容器
-使用 DNS 服务的 IP 来解析 DNS 名称。
+Kubernetes DNS 除了在集群上调度 DNS Pod 和 Service,
+还配置 kubelet 以告知各个容器使用 DNS Service 的 IP 来解析 DNS 名称。
集群中定义的每个 Service (包括 DNS 服务器自身)都被赋予一个 DNS 名称。
-默认情况下,客户端 Pod 的 DNS 搜索列表会包含 Pod 自身的名字空间和集群
-的默认域。
+默认情况下,客户端 Pod 的 DNS 搜索列表会包含 Pod 自身的名字空间和集群的默认域。
-### Service 的名字空间
+### Service 的名字空间 {#namespaces-of-services}
DNS 查询可能因为执行查询的 Pod 所在的名字空间而返回不同的结果。
不指定名字空间的 DNS 查询会被限制在 Pod 所在的名字空间内。
-要访问其他名字空间中的服务,需要在 DNS 查询中给出名字空间。
+要访问其他名字空间中的 Service,需要在 DNS 查询中指定名字空间。
例如,假定名字空间 `test` 中存在一个 Pod,`prod` 名字空间中存在一个服务
`data`。
@@ -73,11 +72,11 @@ Pod 查询 `data` 时没有返回结果,因为使用的是 Pod 的名字空间
Pod 查询 `data.prod` 时则会返回预期的结果,因为查询中指定了名字空间。
DNS 查询可以使用 Pod 中的 `/etc/resolv.conf` 展开。kubelet 会为每个 Pod
生成此文件。例如,对 `data` 的查询可能被展开为 `data.test.svc.cluster.local`。
@@ -91,7 +90,7 @@ options ndots:5
```
概括起来,名字空间 `test` 中的 Pod 可以成功地解析 `data.prod` 或者
@@ -116,7 +115,7 @@ considered implementation details and are subject to change without warning.
For more up-to-date specification, see
[Kubernetes DNS-Based Service Discovery](https://github.com/kubernetes/dns/blob/master/docs/specification.md).
-->
-以下各节详细介绍了被支持的 DNS 记录类型和被支持的布局。
+以下各节详细介绍已支持的 DNS 记录类型和布局。
其它布局、名称或者查询即使碰巧可以工作,也应视为实现细节,
将来很可能被更改而且不会因此发出警告。
有关最新规范请查看
@@ -127,28 +126,30 @@ For more up-to-date specification, see
### A/AAAA records
-"Normal" (not headless) Services are assigned a DNS A or AAAA record for a name of the
-form `my-svc.my-namespace.svc.cluster-domain.example`. This resolves to the cluster IP
+"Normal" (not headless) Services are assigned a DNS A or AAAA record,
+depending on the IP family of the Service, for a name of the form
+`my-svc.my-namespace.svc.cluster-domain.example`. This resolves to the cluster IP
of the Service.
-"Headless" (without a cluster IP) Services are also assigned a DNS A record for
-a name of the form `my-svc.my-namespace.svc.cluster-domain.example`. Unlike normal
-Services, this resolves to the set of IPs of the pods selected by the Service.
+"Headless" (without a cluster IP) Services are also assigned a DNS A or AAAA record,
+depending on the IP family of the Service, for a name of the form
+`my-svc.my-namespace.svc.cluster-domain.example`. Unlike normal
+Services, this resolves to the set of IPs of the Pods selected by the Service.
Clients are expected to consume the set or else use standard round-robin
selection from the set.
-->
-### 服务 {#services}
+### Services
-#### A/AAAA 记录
+#### A/AAAA 记录 {#a-aaaa-records}
-“普通” 服务(除了无头服务)会以 `my-svc.my-namespace.svc.cluster-domain.example`
-这种名字的形式被分配一个 DNS A 或 AAAA 记录,取决于服务的 IP 协议族。
-该名称会解析成对应服务的集群 IP。
+“普通” Service(除了无头 Service)会以 `my-svc.my-namespace.svc.cluster-domain.example`
+这种名字的形式被分配一个 DNS A 或 AAAA 记录,取决于 Service 的 IP 协议族。
+该名称会解析成对应 Service 的集群 IP。
-“无头(Headless)” 服务(没有集群 IP)也会以
+“无头(Headless)” Service (没有集群 IP)也会以
`my-svc.my-namespace.svc.cluster-domain.example` 这种名字的形式被指派一个 DNS A 或 AAAA 记录,
-具体取决于服务的 IP 协议族。
-与普通服务不同,这一记录会被解析成对应服务所选择的 Pod 集合的 IP。
+具体取决于 Service 的 IP 协议族。
+与普通 Service 不同,这一记录会被解析成对应 Service 所选择的 Pod IP 的集合。
客户端要能够使用这组 IP,或者使用标准的轮转策略从这组 IP 中进行选择。
#### SRV 记录 {#srv-records}
-Kubernetes 会为命名端口创建 SRV 记录,这些端口是普通服务或
-[无头服务](/zh/docs/concepts/services-networking/service/#headless-services)的一部分。
-对每个命名端口,SRV 记录具有 `_my-port-name._my-port-protocol.my-svc.my-namespace.svc.cluster-domain.example` 这种形式。
-对普通服务,该记录会被解析成端口号和域名:`my-svc.my-namespace.svc.cluster-domain.example`。
-对无头服务,该记录会被解析成多个结果,服务对应的每个后端 Pod 各一个;
-其中包含 Pod 端口号和形为 `auto-generated-name.my-svc.my-namespace.svc.cluster-domain.example`
+Kubernetes 根据普通 Service 或
+[Headless Service](/zh/docs/concepts/services-networking/service/#headless-services)
+中的命名端口创建 SRV 记录。每个命名端口,
+SRV 记录格式为 `_my-port-name._my-port-protocol.my-svc.my-namespace.svc.cluster-domain.example`。
+普通 Service,该记录会被解析成端口号和域名:`my-svc.my-namespace.svc.cluster-domain.example`。
+无头 Service,该记录会被解析成多个结果,及该服务的每个后端 Pod 各一个 SRV 记录,
+其中包含 Pod 端口号和格式为 `auto-generated-name.my-svc.my-namespace.svc.cluster-domain.example`
的域名。
## Pods
@@ -179,20 +181,20 @@ Kubernetes 会为命名端口创建 SRV 记录,这些端口是普通服务或
-### A/AAAA 记录
+### A/AAAA 记录 {#a-aaaa-records}
一般而言,Pod 会对应如下 DNS 名字解析:
@@ -210,11 +212,11 @@ Any pods exposed by a Service have the following DNS resolution available:
-### Pod 的 hostname 和 subdomain 字段
+### Pod 的 hostname 和 subdomain 字段 {#pod-s-hostname-and-subdomain-fields}
当前,创建 Pod 时其主机名取自 Pod 的 `metadata.name` 值。
@@ -288,21 +290,21 @@ spec:
```
-如果某无头服务与某 Pod 在同一个名字空间中,且它们具有相同的子域名,
+如果某无头 Service 与某 Pod 在同一个名字空间中,且它们具有相同的子域名,
集群的 DNS 服务器也会为该 Pod 的全限定主机名返回 A 记录或 AAAA 记录。
例如,在同一个名字空间中,给定一个主机名为 “busybox-1”、
子域名设置为 “default-subdomain” 的 Pod,和一个名称为 “`default-subdomain`”
-的无头服务,Pod 将看到自己的 FQDN 为
+的无头 Service,Pod 将看到自己的 FQDN 为
"`busybox-1.default-subdomain.my-namespace.svc.cluster-domain.example`"。
DNS 会为此名字提供一个 A 记录或 AAAA 记录,指向该 Pod 的 IP。
“`busybox1`” 和 “`busybox2`” 这两个 Pod 分别具有它们自己的 A 或 AAAA 记录。
@@ -314,18 +316,16 @@ along with its IP.
Endpoints 对象可以为任何端点地址及其 IP 指定 `hostname`。
{{< note >}}
-因为没有为 Pod 名称创建 A 记录或 AAAA 记录,所以要创建 Pod 的 A 记录
-或 AAAA 记录需要 `hostname`。
-
+由于不是为 Pod 名称创建 A 或 AAAA 记录的,因此 Pod 的 A 或 AAAA 需要 `hostname`。
没有设置 `hostname` 但设置了 `subdomain` 的 Pod 只会为
-无头服务创建 A 或 AAAA 记录(`default-subdomain.my-namespace.svc.cluster-domain.example`)
+无头 Service 创建 A 或 AAAA 记录(`default-subdomain.my-namespace.svc.cluster-domain.example`)
指向 Pod 的 IP 地址。
另外,除非在服务上设置了 `publishNotReadyAddresses=True`,否则只有 Pod 进入就绪状态
才会有与之对应的记录。
@@ -341,12 +341,13 @@ record unless `publishNotReadyAddresses=True` is set on the Service.
{{< feature-state for_k8s_version="v1.22" state="stable" >}}
-**前置条件**:`SetHostnameAsFQDN`
-[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
-必须在 {{< glossary_tooltip text="API 服务器" term_id="kube-apiserver" >}}
-上启用。
+当 Pod 配置为具有全限定域名 (FQDN) 时,其主机名是短主机名。
+ 例如,如果你有一个具有完全限定域名 `busybox-1.default-subdomain.my-namespace.svc.cluster-domain.example` 的 Pod,
+ 则默认情况下,该 Pod 内的 `hostname` 命令返回 `busybox-1`,而 `hostname --fqdn` 命令返回 FQDN。
当你在 Pod 规约中设置了 `setHostnameAsFQDN: true` 时,kubelet 会将 Pod
的全限定域名(FQDN)作为该 Pod 的主机名记录到 Pod 所在名字空间。
@@ -356,7 +357,7 @@ When a Pod is configured to have fully qualified domain name (FQDN), its hostnam
在 Linux 中,内核的主机名字段(`struct utsname` 的 `nodename` 字段)限定
最多 64 个字符。
@@ -364,7 +365,7 @@ If a Pod enables this feature and its FQDN is longer than 64 character, it will
如果 Pod 启用这一特性,而其 FQDN 超出 64 字符,Pod 的启动会失败。
Pod 会一直出于 `Pending` 状态(通过 `kubectl` 所看到的 `ContainerCreating`),
并产生错误事件,例如
-"Failed to construct FQDN from pod hostname and cluster domain, FQDN
+"Failed to construct FQDN from Pod hostname and cluster domain, FQDN
`long-FQDN` is too long (64 characters is the max, 70 characters requested)."
(无法基于 Pod 主机名和集群域名构造 FQDN,FQDN `long-FQDN` 过长,至多 64
字符,请求字符数为 70)。
@@ -376,12 +377,12 @@ Pod 会一直出于 `Pending` 状态(通过 `kubectl` 所看到的 `ContainerC
### Pod 的 DNS 策略 {#pod-s-dns-policy}
@@ -411,6 +413,7 @@ DNS 策略可以逐个 Pod 来设定。目前 Kubernetes 支持以下特定 Pod
了解在这些场景中如何处理 DNS 查询的信息。
- "`ClusterFirstWithHostNet`":对于以 hostNetwork 方式运行的 Pod,应显式设置其 DNS 策略
"`ClusterFirstWithHostNet`"。
+ - 注意:这在 Windows 上不支持。 有关详细信息,请参见[下文](#dns-windows)。
- "`None`": 此设置允许 Pod 忽略 Kubernetes 环境中的 DNS 设置。Pod 会使用其 `dnsConfig` 字段
所提供的 DNS 设置。
参见 [Pod 的 DNS 配置](#pod-dns-config)节。
@@ -450,7 +453,7 @@ spec:
```
-输出类似于
-
+输出类似于:
```
nameserver fd00:79:30::a
search default.svc.cluster-domain.example svc.cluster-domain.example cluster-domain.example
@@ -565,6 +567,41 @@ a list of search domains of up to 2048 characters.
如果启用 kube-apiserver 和 kubelet 的特性门控 `ExpandedDNSConfig`,Kubernetes 将可以有最多 32 个
搜索域以及一个最多 2048 个字符的搜索域列表。
+
+## Windows 节点上的 DNS 解析 {#dns-windows}
+
+- 在 Windows 节点上运行的 Pod 不支持 ClusterFirstWithHostNet。
+ Windows 将所有带有 `.` 的名称视为全限定域名(FQDN)并跳过全限定域名(FQDN)解析。
+- 在 Windows 上,可以使用的 DNS 解析器有很多。
+ 由于这些解析器彼此之间会有轻微的行为差别,建议使用
+ [`Resolve-DNSName`](https://docs.microsoft.com/powershell/module/dnsclient/resolve-dnsname)
+ powershell cmdlet 进行名称查询解析。
+- 在 Linux 上,有一个 DNS 后缀列表,当解析全名失败时可以使用。
+ 在 Windows 上,你只能有一个 DNS 后缀,
+ 即与该 Pod 的命名空间相关联的 DNS 后缀(例如:`mydns.svc.cluster.local`)。
+ Windows 可以解析全限定域名(FQDN),和使用了该 DNS 后缀的 Services 或者网络名称。
+ 例如,在 `default` 命名空间中生成一个 Pod,该 Pod 会获得的 DNS 后缀为 `default.svc.cluster.local`。
+ 在 Windows 的 Pod 中,你可以解析 `kubernetes.default.svc.cluster.local` 和 `kubernetes`,
+ 但是不能解析部分限定名称(`kubernetes.default` 和 `kubernetes.default.svc`)。
+
## {{% heading "whatsnext" %}}
@@ -29,14 +28,16 @@ weight: 70
{{< feature-state for_k8s_version="v1.23" state="stable" >}}
IPv4/IPv6 双协议栈网络能够将 IPv4 和 IPv6 地址分配给
{{< glossary_tooltip text="Pod" term_id="pod" >}} 和
{{< glossary_tooltip text="Service" term_id="service" >}}。
从 1.21 版本开始,Kubernetes 集群默认启用 IPv4/IPv6 双协议栈网络,
以支持同时分配 IPv4 和 IPv6 地址。
@@ -54,9 +55,9 @@ IPv4/IPv6 dual-stack on your Kubernetes cluster provides the following features:
Kubernetes 集群的 IPv4/IPv6 双协议栈可提供下面的功能:
* 双协议栈 pod 网络 (每个 pod 分配一个 IPv4 和 IPv6 地址)
* IPv4 和 IPv6 启用的服务
@@ -73,49 +74,54 @@ The following prerequisites are needed in order to utilize IPv4/IPv6 dual-stack
为了使用 IPv4/IPv6 双栈的 Kubernetes 集群,需要满足以下先决条件:
* Kubernetes 1.20 版本或更高版本,有关更早 Kubernetes 版本的使用双栈服务的信息,
请参考对应版本的 Kubernetes 文档。
* 提供商支持双协议栈网络(云提供商或其他提供商必须能够为 Kubernetes
节点提供可路由的 IPv4/IPv6 网络接口)
-* 支持双协议栈的[网络插件](/zh/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/)
+* 支持双协议栈的[网络插件](/zh-cn/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/)
## 配置 IPv4/IPv6 双协议栈
-
+如果配置 IPv4/IPv6 双栈,请分配双栈集群网络:
+
* kube-apiserver:
* `--service-cluster-ip-range=,`
* kube-controller-manager:
* `--cluster-cidr=,`
* `--service-cluster-ip-range=,`
- * `--node-cidr-mask-size-ipv4|--node-cidr-mask-size-ipv6` 对于 IPv4 默认为 /24,对于 IPv6 默认为 /64
+ * `--node-cidr-mask-size-ipv4|--node-cidr-mask-size-ipv6` 对于 IPv4 默认为 /24,
+ 对于 IPv6 默认为 /64
* kube-proxy:
* `--cluster-cidr=,`
* kubelet:
@@ -128,7 +134,8 @@ The following prerequisites are needed in order to utilize IPv4/IPv6 dual-stack
IPv4 CIDR 的一个例子:`10.244.0.0/16`(尽管你会提供你自己的地址范围)。
@@ -139,31 +146,35 @@ IPv6 CIDR 的一个例子:`fdXY:IJKL:MNOP:15::/64`
-## 服务
+## 服务 {#services}
你可以使用 IPv4 或 IPv6 地址来创建
{{< glossary_tooltip text="Service" term_id="service" >}}。
+
服务的地址族默认为第一个服务集群 IP 范围的地址族(通过 kube-apiserver 的
`--service-cluster-ip-range` 参数配置)。
+
当你定义服务时,可以选择将其配置为双栈。若要指定所需的行为,你可以设置
`.spec.ipFamilyPolicy` 字段为以下值之一:
-
* `SingleStack`:单栈服务。控制面使用第一个配置的服务集群 IP 范围为服务分配集群 IP。
* `PreferDualStack`:
* 为服务分配 IPv4 和 IPv6 集群 IP 地址。
@@ -172,14 +183,18 @@ set the `.spec.ipFamilyPolicy` field to one of the following values:
列表中选择 `.spec.ClusterIP`
如果你想要定义哪个 IP 族用于单栈或定义双栈 IP 族的顺序,可以通过设置
服务上的可选字段 `.spec.ipFamilies` 来选择地址族。
{{< note >}}
`.spec.ipFamilies` 字段是不可变的,因为系统无法为已经存在的服务重新分配
`.spec.ClusterIP`。如果你想改变 `.spec.ipFamilies`,则需要删除并重新创建服务。
@@ -195,7 +210,6 @@ You can set `.spec.ipFamilies` to any of the following array values:
- `["IPv6"]`
- `["IPv4","IPv6"]` (dual stack)
- `["IPv6","IPv4"]` (dual stack)
-
-->
- `["IPv4"]`
- `["IPv6"]`
@@ -212,35 +226,46 @@ The first family you list is used for the legacy `.spec.ClusterIP` field.
These examples demonstrate the behavior of various dual-stack Service configuration scenarios.
-->
-### 双栈服务配置场景
+### 双栈服务配置场景 {#dual-stack-service-configuration-scenarios}
以下示例演示多种双栈服务配置场景下的行为。
-#### 新服务的双栈选项
+#### 新服务的双栈选项 {#dual-stack-options-on-new-services}
-
1. 此服务规约中没有显式设定 `.spec.ipFamilyPolicy`。当你创建此服务时,Kubernetes
从所配置的第一个 `service-cluster-ip-range` 种为服务分配一个集群IP,并设置
`.spec.ipFamilyPolicy` 为 `SingleStack`。
- ([无选择算符的服务](/zh/docs/concepts/services-networking/service/#services-without-selectors)
- 和[无头服务](/zh/docs/concepts/services-networking/service/#headless-services)的行为方式
+ ([无选择算符的服务](/zh-cn/docs/concepts/services-networking/service/#services-without-selectors)
+ 和[无头服务](/zh-cn/docs/concepts/services-networking/service/#headless-services)的行为方式
与此相同。)
-
+
{{< codenew file="service/networking/dual-stack-default-svc.yaml" >}}
2. 此服务规约显式地将 `.spec.ipFamilyPolicy` 设置为 `PreferDualStack`。
当你在双栈集群上创建此服务时,Kubernetes 会为该服务分配 IPv4 和 IPv6 地址。
@@ -258,7 +283,10 @@ These examples demonstrate the behavior of various dual-stack Service configurat
{{< codenew file="service/networking/dual-stack-preferred-svc.yaml" >}}
3. 下面的服务规约显式地在 `.spec.ipFamilies` 中指定 `IPv6` 和 `IPv4`,并
将 `.spec.ipFamilyPolicy` 设定为 `PreferDualStack`。
@@ -271,16 +299,21 @@ These examples demonstrate the behavior of various dual-stack Service configurat
-#### 现有服务的双栈默认值
+#### 现有服务的双栈默认值 {#dual-stack-defaults-on-existing-services}
下面示例演示了在服务已经存在的集群上新启用双栈时的默认行为。
(将现有集群升级到 1.21 或者更高版本会启用双协议栈支持。)
1. 在集群上启用双栈时,控制面会将现有服务(无论是 `IPv4` 还是 `IPv6`)配置
`.spec.ipFamilyPolicy` 为 `SingleStack` 并设置 `.spec.ipFamilies`
@@ -296,7 +329,7 @@ These examples demonstrate the default behavior when dual-stack is newly enabled
```shell
kubectl get svc my-service -o yaml
```
-
+
```yaml
apiVersion: v1
kind: Service
@@ -323,10 +356,15 @@ These examples demonstrate the default behavior when dual-stack is newly enabled
```
2. 在集群上启用双栈时,带有选择算符的现有
- [无头服务](/zh/docs/concepts/services-networking/service/#headless-services)
+ [无头服务](/zh-cn/docs/concepts/services-networking/service/#headless-services)
由控制面设置 `.spec.ipFamilyPolicy` 为 `SingleStack`
并设置 `.spec.ipFamilies` 为第一个服务集群 IP 范围的地址族(通过配置 kube-apiserver 的
`--service-cluster-ip-range` 参数),即使 `.spec.ClusterIP` 的设置值为 `None` 也如此。
@@ -341,7 +379,7 @@ These examples demonstrate the default behavior when dual-stack is newly enabled
```shell
kubectl get svc my-service -o yaml
```
-
+
```yaml
apiVersion: v1
kind: Service
@@ -361,13 +399,13 @@ These examples demonstrate the default behavior when dual-stack is newly enabled
protocol: TCP
targetPort: 80
selector:
- app: MyApp
+ app: MyApp
```
-#### 在单栈和双栈之间切换服务
+#### 在单栈和双栈之间切换服务 {#switching-services-between-single-stack-and-dual-stack}
1. 要将服务从单栈更改为双栈,根据需要将 `.spec.ipFamilyPolicy` 从 `SingleStack` 改为
`PreferDualStack` 或 `RequireDualStack`。
- 当你将此服务从单栈更改为双栈时,Kubernetes 将分配缺失的地址族,以便现在
- 该服务具有 IPv4 和 IPv6 地址。
+ 当你将此服务从单栈更改为双栈时,Kubernetes 将分配缺失的地址族,
+ 以便现在该服务具有 IPv4 和 IPv6 地址。
编辑服务规约将 `.spec.ipFamilyPolicy` 从 `SingleStack` 改为 `PreferDualStack`。
-
2. 要将服务从双栈更改为单栈,请将 `.spec.ipFamilyPolicy` 从 `PreferDualStack` 或
`RequireDualStack` 改为 `SingleStack`。
当你将此服务从双栈更改为单栈时,Kubernetes 只保留 `.spec.ClusterIPs`
@@ -418,24 +462,27 @@ Services can be changed from single-stack to dual-stack and from dual-stack to s
-### 无选择算符的无头服务
+### 无选择算符的无头服务 {#headless-services-without-selector}
-对于[不带选择算符的无头服务](/zh/docs/concepts/services-networking/service/#without-selectors),
+对于[不带选择算符的无头服务](/zh-cn/docs/concepts/services-networking/service/#without-selectors),
若没有显式设置 `.spec.ipFamilyPolicy`,则 `.spec.ipFamilyPolicy`
字段默认设置为 `RequireDualStack`。
-### LoadBalancer 类型服务
+### LoadBalancer 类型服务 {#service-type-loadbalancer}
要为你的服务提供双栈负载均衡器:
@@ -444,7 +491,8 @@ To provision a dual-stack load balancer for your Service:
{{< note >}}
为了使用双栈的负载均衡器类型服务,你的云驱动必须支持 IPv4 和 IPv6 的负载均衡器。
{{< /note >}}
@@ -452,10 +500,14 @@ To use a dual-stack `LoadBalancer` type Service, your cloud provider must suppor
-## 出站流量
+## 出站流量 {#egress-traffic}
如果你要启用出站流量,以便使用非公开路由 IPv6 地址的 Pod 到达集群外地址
(例如公网),则需要通过透明代理或 IP 伪装等机制使 Pod 使用公共路由的
@@ -470,11 +522,41 @@ Ensure your {{< glossary_tooltip text="CNI" term_id="cni" >}} provider supports
确认你的 {{< glossary_tooltip text="CNI" term_id="cni" >}} 驱动支持 IPv6。
{{< /note >}}
+
+## Windows 支持 {#windows-support}
+
+Windows 上的 Kubernetes 不支持单栈“仅 IPv6” 网络。 然而,
+对于 Pod 和节点而言,仅支持单栈形式服务的双栈 IPv4/IPv6 网络是被支持的。
+
+你可以使用 `l2bridge` 网络来实现 IPv4/IPv6 双栈联网。
+
+{{< note >}}
+
+Windows 上的 Overlay (VXLAN) 网络**不**支持双栈网络。
+{{< /note >}}
+
+
+关于 Windows 的不同网络模式,你可以进一步阅读
+[Windows 上的网络](/zh-cn/docs/concepts/services-networking/windows-networking#network-modes)。
+
## {{% heading "whatsnext" %}}
-* [验证 IPv4/IPv6 双协议栈](/zh/docs/tasks/network/validate-dual-stack)网络
-* [使用 kubeadm 启用双协议栈网络](/zh/docs/setup/production-environment/tools/kubeadm/dual-stack-support/)
+* [验证 IPv4/IPv6 双协议栈](/zh-cn/docs/tasks/network/validate-dual-stack)网络
+* [使用 kubeadm 启用双协议栈网络](/zh-cn/docs/setup/production-environment/tools/kubeadm/dual-stack-support/)
diff --git a/content/zh/docs/concepts/services-networking/endpoint-slices.md b/content/zh-cn/docs/concepts/services-networking/endpoint-slices.md
similarity index 100%
rename from content/zh/docs/concepts/services-networking/endpoint-slices.md
rename to content/zh-cn/docs/concepts/services-networking/endpoint-slices.md
diff --git a/content/zh/docs/concepts/services-networking/ingress-controllers.md b/content/zh-cn/docs/concepts/services-networking/ingress-controllers.md
similarity index 97%
rename from content/zh/docs/concepts/services-networking/ingress-controllers.md
rename to content/zh-cn/docs/concepts/services-networking/ingress-controllers.md
index a85e073404..06a4c948bd 100644
--- a/content/zh/docs/concepts/services-networking/ingress-controllers.md
+++ b/content/zh-cn/docs/concepts/services-networking/ingress-controllers.md
@@ -158,8 +158,9 @@ You mark an IngressClass as default by setting the [`ingressclass.kubernetes.io/
Ideally, all ingress controllers should fulfill this specification, but the various ingress
controllers operate slightly differently.
-->
-如果你不为 Ingress 指定一个 IngressClass,并且你的集群中只有一个 IngressClass 被标记为了集群默认,那么
-Kubernetes 会[应用](/zh/docs/concepts/services-networking/ingress/#default-ingress-class)此默认
+如果你不为 Ingress 指定 IngressClass,并且你的集群中只有一个 IngressClass 被标记为默认,那么
+Kubernetes 会将此集群的默认 IngressClass
+[应用](/zh/docs/concepts/services-networking/ingress/#default-ingress-class)到 Ingress 上。
IngressClass。
你可以通过将
[`ingressclass.kubernetes.io/is-default-class` 注解](/zh/docs/reference/labels-annotations-taints/#ingressclass-kubernetes-io-is-default-class)
diff --git a/content/zh/docs/concepts/services-networking/ingress.md b/content/zh-cn/docs/concepts/services-networking/ingress.md
similarity index 95%
rename from content/zh/docs/concepts/services-networking/ingress.md
rename to content/zh-cn/docs/concepts/services-networking/ingress.md
index 037b135c0d..e14cd79ef8 100644
--- a/content/zh/docs/concepts/services-networking/ingress.md
+++ b/content/zh-cn/docs/concepts/services-networking/ingress.md
@@ -20,7 +20,7 @@ weight: 40
For clarity, this guide defines the following terms:
-->
-## 术语
+## 术语 {#terminology}
为了表达更加清晰,本指南定义了以下术语:
@@ -48,10 +48,11 @@ For clarity, this guide defines the following terms:
{{< link text="services" url="/docs/concepts/services-networking/service/" >}} within the cluster.
Traffic routing is controlled by rules defined on the Ingress resource.
-->
-## Ingress 是什么?
+## Ingress 是什么? {#what-is-ingress}
[Ingress](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#ingress-v1beta1-networking-k8s-io)
-公开了从集群外部到集群内[服务](/zh/docs/concepts/services-networking/service/)的 HTTP 和 HTTPS 路由。
+公开从集群外部到集群内[服务](/zh/docs/concepts/services-networking/service/)的
+HTTP 和 HTTPS 路由。
流量路由由 Ingress 资源上定义的规则控制。
下面是一个将所有流量都发送到同一 Service 的简单 Ingress 示例:
-{{< mermaid >}}
-graph LR;
- client([客户端])-. Ingress-管理的 负载均衡器 .->ingress[Ingress];
- ingress-->|路由规则|service[Service];
- subgraph cluster
- ingress;
- service-->pod1[Pod];
- service-->pod2[Pod];
- end
- classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
- classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
- classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5;
- class ingress,service,pod1,pod2 k8s;
- class client plain;
- class cluster cluster;
-{{ mermaid >}}
+{{< figure src="/zh-cn/docs/images/ingress.svg" alt="ingress-diagram" class="diagram-large" caption="图. Ingress" link="https://mermaid.live/edit#pako:eNqNkstuwyAQRX8F4U0r2VHqPlSRKqt0UamLqlnaWWAYJygYLB59KMm_Fxcix-qmGwbuXA7DwAEzzQETXKutof0Ovb4vaoUQkwKUu6pi3FwXM_QSHGBt0VFFt8DRU2OWSGrKUUMlVQwMmhVLEV1Vcm9-aUksiuXRaO_CEhkv4WjBfAgG1TrGaLa-iaUw6a0DcwGI-WgOsF7zm-pN881fvRx1UDzeiFq7ghb1kgqFWiElyTjnuXVG74FkbdumefEpuNuRu_4rZ1pqQ7L5fL6YQPaPNiFuywcG9_-ihNyUkm6YSONWkjVNM8WUIyaeOJLO3clTB_KhL8NQDmVe-OJjxgZM5FhFiiFTK5zjDkxHBQ9_4zB4a-x20EGNSZhyaKmXrg7f5hSsvufUwTMXThtMWiot5Jh6p9ffimHijIezaSVoeN0uiqcfMJvf7w" >}}
|/foo|service1[Service service1:4200];
- ingress-->|/bar|service2[Service service2:8080];
- subgraph cluster
- ingress;
- service1-->pod1[Pod];
- service1-->pod2[Pod];
- service2-->pod3[Pod];
- service2-->pod4[Pod];
- end
- classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
- classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
- classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5;
- class ingress,service1,service2,pod1,pod2,pod3,pod4 k8s;
- class client plain;
- class cluster cluster;
-{{ mermaid >}}
+{{< figure src="/zh-cn/docs/images/ingressFanOut.svg" alt="ingress-fanout-diagram" class="diagram-large" caption="图. Ingress 扇出" link="https://mermaid.live/edit#pako:eNqNUslOwzAQ_RXLvYCUhMQpUFzUUzkgcUBwbHpw4klr4diR7bCo8O8k2FFbFomLPZq3jP00O1xpDpjijWHtFt09zAuFUCUFKHey8vf6NE7QrdoYsDZumGIb4Oi6NAskNeOoZJKpCgxK4oXwrFVgRyi7nCVXWZKRPMlysv5yD6Q4Xryf1Vq_WzDPooJs9egLNDbolKTpT03JzKgh3zWEztJZ0Niu9L-qZGcdmAMfj4cxvWmreba613z9C0B-AMQD-V_AdA-A4j5QZu0SatRKJhSqhZR0wjmPrDP6CeikrutQxy-Cuy2dtq9RpaU2dJKm6fzI5Glmg0VOLio4_5dLjx27hFSC015KJ2VZHtuQvY2fuHcaE43G0MaCREOow_FV5cMxHZ5-oPX75UM5avuXhXuOI9yAaZjg_aLuBl6B3RYaKDDtSw4166QrcKE-emrXcubghgunDaY1kxYizDqnH99UhakzHYykpWD9hjS--fEJoIELqQ" >}}
+
|Host: foo.bar.com|service1[Service service1:80];
- ingress-->|Host: bar.foo.com|service2[Service service2:80];
- subgraph cluster
- ingress;
- service1-->pod1[Pod];
- service1-->pod2[Pod];
- service2-->pod3[Pod];
- service2-->pod4[Pod];
- end
- classDef plain fill:#ddd,stroke:#fff,stroke-width:4px,color:#000;
- classDef k8s fill:#326ce5,stroke:#fff,stroke-width:4px,color:#fff;
- classDef cluster fill:#fff,stroke:#bbb,stroke-width:2px,color:#326ce5;
- class ingress,service1,service2,pod1,pod2,pod3,pod4 k8s;
- class client plain;
- class cluster cluster;
-{{ mermaid >}}
+{{< figure src="/zh-cn/docs/images/ingressNameBased.svg" alt="ingress-namebase-diagram" class="diagram-large" caption="图. 基于名称实现虚拟托管的 Ingress" link="https://mermaid.live/edit#pako:eNqNkl9PwyAUxb8KYS-atM1Kp05m9qSJJj4Y97jugcLtRqTQAPVPdN_dVlq3qUt8gZt7zvkBN7xjbgRgiteW1Rt0_zjLNUJcSdD-ZBn21WmcoDu9tuBcXDHN1iDQVWHnSBkmUMEU0xwsSuK5DK5l745QejFNLtMkJVmSZmT1Re9NcTz_uDXOU1QakxTMJtxUHw7ss-SQLhehQEODTsdH4l20Q-zFyc84-Y67pghv5apxHuweMuj9eS2_NiJdPhix-kMgvwQShOyYMNkJoEUYM3PuGkpUKyY1KqVSdCSEiJy35gnoqCzLvo5fpPAbOqlfI26UsXQ0Ho9nB5CnqesRGTnncPYvSqsdUvqp9KRdlI6KojjEkB0mnLgjDRONhqENBYm6oXbLV5V1y6S7-l42_LowlIN2uFm_twqOcAW2YlK0H_i9c-bYb6CCHNO2FFCyRvkc53rbWptaMA83QnpjMS2ZchBh1nizeNMcU28bGEzXkrV_pArN7Sc0rBTu" >}}
如果你希望在 IP 地址或端口层面(OSI 第 3 层或第 4 层)控制网络流量,
则你可以考虑为集群中特定应用使用 Kubernetes 网络策略(NetworkPolicy)。
@@ -21,6 +21,7 @@ NetworkPolicy 是一种以应用为中心的结构,允许你设置如何允许
{{< glossary_tooltip text="Pod" term_id="pod">}} 与网络上的各类网络“实体”
(我们这里使用实体以避免过度使用诸如“端点”和“服务”这类常用术语,
这些术语在 Kubernetes 中有特定含义)通信。
+NetworkPolicies 适用于一端或两端与 Pod 的连接,与其他连接无关。
-## Pod 隔离的两种类型
+## Pod 隔离的两种类型 {#the-two-sorts-of-pod-isolation}
Pod 有两种隔离: 出口的隔离和入口的隔离。它们涉及到可以建立哪些连接。
这里的“隔离”不是绝对的,而是意味着“有一些限制”。
@@ -90,7 +91,7 @@ By default, a pod is non-isolated for ingress; all inbound connections are allow
默认情况下,一个 Pod 对入口是非隔离的,即所有入站连接都是被允许的。如果有任何的 NetworkPolicy
选择该 Pod 并在其 `policyTypes` 中包含 “Ingress”,则该 Pod 被隔离入口,
-我们称这种策略适用于该 Pod 的入口。 当一个 Pod 的入口被隔离时,唯一允许进入该 Pod
+我们称这种策略适用于该 Pod 的入口。当一个 Pod 的入口被隔离时,唯一允许进入该 Pod
的连接是来自该 Pod 节点的连接和适用于入口的 Pod 的某个 NetworkPolicy 的 `ingress`
列表所允许的连接。这些 `ingress` 列表的效果是相加的。
@@ -134,7 +135,7 @@ POSTing this to the API server for your cluster will have no effect unless your
__Mandatory Fields__: As with all other Kubernetes config, a NetworkPolicy
needs `apiVersion`, `kind`, and `metadata` fields. For general information
about working with config files, see
-[Configure Containers Using a ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/),
+[Configure a Pod to Use a ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/),
and [Object Management](/docs/concepts/overview/working-with-objects/object-management).
__spec__: NetworkPolicy [spec](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status) has all the information needed to define a particular network policy in the given namespace.
@@ -143,7 +144,7 @@ __podSelector__: Each NetworkPolicy includes a `podSelector` which selects the g
-->
__必需字段__:与所有其他的 Kubernetes 配置一样,NetworkPolicy 需要 `apiVersion`、
`kind` 和 `metadata` 字段。关于配置文件操作的一般信息,请参考
-[使用 ConfigMap 配置容器](/zh/docs/tasks/configure-pod-container/configure-pod-configmap/),
+[配置 Pod 以使用 ConfigMap](/zh/docs/tasks/configure-pod-container/configure-pod-configmap/),
和[对象管理](/zh/docs/concepts/overview/working-with-objects/object-management)。
__spec__:NetworkPolicy [规约](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status)
@@ -169,7 +170,7 @@ __policyTypes__: 每个 NetworkPolicy 都包含一个 `policyTypes` 列表,其
__ingress__: 每个 NetworkPolicy 可包含一个 `ingress` 规则的白名单列表。
每个规则都允许同时匹配 `from` 和 `ports` 部分的流量。示例策略中包含一条
-简单的规则: 它匹配某个特定端口,来自三个来源中的一个,第一个通过 `ipBlock`
+简单的规则:它匹配某个特定端口,来自三个来源中的一个,第一个通过 `ipBlock`
指定,第二个通过 `namespaceSelector` 指定,第三个通过 `podSelector` 指定。
__egress__: 每个 NetworkPolicy 可包含一个 `egress` 规则的白名单列表。
@@ -180,7 +181,7 @@ __egress__: 每个 NetworkPolicy 可包含一个 `egress` 规则的白名单列
So, the example NetworkPolicy:
1. isolates "role=db" pods in the "default" namespace for both ingress and egress traffic (if they weren't already isolated)
-2. (Ingress rules) allows connections to all pods in the “default” namespace with the label “role=db” on TCP port 6379 from:
+2. (Ingress rules) allows connections to all pods in the "default" namespace with the label "role=db" on TCP port 6379 from:
* any pod in the "default" namespace with the label "role=frontend"
* any pod in a namespace with the label "project=myproject"
@@ -227,7 +228,7 @@ Pod,应将其允许作为入站流量来源或出站流量目的地。
__namespaceSelector__:此选择器将选择特定的名字空间,应将所有 Pod 用作其
入站流量来源或出站流量目的地。
-__namespaceSelector__ *和* __podSelector__: 一个指定 `namespaceSelector`
+__namespaceSelector__ *和* __podSelector__:一个指定 `namespaceSelector`
和 `podSelector` 的 `to`/`from` 条目选择特定名字空间中的特定 Pod。
注意使用正确的 YAML 语法;下面的策略:
@@ -316,40 +317,47 @@ in that namespace.
-### 默认拒绝所有入站流量
+### 默认拒绝所有入站流量 {#default-deny-all-ingress-traffic}
+
你可以通过创建选择所有容器但不允许任何进入这些容器的入站流量的 NetworkPolicy
来为名字空间创建 “default” 隔离策略。
{{< codenew file="service/networking/network-policy-default-deny-ingress.yaml" >}}
-这样可以确保即使容器没有选择其他任何 NetworkPolicy,也仍然可以被隔离。
-此策略不会更改默认的出口隔离行为。
+这确保即使没有被任何其他 NetworkPolicy 选择的 Pod 仍将被隔离以进行入口。
+此策略不影响任何 Pod 的出口隔离。
-### 默认允许所有入站流量
+### 允许所有入站流量 {#allow-all-ingress-traffic}
-如果要允许所有流量进入某个名字空间中的所有 Pod(即使添加了导致某些 Pod 被视为
-“隔离”的策略),则可以创建一个策略来明确允许该名字空间中的所有流量。
+
+如果你想允许一个命名空间中所有 Pod 的所有入站连接,你可以创建一个明确允许的策略。
{{< codenew file="service/networking/network-policy-allow-all-ingress.yaml" >}}
+
+有了这个策略,任何额外的策略都不会导致到这些 Pod 的任何入站连接被拒绝。
+此策略对任何 Pod 的出口隔离没有影响。
+
-### 默认拒绝所有出站流量
+### 默认拒绝所有出站流量 {#default-deny-all-egress-traffic}
你可以通过创建选择所有容器但不允许来自这些容器的任何出站流量的 NetworkPolicy
来为名字空间创建 “default” 隔离策略。
@@ -358,29 +366,36 @@ You can create a "default" egress isolation policy for a namespace by creating a
此策略可以确保即使没有被其他任何 NetworkPolicy 选择的 Pod 也不会被允许流出流量。
-此策略不会更改默认的入站流量隔离行为。
+此策略不会更改任何 Pod 的入站流量隔离行为。
-### 默认允许所有出站流量
+### 允许所有出站流量 {#allow-all-egress-traffic}
-如果要允许来自名字空间中所有 Pod 的所有流量(即使添加了导致某些 Pod 被视为“隔离”的策略),
-则可以创建一个策略,该策略明确允许该名字空间中的所有出站流量。
+
+如果要允许来自命名空间中所有 Pod 的所有连接,
+则可以创建一个明确允许来自该命名空间中 Pod 的所有出站连接的策略。
{{< codenew file="service/networking/network-policy-allow-all-egress.yaml" >}}
+
+有了这个策略,任何额外的策略都不会导致来自这些 Pod 的任何出站连接被拒绝。
+此策略对进入任何 Pod 的隔离没有影响。
+
-### 默认拒绝所有入口和所有出站流量
+### 默认拒绝所有入站和所有出站流量 {#default-deny-all-ingress-and-all-egress-traffic}
你可以为名字空间创建“默认”策略,以通过在该名字空间中创建以下 NetworkPolicy
来阻止所有入站和出站流量。
@@ -396,7 +411,7 @@ This ensures that even pods that aren't selected by any other NetworkPolicy will
-## SCTP 支持
+## SCTP 支持 {#sctp-support}
{{< feature-state for_k8s_version="v1.20" state="stable" >}}
@@ -465,7 +480,10 @@ port is between the range 32000 and 32768.
-## 通过网络策略(至少目前还)无法完成的工作
+## 通过网络策略(至少目前还)无法完成的工作 {#what-you-can-t-do-with-network-policies-at-least-not-yet}
到 Kubernetes {{< skew latestVersion >}} 为止,NetworkPolicy API 还不支持以下功能,不过
你可能可以使用操作系统组件(如 SELinux、OpenVSwitch、IPTables 等等)
diff --git a/content/zh/docs/concepts/services-networking/service-topology.md b/content/zh-cn/docs/concepts/services-networking/service-topology.md
similarity index 100%
rename from content/zh/docs/concepts/services-networking/service-topology.md
rename to content/zh-cn/docs/concepts/services-networking/service-topology.md
diff --git a/content/zh/docs/concepts/services-networking/service-traffic-policy.md b/content/zh-cn/docs/concepts/services-networking/service-traffic-policy.md
similarity index 100%
rename from content/zh/docs/concepts/services-networking/service-traffic-policy.md
rename to content/zh-cn/docs/concepts/services-networking/service-traffic-policy.md
diff --git a/content/zh/docs/concepts/services-networking/service.md b/content/zh-cn/docs/concepts/services-networking/service.md
similarity index 93%
rename from content/zh/docs/concepts/services-networking/service.md
rename to content/zh-cn/docs/concepts/services-networking/service.md
index 3d2db97c3c..71140bf426 100644
--- a/content/zh/docs/concepts/services-networking/service.md
+++ b/content/zh-cn/docs/concepts/services-networking/service.md
@@ -1,5 +1,5 @@
---
-title: 服务
+title: 服务(Service)
feature:
title: 服务发现与负载均衡
description: >
@@ -39,7 +39,7 @@ Kubernetes 为 Pods 提供自己的 IP 地址,并为一组 Pod 提供相同的
## Motivation
Kubernetes {{< glossary_tooltip term_id="pod" text="Pods" >}} are created and destroyed
-to match the state of your cluster. Pods are nonpermanent resources.
+to match the desired state of your cluster. Pods are nonpermanent resources.
If you use a {{< glossary_tooltip term_id="deployment" >}} to run your app,
it can create and destroy Pods dynamically.
@@ -57,7 +57,7 @@ Enter _Services_.
## 动机
-创建和销毁 Kubernetes {{< glossary_tooltip term_id="pod" text="Pod" >}} 以匹配集群状态。
+创建和销毁 Kubernetes {{< glossary_tooltip term_id="pod" text="Pod" >}} 以匹配集群的期望状态。
Pod 是非永久性资源。
如果你使用 {{< glossary_tooltip term_id="deployment">}}
来运行你的应用程序,则它可以动态创建和销毁 Pod。
@@ -189,13 +189,55 @@ field.
+Pod 中的端口定义是有名字的,你可以在 Service 的 `targetPort` 属性中引用这些名称。
+例如,我们可以通过以下方式将 Service 的 `targetPort` 绑定到 Pod 端口:
+```yaml
+apiVersion: v1
+kind: Pod
+metadata:
+ name: nginx
+ labels:
+ app.kubernetes.io/name: proxy
+spec:
+ containers:
+ - name: nginx
+ image: nginx:stable
+ ports:
+ - containerPort: 80
+ name: http-web-svc
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: nginx-service
+spec:
+ selector:
+ app.kubernetes.io/name: proxy
+ ports:
+ - name: name-of-service-port
+ protocol: TCP
+ port: 80
+ targetPort: http-web-svc
+```
+
+
+即使 Service 中使用同一配置名称混合使用多个 Pod,各 Pod 通过不同的端口号支持相同的网络协议,
+此功能也可以使用。这为 Service 的部署和演化提供了很大的灵活性。
+例如,你可以在新版本中更改 Pod 中后端软件公开的端口号,而不会破坏客户端。
+
+
+
-Pod 中的端口定义是有名字的,你可以在服务的 `targetPort` 属性中引用这些名称。
-即使服务中使用单个配置的名称混合使用 Pod,并且通过不同的端口号提供相同的网络协议,此功能也可以使用。
-这为部署和发展服务提供了很大的灵活性。
-例如,你可以更改 Pods 在新版本的后端软件中公开的端口号,而不会破坏客户端。
+
服务的默认协议是 TCP;你还可以使用任何其他[受支持的协议](#protocol-support)。
@@ -216,9 +255,9 @@ Pod 中的端口定义是有名字的,你可以在服务的 `targetPort` 属
### 没有选择算符的 Service {#services-without-selectors}
-服务最常见的是抽象化对 Kubernetes Pod 的访问,但是它们也可以抽象化其他种类的后端。
-实例:
+由于选择器的存在,服务最常见的用法是为 Kubernetes Pod 的访问提供抽象,
+但是当与相应的 Endpoints 对象一起使用且没有选择器时,
+服务也可以为其他类型的后端提供抽象,包括在集群外运行的后端。
+例如:
* 希望在生产环境中使用外部的数据库集群,但测试环境使用自己的数据库。
* 希望服务指向另一个 {{< glossary_tooltip term_id="namespace" >}} 中或其它集群中的服务。
@@ -266,6 +307,7 @@ where it's running, by adding an Endpoints object manually:
apiVersion: v1
kind: Endpoints
metadata:
+ # 这里的 name 要与 Service 的名字相同
name: my-service
subsets:
- addresses:
@@ -280,6 +322,15 @@ The name of the Endpoints object must be a valid
Endpoints 对象的名称必须是合法的
[DNS 子域名](/zh/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)。
+
+当你为某个 Service 创建一个 [Endpoints](/zh-cn/docs/reference/kubernetes-api/service-resources/endpoints-v1/)
+对象时,你要将新对象的名称设置为与 Service 的名称相同。
+
+{{< note >}}
-{{< note >}}
端点 IPs _必须不可以_ 是:本地回路(IPv4 的 127.0.0.0/8, IPv6 的 ::1/128)或
本地链接(IPv4 的 169.254.0.0/16 和 224.0.0.0/24,IPv6 的 fe80::/64)。
@@ -590,6 +640,14 @@ You can also set the maximum session sticky time by setting
来设置最大会话停留时间。
(默认值为 10800 秒,即 3 小时)。
+
+{{< note >}}
+在 Windows 上,不支持为服务设置最大会话停留时间。
+{{< /note >}}
+
+
@@ -751,11 +809,7 @@ Kubernetes 支持两种基本的服务发现模式 —— 环境变量和 DNS。
### Environment variables
When a Pod is run on a Node, the kubelet adds a set of environment variables
-for each active Service. It supports both [Docker links
-compatible](https://docs.docker.com/userguide/dockerlinks/) variables (see
-[makeLinkVariables](https://releases.k8s.io/{{< param "githubbranch" >}}/pkg/kubelet/envvars/envvars.go#L49))
-and simpler `{SVCNAME}_SERVICE_HOST` and `{SVCNAME}_SERVICE_PORT` variables,
-where the Service name is upper-cased and dashes are converted to underscores.
+for each active Service. It adds `{SVCNAME}_SERVICE_HOST` and `{SVCNAME}_SERVICE_PORT` variables, where the Service name is upper-cased and dashes are converted to underscores. It also supports variables (see [makeLinkVariables](https://github.com/kubernetes/kubernetes/blob/dd2d12f6dc0e654c15d5db57a5f9f6ba61192726/pkg/kubelet/envvars/envvars.go#L72)) that are compatible with Docker Engine's "_[legacy container links](https://docs.docker.com/network/links/)_" feature.
For example, the Service `redis-master` which exposes TCP port 6379 and has been
allocated cluster IP address 10.0.0.11, produces the following environment
@@ -764,10 +818,10 @@ variables:
### 环境变量 {#environment-variables}
当 Pod 运行在 `Node` 上,kubelet 会为每个活跃的 Service 添加一组环境变量。
-它同时支持 [Docker links兼容](https://docs.docker.com/userguide/dockerlinks/) 变量
-(查看 [makeLinkVariables](https://releases.k8s.io/{{< param "githubbranch" >}}/pkg/kubelet/envvars/envvars.go#L49))、
-简单的 `{SVCNAME}_SERVICE_HOST` 和 `{SVCNAME}_SERVICE_PORT` 变量。
+kubelet 为 Pod 添加环境变量 `{SVCNAME}_SERVICE_HOST` 和 `{SVCNAME}_SERVICE_PORT`。
这里 Service 的名称需大写,横线被转换成下划线。
+它还支持与 Docker Engine 的 "_[legacy container links](https://docs.docker.com/network/links/)_" 特性兼容的变量
+(参阅 [makeLinkVariables](https://github.com/kubernetes/kubernetes/blob/dd2d12f6dc0e654c15d5db57a5f9f6ba61192726/pkg/kubelet/envvars/envvars.go#L72)) 。
举个例子,一个名称为 `redis-master` 的 Service 暴露了 TCP 端口 6379,
同时给它分配了 Cluster IP 地址 10.0.0.11,这个 Service 生成了如下环境变量:
@@ -1145,13 +1199,15 @@ securityGroupName。
#### 混合协议类型的负载均衡器
@@ -1160,14 +1216,16 @@ If the feature gate `MixedProtocolLBService` is enabled for the kube-apiserver i
默认情况下,对于 LoadBalancer 类型的服务,当定义了多个端口时,所有
端口必须具有相同的协议,并且该协议必须是受云提供商支持的协议。
-如果为 kube-apiserver 启用了 `MixedProtocolLBService` 特性门控,
-则当定义了多个端口时,允许使用不同的协议。
+当服务中定义了多个端口时,特性门控 `MixedProtocolLBService`(在 kube-apiserver 1.24 版本默认为启用)允许
+LoadBalancer 类型的服务使用不同的协议。
{{< note >}}
可用于 LoadBalancer 类型服务的协议集仍然由云提供商决定。
+如果云提供商不支持混合协议,他们将只提供单一协议。
{{< /note >}}
### 禁用负载均衡器节点端口分配 {#load-balancer-nodeport-allocation}
-{{< feature-state for_k8s_version="v1.20" state="alpha" >}}
+{{< feature-state for_k8s_version="v1.24" state="stable" >}}
-从 v1.20 版本开始, 你可以通过设置 `spec.allocateLoadBalancerNodePorts` 为 `false`
+你可以通过设置 `spec.allocateLoadBalancerNodePorts` 为 `false`
对类型为 LoadBalancer 的服务禁用节点端口分配。
这仅适用于直接将流量路由到 Pod 而不是使用节点端口的负载均衡器实现。
默认情况下,`spec.allocateLoadBalancerNodePorts` 为 `true`,
LoadBalancer 类型的服务继续分配节点端口。
如果现有服务已被分配节点端口,将参数 `spec.allocateLoadBalancerNodePorts`
-设置为 `false` 时,这些服务上已分配置的节点端口不会被自动释放。
+设置为 `false` 时,这些服务上已分配置的节点端口**不会**被自动释放。
你必须显式地在每个服务端口中删除 `nodePorts` 项以释放对应端口。
-你必须启用 `ServiceLBNodePortControl` 特性门控才能使用该字段。
#### 设置负载均衡器实现的类别 {#load-balancer-class}
-{{< feature-state for_k8s_version="v1.22" state="beta" >}}
+{{< feature-state for_k8s_version="v1.24" state="stable" >}}
`spec.loadBalancerClass` 允许你不使用云提供商的默认负载均衡器实现,转而使用指定的负载均衡器实现。
-这个特性从 v1.21 版本开始可以使用,你在 v1.21 版本中使用这个字段必须启用 `ServiceLoadBalancerClass`
-特性门控,这个特性门控从 v1.22 版本及以后默认打开。
默认情况下,`.spec.loadBalancerClass` 的取值是 `nil`,如果集群使用 `--cloud-provider` 配置了云提供商,
`LoadBalancer` 类型服务会使用云提供商的默认负载均衡器实现。
如果设置了 `.spec.loadBalancerClass`,则假定存在某个与所指定的类相匹配的
@@ -1972,7 +2026,8 @@ someone else's choice. That is an isolation failure.
In order to allow you to choose a port number for your Services, we must
ensure that no two Services can collide. Kubernetes does that by allocating each
-Service its own IP address.
+Service its own IP address from within the `service-cluster-ip-range`
+CIDR range that is configured for the API server.
To ensure each Service receives a unique IP, an internal allocator atomically
updates a global allocation map in {{< glossary_tooltip term_id="etcd" >}}
@@ -1992,8 +2047,9 @@ Kubernetes 最主要的哲学之一,是用户不应该暴露那些能够导致
对于 Service 资源的设计,这意味着如果用户的选择有可能与他人冲突,那就不要让用户自行选择端口号。
这是一个隔离性的失败。
-为了使用户能够为他们的 Service 选择一个端口号,我们必须确保不能有2个 Service 发生冲突。
-Kubernetes 通过为每个 Service 分配它们自己的 IP 地址来实现。
+为了使用户能够为他们的 Service 选择一个端口号,我们必须确保不能有 2 个 Service 发生冲突。
+Kubernetes 通过在为 API 服务器配置的 `service-cluster-ip-range` CIDR
+范围内为每个服务分配自己的 IP 地址来实现。
为了保证每个 Service 被分配到一个唯一的 IP,需要一个内部的分配器能够原子地更新
{{< glossary_tooltip term_id="etcd" >}} 中的一个全局分配映射表,
@@ -2006,6 +2062,42 @@ Kubernetes 通过为每个 Service 分配它们自己的 IP 地址来实现。
同时 Kubernetes 会通过控制器检查不合理的分配(如管理员干预导致的)
以及清理已被分配但不再被任何 Service 使用的 IP 地址。
+
+#### `type: ClusterIP` 服务的 IP 地址范围 {#service-ip-static-sub-range}
+
+{{< feature-state for_k8s_version="v1.24" state="alpha" >}}
+但是,这种 `ClusterIP` 分配策略存在一个问题,因为用户还可以[为服务选择自己的地址](#choosing-your-own-ip-address)。
+如果内部分配器为另一个服务选择相同的 IP 地址,这可能会导致冲突。
+
+
+如果启用 `ServiceIPStaticSubrange`[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/),
+分配策略根据配置的 `service-cluster-ip-range` 的大小,使用以下公式
+`min(max(16, cidrSize / 16), 256)` 进行划分,该公式可描述为
+“在不小于 16 且不大于 256 之间有一个步进量(Graduated Step)”,将
+`ClusterIP` 范围分成两段。动态 IP 分配将优先从上半段地址中选择,
+从而降低与下半段地址分配的 IP 冲突的风险。
+这允许用户将 `service-cluster-ip-range` 的下半段地址用于他们的服务,
+与所分配的静态 IP 的冲突风险非常低。
+
+
+
+Kubernetes 支持运行 Linux 或 Windows 节点。
+你可以在统一集群内混布这两种节点。
+本页提供了特定于 Windows 操作系统的网络概述。
+
+
+
+## Windows 容器网络 {#networking}
+
+Windows 容器网络通过 [CNI 插件](/zh/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/)暴露。
+Windows 容器网络的工作方式与虚拟机类似。
+每个容器都有一个连接到 Hyper-V 虚拟交换机(vSwitch)的虚拟网络适配器(vNIC)。
+主机网络服务(Host Networking Service,HNS)和主机计算服务(Host Comute Service,HCS)
+协同创建容器并将容器 vNIC 挂接到网络。
+HCS 负责管理容器,而 HNS 负责管理以下网络资源:
+
+* 虚拟网络(包括创建 vSwitch)
+* Endpoint / vNIC
+* 命名空间
+* 包括数据包封装、负载均衡规则、ACL 和 NAT 规则在内的策略。
+
+
+Windows HNS 和 vSwitch 实现命名空间划分,且可以按需为 Pod 或容器创建虚拟 NIC。
+然而,诸如 DNS、路由和指标等许多配置将存放在 Windows 注册表数据库中,
+而不是像 Linux 将这些配置作为文件存放在 `/etc` 内。
+针对容器的 Windows 注册表与主机的注册表是分开的,因此将 `/etc/resolv.conf`
+从主机映射到一个容器的类似概念与 Linux 上的效果不同。
+这些必须使用容器环境中运行的 Windows API 进行配置。
+因此,实现 CNI 时需要调用 HNS,而不是依赖文件映射将网络详情传递到 Pod 或容器中。
+
+
+## 网络模式 {#network-mode}
+
+Windows 支持五种不同的网络驱动/模式:L2bridge、L2tunnel、Overlay (Beta)、Transparent 和 NAT。
+在 Windows 和 Linux 工作节点组成的异构集群中,你需要选择一个同时兼容 Windows 和 Linux 的网络方案。
+下表列出了 Windows 支持的树外插件,并给出了何时使用每种 CNI 的建议:
+
+
+| 网络驱动 | 描述 | 容器数据包修改 | 网络插件 | 网络插件特点 |
+| -------------- | ----------- | ------------------------------ | --------------- | ------------------------------ |
+| L2bridge | 容器挂接到一个外部 vSwitch。容器挂接到下层网络,但物理网络不需要了解容器的 MAC,因为这些 MAC 在入站/出站时被重写。 | MAC 被重写为主机 MAC,可使用 HNS OutboundNAT 策略将 IP 重写为主机 IP。 | [win-bridge](https://github.com/containernetworking/plugins/tree/master/plugins/main/windows/win-bridge)、[Azure-CNI](https://github.com/Azure/azure-container-networking/blob/master/docs/cni.md)、Flannel host-gateway 使用 win-bridge| win-bridge 使用 L2bridge 网络模式,将容器连接到主机的下层,提供最佳性能。节点间连接需要用户定义的路由(UDR)。 |
+| L2Tunnel | 这是 L2bridge 的一种特例,但仅用在 Azure 上。所有数据包都会被发送到应用了 SDN 策略的虚拟化主机。 | MAC 被重写,IP 在下层网络上可见。| [Azure-CNI](https://github.com/Azure/azure-container-networking/blob/master/docs/cni.md) | Azure-CNI 允许将容器集成到 Azure vNET,允许容器充分利用 [Azure 虚拟网络](https://azure.microsoft.com/zh-cn/services/virtual-network/)所提供的能力集合。例如,安全地连接到 Azure 服务或使用 Azure NSG。参考 [azure-cni 了解有关示例](https://docs.microsoft.com/zh-cn/azure/aks/concepts-network#azure-cni-advanced-networking)。 |
+| Overlay | 容器被赋予一个 vNIC,连接到外部 vSwitch。每个上层网络都有自己的 IP 子网,由自定义 IP 前缀进行定义。该上层网络驱动使用 VXLAN 封装。 | 用外部头进行封装。 | [win-overlay](https://github.com/containernetworking/plugins/tree/master/plugins/main/windows/win-overlay)、Flannel VXLAN(使用 win-overlay) | 当需要将虚拟容器网络与主机的下层隔离时(例如出于安全原因),应使用 win-overlay。如果你的数据中心的 IP 个数有限,可以将 IP 在不同的上层网络中重用(带有不同的 VNID 标记)。在 Windows Server 2019 上这个选项需要 [KB4489899](https://support.microsoft.com/zh-cn/help/4489899)。 |
+| Transparent([ovn-kubernetes](https://github.com/openvswitch/ovn-kubernetes) 的特殊用例) | 需要一个外部 vSwitch。容器挂接到一个外部 vSwitch,由后者通过逻辑网络(逻辑交换机和路由器)实现 Pod 内通信。 | 数据包通过 [GENEVE](https://datatracker.ietf.org/doc/draft-gross-geneve/) 或 [STT](https://datatracker.ietf.org/doc/draft-davie-stt/) 隧道进行封装,以到达其它主机上的 Pod。 数据包基于 OVN 网络控制器提供的隧道元数据信息被转发或丢弃。 南北向通信使用 NAT。 | [ovn-kubernetes](https://github.com/openvswitch/ovn-kubernetes) | [通过 ansible 部署](https://github.com/openvswitch/ovn-kubernetes/tree/master/contrib)。通过 Kubernetes 策略可以实施分布式 ACL。支持 IPAM。无需 kube-proxy 即可实现负载均衡。无需 iptables/netsh 即可进行 NAT。 |
+| NAT(**Kubernetes 中未使用**) | 容器被赋予一个 vNIC,连接到内部 vSwitch。DNS/DHCP 是使用一个名为 [WinNAT 的内部组件](https://techcommunity.microsoft.com/t5/virtualization/windows-nat-winnat-capabilities-and-limitations/ba-p/382303)实现的 | MAC 和 IP 重写为主机 MAC/IP。 | [nat](https://github.com/Microsoft/windows-container-networking/tree/master/plugins/nat) | 放在此处保持完整性。 |
+
+
+如上所述,Windows 通过 [VXLAN 网络后端](https://github.com/coreos/flannel/blob/master/Documentation/backends.md#vxlan)(**Beta 支持**;委派给 win-overlay)
+和 [host-gateway 网络后端](https://github.com/coreos/flannel/blob/master/Documentation/backends.md#host-gw)(稳定支持;委派给 win-bridge)
+也[支持](https://github.com/flannel-io/cni-plugin#windows-support-experimental) [Flannel](https://github.com/coreos/flannel) 的 [CNI 插件](https://github.com/flannel-io/cni-plugin)。
+
+
+此插件支持委派给参考 CNI 插件(win-overlay、win-bridge)之一,配合使用 Windows
+上的 Flannel 守护程序(Flanneld),以便自动分配节点子网租赁并创建 HNS 网络。
+该插件读取自己的配置文件(cni.conf),并聚合 FlannelD 生成的 subnet.env 文件中的环境变量。
+然后,委派给网络管道的参考 CNI 插件之一,并将包含节点分配子网的正确配置发送给 IPAM 插件(例如:`host-local`)。
+
+
+对于 Node、Pod 和 Service 对象,TCP/UDP 流量支持以下网络流:
+
+* Pod → Pod(IP)
+* Pod → Pod(名称)
+* Pod → Service(集群 IP)
+* Pod → Service(PQDN,但前提是没有 ".")
+* Pod → Service(FQDN)
+* Pod → 外部(IP)
+* Pod → 外部(DNS)
+* Node → Pod
+* Pod → Node
+
+
+## IP 地址管理(IPAM) {#ipam}
+
+Windows 支持以下 IPAM 选项:
+
+* [host-local](https://github.com/containernetworking/plugins/tree/master/plugins/ipam/host-local)
+* [azure-vnet-ipam](https://github.com/Azure/azure-container-networking/blob/master/docs/ipam.md)(仅适用于 azure-cni)
+* [Windows Server IPAM](https://docs.microsoft.com/zh-cn/windows-server/networking/technologies/ipam/ipam-top)(未设置 IPAM 时的回滚选项)
+
+
+## 负载均衡和 Service {#load-balancing-and-services}
+
+Kubernetes {{< glossary_tooltip text="Service" term_id="service" >}} 是一种抽象:定义了逻辑上的一组 Pod 和一种通过网络访问这些 Pod 的方式。
+在包含 Windows 节点的集群中,你可以使用以下类别的 Service:
+
+* `NodePort`
+* `ClusterIP`
+* `LoadBalancer`
+* `ExternalName`
+
+
+Windows 容器网络与 Linux 网络有着很重要的差异。
+更多细节和背景信息,参考 [Microsoft Windows 容器网络文档](https://docs.microsoft.com/zh-cn/virtualization/windowscontainers/container-networking/architecture)。
+
+在 Windows 上,你可以使用以下设置来配置 Service 和负载均衡行为:
+
+
+{{< table caption="Windows Service 设置" >}}
+| 功能特性 | 描述 | 支持的 Windows 操作系统最低版本 | 启用方式 |
+| ------- | ----------- | -------------------------- | ------------- |
+| 会话亲和性 | 确保每次都将来自特定客户端的连接传递到同一个 Pod。 | Windows Server 2022 | 将 `service.spec.sessionAffinity` 设为 “ClientIP” |
+| Direct Server Return (DSR) | 在负载均衡模式中 IP 地址修正和 LBNAT 直接发生在容器 vSwitch 端口;服务流量到达时源 IP 设置为原始 Pod IP。 | Windows Server 2019 | 在 kube-proxy 中设置以下标志:`--feature-gates="WinDSR=true" --enable-dsr=true` |
+| 保留目标(Preserve-Destination) | 跳过服务流量的 DNAT,从而在到达后端 Pod 的数据包中保留目标服务的虚拟 IP。也会禁用节点间的转发。 | Windows Server,version 1903 | 在服务注解中设置 `"preserve-destination": "true"` 并在 kube-proxy 中启用 DSR。 |
+| IPv4/IPv6 双栈网络 | 进出集群和集群内通信都支持原生的 IPv4 间与 IPv6 间流量 | Windows Server 2019 | 参考 [IPv4/IPv6 双栈](#ipv4ipv6-dual-stack)。 |
+| 客户端 IP 保留 | 确保入站流量的源 IP 得到保留。也会禁用节点间转发。 | Windows Server 2019 | 将 `service.spec.externalTrafficPolicy` 设置为 “Local” 并在 kube-proxy 中启用 DSR。 |
+{{< /table >}}
+
+
+{{< warning >}}
+如果目的地节点在运行 Windows Server 2022,则上层网络的 NodePort Service 存在已知问题。
+要完全避免此问题,可以使用 `externalTrafficPolicy: Local` 配置服务。
+
+在安装了 KB5005619 的 Windows Server 2022 或更高版本上,采用 L2bridge 网络时
+Pod 间连接存在已知问题。
+要解决此问题并恢复 Pod 间连接,你可以在 kube-proxy 中禁用 WinDSR 功能。
+
+这些问题需要操作系统修复。
+有关更新,请参考 https://github.com/microsoft/Windows-Containers/issues/204。
+{{< /warning >}}
+
+
+## 限制 {#limitations}
+
+Windows 节点**不支持**以下网络功能:
+
+* 主机网络模式
+* 从节点本身访问本地 NodePort(可以从其他节点或外部客户端进行访问)
+* 为同一 Service 提供 64 个以上后端 Pod(或不同目的地址)
+* 在连接到上层网络的 Windows Pod 之间使用 IPv6 通信
+* 非 DSR 模式中的本地流量策略(Local Traffic Policy)
+
+
+* 通过 `win-overlay`、`win-bridge` 使用 ICMP 协议,或使用 Azure-CNI 插件进行出站通信。
+ 具体而言,Windows 数据平面([VFP](https://www.microsoft.com/research/project/azure-virtual-filtering-platform/))不支持 ICMP 数据包转换,这意味着:
+ * 指向同一网络内目的地址的 ICMP 数据包(例如 Pod 间的 ping 通信)可正常工作;
+ * TCP/UDP 数据包可正常工作;
+ * 通过远程网络指向其它地址的 ICMP 数据包(例如通过 ping 从 Pod 到外部公网的通信)无法被转换,
+ 因此无法被路由回到这些数据包的源点;
+ * 由于 TCP/UDP 数据包仍可被转换,所以在调试与外界的连接时,
+ 你可以将 `ping ` 替换为 `curl `。
+
+
+其他限制:
+
+* 由于缺少 `CHECK` 实现,Windows 参考网络插件 win-bridge 和 win-overlay 未实现
+[CNI 规约](https://github.com/containernetworking/cni/blob/master/SPEC.md) 的 v0.4.0 版本。
+* Flannel VXLAN CNI 插件在 Windows 上有以下限制:
+ * 使用 Flannel v0.12.0(或更高版本)时,节点到 Pod 的连接仅适用于本地 Pod。
+ * Flannel 仅限于使用 VNI 4096 和 UDP 端口 4789。
+ 有关这些参数的更多详细信息,请参考官方的 [Flannel VXLAN](https://github.com/coreos/flannel/blob/master/Documentation/backends.md#vxlan) 后端文档。
diff --git a/content/zh/docs/concepts/storage/_index.md b/content/zh-cn/docs/concepts/storage/_index.md
similarity index 100%
rename from content/zh/docs/concepts/storage/_index.md
rename to content/zh-cn/docs/concepts/storage/_index.md
diff --git a/content/zh/docs/concepts/storage/dynamic-provisioning.md b/content/zh-cn/docs/concepts/storage/dynamic-provisioning.md
similarity index 100%
rename from content/zh/docs/concepts/storage/dynamic-provisioning.md
rename to content/zh-cn/docs/concepts/storage/dynamic-provisioning.md
diff --git a/content/zh/docs/concepts/storage/ephemeral-volumes.md b/content/zh-cn/docs/concepts/storage/ephemeral-volumes.md
similarity index 100%
rename from content/zh/docs/concepts/storage/ephemeral-volumes.md
rename to content/zh-cn/docs/concepts/storage/ephemeral-volumes.md
diff --git a/content/zh/docs/concepts/storage/persistent-volumes.md b/content/zh-cn/docs/concepts/storage/persistent-volumes.md
similarity index 93%
rename from content/zh/docs/concepts/storage/persistent-volumes.md
rename to content/zh-cn/docs/concepts/storage/persistent-volumes.md
index fdf9e6ee50..e9b5ccc140 100644
--- a/content/zh/docs/concepts/storage/persistent-volumes.md
+++ b/content/zh-cn/docs/concepts/storage/persistent-volumes.md
@@ -374,6 +374,97 @@ However, the particular path specified in the custom recycler Pod template in th
定制回收器 Pod 模板中在 `volumes` 部分所指定的特定路径要替换为
正被回收的卷的路径。
+
+### PersistentVolume 删除保护 finalizer {#persistentvolume-deletion-protection-finalizer}
+{{< feature-state for_k8s_version="v1.23" state="alpha" >}}
+
+可以在 PersistentVolume 上添加终结器(Finalizers),以确保只有在删除对应的存储后才删除具有
+`Delete` 回收策略的 PersistentVolume。
+
+
+新引入的 `kubernetes.io/pv-controller` 和 `external-provisioner.volume.kubernetes.io/finalizer`
+终结器仅会被添加到动态制备的卷上。
+
+终结器 `kubernetes.io/pv-controller` 会被添加到树内插件卷上。
+下面是一个例子:
+
+```shell
+kubectl describe pv pvc-74a498d6-3929-47e8-8c02-078c1ece4d78
+Name: pvc-74a498d6-3929-47e8-8c02-078c1ece4d78
+Labels:
+Annotations: kubernetes.io/createdby: vsphere-volume-dynamic-provisioner
+ pv.kubernetes.io/bound-by-controller: yes
+ pv.kubernetes.io/provisioned-by: kubernetes.io/vsphere-volume
+Finalizers: [kubernetes.io/pv-protection kubernetes.io/pv-controller]
+StorageClass: vcp-sc
+Status: Bound
+Claim: default/vcp-pvc-1
+Reclaim Policy: Delete
+Access Modes: RWO
+VolumeMode: Filesystem
+Capacity: 1Gi
+Node Affinity:
+Message:
+Source:
+ Type: vSphereVolume (a Persistent Disk resource in vSphere)
+ VolumePath: [vsanDatastore] d49c4a62-166f-ce12-c464-020077ba5d46/kubernetes-dynamic-pvc-74a498d6-3929-47e8-8c02-078c1ece4d78.vmdk
+ FSType: ext4
+ StoragePolicyName: vSAN Default Storage Policy
+Events:
+```
+
+
+终结器 `external-provisioner.volume.kubernetes.io/finalizer` 会被添加到 CSI 卷上。下面是一个例子:
+
+```shell
+Name: pvc-2f0bab97-85a8-4552-8044-eb8be45cf48d
+Labels:
+Annotations: pv.kubernetes.io/provisioned-by: csi.vsphere.vmware.com
+Finalizers: [kubernetes.io/pv-protection external-provisioner.volume.kubernetes.io/finalizer]
+StorageClass: fast
+Status: Bound
+Claim: demo-app/nginx-logs
+Reclaim Policy: Delete
+Access Modes: RWO
+VolumeMode: Filesystem
+Capacity: 200Mi
+Node Affinity:
+Message:
+Source:
+ Type: CSI (a Container Storage Interface (CSI) volume source)
+ Driver: csi.vsphere.vmware.com
+ FSType: ext4
+ VolumeHandle: 44830fa8-79b4-406b-8b58-621ba25353fd
+ ReadOnly: false
+ VolumeAttributes: storage.kubernetes.io/csiProvisionerIdentity=1648442357185-8081-csi.vsphere.vmware.com
+ type=vSphere CNS Block Volume
+Events:
+```
+
+
+为特定的树内卷插件启用 `CSIMigration` 特性将删除 `kubernetes.io/pv-controller` 终结器,
+同时添加 `external-provisioner.volume.kubernetes.io/finalizer` 终结器。
+同样,禁用 `CSIMigration` 将删除 `external-provisioner.volume.kubernetes.io/finalizer` 终结器,
+同时添加 `kubernetes.io/pv-controller` 终结器。
+
#### 重设使用中 PVC 申领的大小 {#resizing-an-in-use-persistentvolumevlaim}
-{{< feature-state for_k8s_version="v1.15" state="beta" >}}
-
-
-{{< note >}}
-Kubernetes 从 1.15 版本开始将调整使用中 PVC 申领大小这一能力作为 Beta
-特性支持;该特性在 1.11 版本以来处于 Alpha 阶段。
-`ExpandInUsePersistentVolumes` 特性必须被启用;在很多集群上,与此类似的
-Beta 阶段的特性是自动启用的。
-可参考[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
-文档了解更多信息。
-{{< /note >}}
+{{< feature-state for_k8s_version="v1.24" state="stable" >}}
{{< note >}}
Kubernetes 从 1.23 版本开始将允许用户恢复失败的 PVC 扩展这一能力作为
-alpha 特性支持。 `RecoverVolumeExpansionFailure` 必须被启用以允许使用此功能。
+alpha 特性支持。 `RecoverVolumeExpansionFailure` 必须被启用以允许使用此特性。
可参考[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
文档了解更多信息。
{{< /note >}}
-如果集群中的特性门控 `ExpandPersistentVolumes` 和 `RecoverVolumeExpansionFailure`
-都已启用,在 PVC 的扩展发生失败时,你可以使用比先前请求的值更小的尺寸来重试扩展。
+如果集群中的特性门控 `RecoverVolumeExpansionFailure`
+已启用,在 PVC 的扩展发生失败时,你可以使用比先前请求的值更小的尺寸来重试扩展。
要使用一个更小的尺寸尝试请求新的扩展,请编辑该 PVC 的 `.spec.resources` 并选择
一个比你之前所尝试的值更小的值。
如果由于容量限制而无法成功扩展至更高的值,这将很有用。
@@ -933,6 +1012,23 @@ In the CLI, the access modes are abbreviated to:
* RWX - ReadWriteMany
* RWOP - ReadWriteOncePod
+{{< note >}}
+
+Kubernetes 使用卷访问模式来匹配 PersistentVolumeClaim 和 PersistentVolume。
+在某些场合下,卷访问模式也会限制 PersistentVolume 可以挂载的位置。
+卷访问模式并**不会**在存储已经被挂载的情况下为其实施写保护。
+即使访问模式设置为 ReadWriteOnce、ReadOnlyMany 或 ReadWriteMany,它们也不会对卷形成限制。
+例如,即使某个卷创建时设置为 ReadOnlyMany,也无法保证该卷是只读的。
+如果访问模式设置为 ReadWriteOncePod,则卷会被限制起来并且只能挂载到一个 Pod 上。
+{{< /note >}}
+
@@ -1411,10 +1507,7 @@ spec:
## Volume populators and data sources
-Kubernetes supports custom volume populators; this alpha feature was introduced
-in Kubernetes 1.18. Kubernetes 1.22 reimplemented the mechanism with a redesigned API.
-Check that you are reading the version of the Kubernetes documentation that matches your
-cluster. {{% version-check %}}
+Kubernetes supports custom volume populators.
To use custom volume populators, you must enable the `AnyVolumeDataSource`
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for
the kube-apiserver and kube-controller-manager.
@@ -1428,13 +1521,11 @@ gate enabled, use of the `dataSourceRef` is preferred over `dataSource`.
## 卷填充器(Populator)与数据源 {#volume-populators-and-data-sources}
-{{< feature-state for_k8s_version="v1.22" state="alpha" >}}
+{{< feature-state for_k8s_version="v1.24" state="beta" >}}
{{< note >}}
-Kubernetes 支持自定义的卷填充器;Kubernetes 1.18 版本引入了这个 alpha 特性。
-Kubernetes 1.22 使用重新设计的 API 重新实现了该机制。
-确认你正在阅读与你的集群版本一致的 Kubernetes 文档。{{% version-check %}}
-要使用自定义的卷填充器,你必须为 kube-apiserver 和 kube-controller-manager 启用 `AnyVolumeDataSource`
+Kubernetes 支持自定义的卷填充器;要使用自定义的卷填充器,你必须为
+kube-apiserver 和 kube-controller-manager 启用 `AnyVolumeDataSource`
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)。
{{< /note >}}
@@ -1630,7 +1721,7 @@ Volume snapshot feature was added to support CSI Volume Plugins only. For detail
To enable support for restoring a volume from a volume snapshot data source, enable the
`VolumeSnapshotDataSource` feature gate on the apiserver and controller-manager.
-->
-卷快照(Volume Snapshot)功能的添加仅是为了支持 CSI 卷插件。
+卷快照(Volume Snapshot)特性的添加仅是为了支持 CSI 卷插件。
有关细节可参阅[卷快照](/zh/docs/concepts/storage/volume-snapshots/)文档。
要启用从卷快照数据源恢复数据卷的支持,可在 API 服务器和控制器管理器上启用
@@ -1747,11 +1838,11 @@ and need persistent storage, it is recommended that you use the following patter
* 进一步了解[创建持久卷](/zh/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolume).
* 进一步学习[创建 PVC 申领](/zh/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolumeclaim).
-* 阅读[持久存储的设计文档](https://git.k8s.io/community/contributors/design-proposals/storage/persistent-storage.md).
+* 阅读[持久存储的设计文档](https://github.com/kubernetes/design-proposals-archive/blob/main/storage/persistent-storage.md).
Container 中的文件在磁盘上是临时存放的,这给 Container 中运行的较重要的应用程序带来一些问题。
问题之一是当容器崩溃时文件丢失。
@@ -33,10 +34,7 @@ kubelet 会重新启动容器,但容器会以干净的状态重启。
Kubernetes {{< glossary_tooltip text="卷(Volume)" term_id="volume" >}}
这一抽象概念能够解决这两个问题。
-
-阅读本文前建议你熟悉一下 [Pods](/zh/docs/concepts/workloads/pods)。
+阅读本文前建议你熟悉一下 [Pod](/zh-cn/docs/concepts/workloads/pods)。
@@ -120,15 +118,21 @@ Kubernetes supports several types of Volumes:
Kubernetes 支持下列类型的卷:
-### awsElasticBlockStore {#awselasticblockstore}
-
+### awsElasticBlockStore (已弃用) {#awselasticblockstore}
+
+{{< feature-state for_k8s_version="v1.17" state="deprecated" >}}
+
`awsElasticBlockStore` 卷将 Amazon Web服务(AWS)[EBS 卷](https://aws.amazon.com/ebs/)
挂载到你的 Pod 中。与 `emptyDir` 在 Pod 被删除时也被删除不同,EBS 卷的内容在删除 Pod
时会被保留,卷只是被卸载掉了。
@@ -239,13 +243,18 @@ and the kubelet, set the `InTreePluginAWSUnregister` flag to `true`.
要禁止控制器管理器和 kubelet 加载 `awsElasticBlockStore` 存储插件,
请将 `InTreePluginAWSUnregister` 标志设置为 `true`。
-### azureDisk {#azuredisk}
-
+### azureDisk (已弃用) {#azuredisk}
+
+{{< feature-state for_k8s_version="v1.19" state="deprecated" >}}
`azureDisk` 卷类型用来在 Pod 上挂载 Microsoft Azure
[数据盘(Data Disk)](https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-about-disks-vhds/) 。
@@ -256,22 +265,21 @@ For more details, see the [`azureDisk` volume plugin](https://github.com/kuberne
-->
#### azureDisk 的 CSI 迁移 {#azuredisk-csi-migration}
-{{< feature-state for_k8s_version="v1.19" state="beta" >}}
+{{< feature-state for_k8s_version="v1.24" state="stable" >}}
-启用 `azureDisk` 的 `CSIMigration` 功能后,所有插件操作从现有的树内插件重定向到
+启用 `azureDisk` 的 `CSIMigration` 特性后,所有插件操作从现有的树内插件重定向到
`disk.csi.azure.com` 容器存储接口(CSI)驱动程序。
-为了使用此功能,必须在集群中安装
+为了使用此特性,必须在集群中安装
[Azure 磁盘 CSI 驱动程序](https://github.com/kubernetes-sigs/azuredisk-csi-driver),
-并且 `CSIMigration` 和 `CSIMigrationAzureDisk` 功能必须被启用。
+并且 `CSIMigration` 特性必须被启用。
+### azureFile (已弃用) {#azurefile}
+
+{{< feature-state for_k8s_version="v1.21" state="deprecated" >}}
+
`azureFile` 卷类型用来在 Pod 上挂载 Microsoft Azure 文件卷(File Volume)(SMB 2.1 和 3.0)。
更多详情请参考 [`azureFile` 卷插件](https://github.com/kubernetes/examples/tree/master/staging/volumes/azure_file/README.md)。
@@ -314,18 +328,19 @@ Driver](https://github.com/kubernetes-sigs/azurefile-csi-driver)
must be installed on the cluster and the `CSIMigration` and `CSIMigrationAzureFile`
[feature gates](/docs/reference/command-line-tools-reference/feature-gates/) must be enabled.
-->
-启用 `azureFile` 的 `CSIMigration` 功能后,所有插件操作将从现有的树内插件重定向到
-`file.csi.azure.com` 容器存储接口(CSI)驱动程序。要使用此功能,必须在集群中安装
+启用 `azureFile` 的 `CSIMigration` 特性后,所有插件操作将从现有的树内插件重定向到
+`file.csi.azure.com` 容器存储接口(CSI)驱动程序。要使用此特性,必须在集群中安装
[Azure 文件 CSI 驱动程序](https://github.com/kubernetes-sigs/azurefile-csi-driver),
并且 `CSIMigration` 和 `CSIMigrationAzureFile`
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
必须被启用。
Azure 文件 CSI 驱动尚不支持为同一卷设置不同的 fsgroup。
-如果 AzureFile CSI 迁移被启用,用不同的 fsgroup 来使用同一卷也是不被支持的。
+如果 `CSIMigrationAzureFile` 特性被启用,用不同的 fsgroup 来使用同一卷也是不被支持的。
更多信息请参考 [CephFS 示例](https://github.com/kubernetes/examples/tree/master/volumes/cephfs/)。
-### cinder {#cinder}
+
+### cinder (已弃用) {#cinder}
+{{< feature-state for_k8s_version="v1.18" state="deprecated" >}}
+
+{{< note >}}
-{{< note >}}
Kubernetes 必须配置了 OpenStack Cloud Provider。
{{< /note >}}
`cinder` 卷类型用于将 OpenStack Cinder 卷挂载到 Pod 中。
-#### Cinder 卷示例配置
+
+#### Cinder 卷示例配置 {#cinder-volume-example-configuration}
```yaml
apiVersion: v1
@@ -413,29 +434,31 @@ spec:
-->
#### OpenStack CSI 迁移
-{{< feature-state for_k8s_version="v1.21" state="beta" >}}
+{{< feature-state for_k8s_version="v1.24" state="stable" >}}
-Cinder 的 `CSIMigration` 功能在 Kubernetes 1.21 版本中是默认被启用的。
+自 Kubernetes 1.21 版本起,Cinder 的 `CSIMigration` 特性是默认被启用的。
此特性会将插件的所有操作从现有的树内插件重定向到
`cinder.csi.openstack.org` 容器存储接口(CSI)驱动程序。
-为了使用此功能,必须在集群中安装
+为了使用此特性,必须在集群中安装
[OpenStack Cinder CSI 驱动程序](https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/cinder-csi-plugin/using-cinder-csi-plugin.md),
你可以通过设置 `CSIMigrationOpenStack`
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
为 `false` 来禁止 Cinder CSI 迁移。
-如果你禁用了 `CSIMigrationOpenStack` 功能特性,则树内的 Cinder 卷插件
-会负责 Cinder 卷存储管理的方方面面。
+
+
+要禁止控制器管理器和 kubelet 加载树内 Cinder 插件,你可以启用
+`InTreePluginOpenStackUnregister` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)。
### configMap
@@ -783,8 +806,8 @@ within the same region. In order to use this feature, the volume must be provisi
as a PersistentVolume; referencing the volume directly from a Pod is not supported.
-->
[区域持久盘](https://cloud.google.com/compute/docs/disks/#repds)
-功能允许你创建能在同一区域的两个可用区中使用的持久盘。
-要使用这个功能,必须以持久卷(PersistentVolume)的方式提供卷;直接从
+特性允许你创建能在同一区域的两个可用区中使用的持久盘。
+要使用这个特性,必须以持久卷(PersistentVolume)的方式提供卷;直接从
Pod 引用这种卷是不可以的。
-启用 GCE PD 的 `CSIMigration` 功能后,所有插件操作将从现有的树内插件重定向到
+启用 GCE PD 的 `CSIMigration` 特性后,所有插件操作将从现有的树内插件重定向到
`pd.csi.storage.gke.io` 容器存储接口( CSI )驱动程序。
-为了使用此功能,必须在集群中上安装
+为了使用此特性,必须在集群中上安装
[GCE PD CSI驱动程序](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver),
-并且 `CSIMigration` 和 `CSIMigrationGCE` Beta 功能必须被启用。
+并且 `CSIMigration` 和 `CSIMigrationGCE` Beta 特性必须被启用。
-启用 RBD 的 `CSIMigration` 功能后,所有插件操作从现有的树内插件重定向到
+启用 RBD 的 `CSIMigration` 特性后,所有插件操作从现有的树内插件重定向到
`rbd.csi.ceph.com` {{}} 驱动程序。
-要使用该功能,必须在集群内安装
+要使用该特性,必须在集群内安装
[Ceph CSI 驱动](https://github.com/ceph/ceph-csi),并启用 `CSIMigration` 和 `csiMigrationRBD`
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)。
@@ -1601,15 +1624,13 @@ For more information about StorageOS, dynamic provisioning, and PersistentVolume
关于 StorageOS 的进一步信息、动态供应和持久卷申领等等,请参考
[StorageOS 示例](https://github.com/kubernetes/examples/blob/master/volumes/storageos)。
-### vsphereVolume {#vspherevolume}
+### vsphereVolume(弃用) {#vspherevolume}
{{< note >}}
-你必须配置 Kubernetes 的 vSphere 云驱动。云驱动的配置方法请参考
-[vSphere 使用指南](https://vmware.github.io/vsphere-storage-for-kubernetes/documentation/)。
+建议你改用 vSphere CSI 树外驱动程序。
{{< /note >}}
-{{< caution >}}
-在挂载到 Pod 之前,你必须用下列方式之一创建 VMDK。
-{{< /caution >}}
-
-
-#### 创建 VMDK 卷 {#creating-vmdk-volume}
-
-选择下列方式之一创建 VMDK。
-
-{{< tabs name="tabs_volumes" >}}
-{{% tab name="使用 vmkfstools 创建" %}}
-
-首先 ssh 到 ESX,然后使用下面的命令来创建 VMDK:
-
-```shell
-vmkfstools -c 2G /vmfs/volumes/DatastoreName/volumes/myDisk.vmdk
-```
-{{% /tab %}}
-{{% tab name="使用 vmware-vdiskmanager 创建" %}}
-
-使用下面的命令创建 VMDK:
-
-```shell
-vmware-vdiskmanager -c -t 0 -s 40GB -a lsilogic myDisk.vmdk
-```
-{{% /tab %}}
-
-{{< /tabs >}}
-
-
-
-#### vSphere VMDK 配置示例 {#vsphere-vmdk-configuration}
-
-```yaml
-apiVersion: v1
-kind: Pod
-metadata:
- name: test-vmdk
-spec:
- containers:
- - image: k8s.gcr.io/test-webserver
- name: test-container
- volumeMounts:
- - mountPath: /test-vmdk
- name: test-volume
- volumes:
- - name: test-volume
- # 此 VMDK 卷必须已经存在
- vsphereVolume:
- volumePath: "[DatastoreName] volumes/myDisk"
- fsType: ext4
-```
-
@@ -1710,10 +1669,26 @@ must be installed on the cluster and the `CSIMigration` and `CSIMigrationvSphere
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)。
-此特性还要求 vSphere vCenter/ESXi 的版本至少为 7.0u1,且 HW 版本至少为
-VM version 15。
+你可以在 VMware 的文档页面
+[迁移树内 vSphere 卷插件到 vSphere 容器存储插件](https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.0/vmware-vsphere-csp-getting-started/GUID-968D421F-D464-4E22-8127-6CB9FF54423F.html)
+中找到有关如何迁移的其他建议。
+
+为了迁移到树外 CSI 驱动程序,Kubernetes v{{< skew currentVersion >}}
+要求你使用 vSphere 7.0u2 或更高版本。
+如果你正在运行 v{{< skew currentVersion >}} 以外的 Kubernetes 版本,
+请查阅该 Kubernetes 版本的文档。
+如果你正在运行 Kubernetes v{{< skew currentVersion >}} 和旧版本的 vSphere,
+请考虑至少升级到 vSphere 7.0u2。
{{< note >}}
-Kubernetes 1.23 中加入了 Portworx 的 `CSIMigration` 功能,但默认不会启用,因为该功能仍处于 alpha 阶段。
-该功能会将所有的插件操作从现有的树内插件重定向到
+Kubernetes 1.23 中加入了 Portworx 的 `CSIMigration` 特性,但默认不会启用,因为该特性仍处于 alpha 阶段。
+该特性会将所有的插件操作从现有的树内插件重定向到
`pxd.portworx.com` 容器存储接口(Container Storage Interface, CSI)驱动程序。
集群中必须安装
[Portworx CSI 驱动](https://docs.portworx.com/portworx-install-with-kubernetes/storage-operations/csi/)。
-要启用此功能,请在 kube-controller-manager 和 kubelet 中设置 `CSIMigrationPortworx=true`。
+要启用此特性,请在 kube-controller-manager 和 kubelet 中设置 `CSIMigrationPortworx=true`。
有关如何开发 CSI 驱动的更多信息,请参考 [kubernetes-csi 文档](https://kubernetes-csi.github.io/docs/)。
+
+#### Windows CSI 代理 {#windows-csi-proxy}
+
+{{< feature-state for_k8s_version="v1.22" state="stable" >}}
+
+
+CSI 节点插件需要执行多种特权操作,例如扫描磁盘设备和挂载文件系统等。
+这些操作在每个宿主操作系统上都是不同的。对于 Linux 工作节点而言,容器化的 CSI
+节点插件通常部署为特权容器。对于 Windows 工作节点而言,容器化 CSI
+节点插件的特权操作是通过 [csi-proxy](https://github.com/kubernetes-csi/csi-proxy)
+来支持的。csi-proxy 是一个由社区管理的、独立的可执行二进制文件,
+需要被预安装到每个 Windows 节点上。
+
+要了解更多的细节,可以参考你要部署的 CSI 插件的部署指南。
+
@@ -2170,19 +2171,30 @@ configuration changes to existing Storage Classes, PersistentVolumes or Persiste
The operations and features that are supported include:
provisioning/delete, attach/detach, mount/unmount and resizing of volumes.
-
-In-tree plugins that support `CSIMigration` and have a corresponding CSI driver implemented
-are listed in [Types of Volumes](#volume-types).
-->
-启用 `CSIMigration` 功能后,针对现有树内插件的操作会被重定向到相应的 CSI 插件(应已安装和配置)。
+启用 `CSIMigration` 特性后,针对现有树内插件的操作会被重定向到相应的 CSI 插件(应已安装和配置)。
因此,操作员在过渡到取代树内插件的 CSI 驱动时,无需对现有存储类、PV 或 PVC(指树内插件)进行任何配置更改。
-所支持的操作和功能包括:配备(Provisioning)/删除、挂接(Attach)/解挂(Detach)、
+所支持的操作和特性包括:配备(Provisioning)/删除、挂接(Attach)/解挂(Detach)、
挂载(Mount)/卸载(Unmount)和调整卷大小。
+
上面的[卷类型](#volume-types)节列出了支持 `CSIMigration` 并已实现相应 CSI
驱动程序的树内插件。
+下面是支持 Windows 节点上持久性存储的树内插件:
+
+* [`awsElasticBlockStore`](#awselasticblockstore)
+* [`azureDisk`](#azuredisk)
+* [`azureFile`](#azurefile)
+* [`gcePersistentDisk`](#gcepersistentdisk)
+* [`vsphereVolume`](#vspherevolume)
+
### flexVolume
{{< feature-state for_k8s_version="v1.23" state="deprecated" >}}
@@ -2202,14 +2214,24 @@ FlexVolume 是一个使用基于 exec 的模型来与驱动程序对接的树外
Pod 通过 `flexvolume` 树内插件与 FlexVolume 驱动程序交互。
更多详情请参考 FlexVolume [README](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-storage/flexvolume.md#readme) 文档。
+
+下面的 FlexVolume [插件](https://github.com/Microsoft/K8s-Storage-Plugins/tree/master/flexvolume/windows)
+以 PowerShell 脚本的形式部署在宿主系统上,支持 Windows 节点:
+
+* [SMB](https://github.com/microsoft/K8s-Storage-Plugins/tree/master/flexvolume/windows/plugins/microsoft.com~smb.cmd)
+* [iSCSI](https://github.com/microsoft/K8s-Storage-Plugins/tree/master/flexvolume/windows/plugins/microsoft.com~iscsi.cmd)
+
+{{< note >}}
-{{< note >}}
-FlexVolume 已弃用。推荐使用树外 CSI 驱动来将外部存储整合进 Kubernetes。
+FlexVolume 已被弃用。推荐使用树外 CSI 驱动来将外部存储整合进 Kubernetes。
FlexVolume 驱动的维护者应开发一个 CSI 驱动并帮助用户从 FlexVolume 驱动迁移到 CSI。
FlexVolume 用户应迁移工作负载以使用对等的 CSI 驱动。
@@ -2334,10 +2356,8 @@ sudo systemctl restart docker
## {{% heading "whatsnext" %}}
-
-
参考[使用持久卷部署 WordPress 和 MySQL](/zh/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/) 示例。
diff --git a/content/zh-cn/docs/concepts/storage/windows-storage.md b/content/zh-cn/docs/concepts/storage/windows-storage.md
new file mode 100644
index 0000000000..142fadae0c
--- /dev/null
+++ b/content/zh-cn/docs/concepts/storage/windows-storage.md
@@ -0,0 +1,132 @@
+---
+title: Windows 存储
+content_type: concept
+---
+
+
+
+
+此页面提供特定于 Windows 操作系统的存储概述。
+
+
+
+## 持久存储 {#storage}
+Windows 有一个分层文件系统驱动程序用来挂载容器层和创建基于 NTFS 的文件系统拷贝。
+容器中的所有文件路径仅在该容器的上下文中解析。
+
+
+* 使用 Docker 时,卷挂载只能是容器中的目录,而不能是单个文件。此限制不适用于 containerd。
+* 卷挂载不能将文件或目录映射回宿主文件系统。
+* 不支持只读文件系统,因为 Windows 注册表和 SAM 数据库始终需要写访问权限。不过,Windows 支持只读的卷。
+* 不支持卷的用户掩码和访问许可,因为宿主与容器之间并不共享 SAM,二者之间不存在映射关系。
+ 所有访问许可都是在容器上下文中解析的。
+
+
+因此,Windows 节点不支持以下存储功能:
+
+
+* 卷子路径挂载:只能在 Windows 容器上挂载整个卷
+* Secret 的子路径挂载
+* 宿主挂载映射
+* 只读的根文件系统(映射的卷仍然支持 `readOnly`)
+* 块设备映射
+* 内存作为存储介质(例如 `emptyDir.medium` 设置为 `Memory`)
+* 类似 UID/GID、各用户不同的 Linux 文件系统访问许可等文件系统特性
+* 使用 [DefaultMode 设置 Secret 权限](/zh/docs/concepts/configuration/secret/#secret-files-permissions)
+ (因为该特性依赖 UID/GID)
+* 基于 NFS 的存储和卷支持
+* 扩展已挂载卷(resizefs)
+
+
+使用 Kubernetes {{< glossary_tooltip text="卷" term_id="volume" >}},
+对数据持久性和 Pod 卷共享有需求的复杂应用也可以部署到 Kubernetes 上。
+管理与特定存储后端或协议相关的持久卷时,相关的操作包括:对卷的制备(Provisioning)、
+去配(De-provisioning)和调整大小,将卷挂接到 Kubernetes 节点或从节点上解除挂接,
+将卷挂载到需要持久数据的 Pod 中的某容器上或从容器上卸载。
+
+
+卷管理组件作为 Kubernetes 卷[插件](/zh/docs/concepts/storage/volumes/#types-of-volumes)发布。
+Windows 支持以下类型的 Kubernetes 卷插件:
+
+
+* [`FlexVolume plugins`](/zh/docs/concepts/storage/volumes/#flexVolume)
+ * 请注意自 1.23 版本起,FlexVolume 已被弃用
+* [`CSI Plugins`](/zh/docs/concepts/storage/volumes/#csi)
+
+
+##### 树内(In-Tree)卷插件 {#in-tree-volume-plugins}
+
+以下树内(In-Tree)插件支持 Windows 节点上的持久存储:
+
+
+* [`awsElasticBlockStore`](/zh/docs/concepts/storage/volumes/#awselasticblockstore)
+* [`azureDisk`](/zh/docs/concepts/storage/volumes/#azuredisk)
+* [`azureFile`](/zh/docs/concepts/storage/volumes/#azurefile)
+* [`gcePersistentDisk`](/zh/docs/concepts/storage/volumes/#gcepersistentdisk)
+* [`vsphereVolume`](/zh/docs/concepts/storage/volumes/#vspherevolume)
\ No newline at end of file
diff --git a/content/zh-cn/docs/concepts/windows/_index.md b/content/zh-cn/docs/concepts/windows/_index.md
new file mode 100644
index 0000000000..a78ddcfe75
--- /dev/null
+++ b/content/zh-cn/docs/concepts/windows/_index.md
@@ -0,0 +1,8 @@
+---
+title: "Kubernetes 中的 Windows"
+weight: 50
+---
+
diff --git a/content/zh-cn/docs/concepts/windows/intro.md b/content/zh-cn/docs/concepts/windows/intro.md
new file mode 100644
index 0000000000..fb44b155a3
--- /dev/null
+++ b/content/zh-cn/docs/concepts/windows/intro.md
@@ -0,0 +1,721 @@
+---
+title: Kubernetes 中的 Windows 容器
+content_type: concept
+weight: 65
+---
+
+
+
+
+在许多组织中,所运行的很大一部分服务和应用是 Windows 应用。
+[Windows 容器](https://aka.ms/windowscontainers)提供了一种封装进程和包依赖项的方式,
+从而简化了 DevOps 实践,令 Windows 应用程序同样遵从云原生模式。
+
+对于同时投入基于 Windows 应用和 Linux 应用的组织而言,他们不必寻找不同的编排系统来管理其工作负载,
+使其跨部署的运营效率得以大幅提升,而不必关心所用的操作系统。
+
+
+
+
+## Kubernetes 中的 Windows 节点 {#windows-nodes-in-k8s}
+
+若要在 Kubernetes 中启用对 Windows 容器的编排,可以在现有的 Linux 集群中包含 Windows 节点。
+在 Kubernetes 上调度 {{< glossary_tooltip text="Pod" term_id="pod" >}} 中的 Windows 容器与调度基于 Linux 的容器类似。
+
+为了运行 Windows 容器,你的 Kubernetes 集群必须包含多个操作系统。
+尽管你只能在 Linux 上运行{{< glossary_tooltip text="控制平面" term_id="control-plane" >}},
+你可以部署运行 Windows 或 Linux 的工作节点。
+
+
+支持 Windows {{< glossary_tooltip text="节点" term_id="node" >}}的前提是操作系统为 Windows Server 2019。
+
+本文使用术语 **Windows 容器**表示具有进程隔离能力的 Windows 容器。
+Kubernetes 不支持使用
+[Hyper-V 隔离能力](https://docs.microsoft.com/zh-cn/virtualization/windowscontainers/manage-containers/hyperv-container)来运行
+Windows 容器。
+
+
+## 兼容性与局限性 {#limitations}
+
+某些节点层面的功能特性仅在使用特定[容器运行时](#container-runtime)时才可用;
+另外一些特性则在 Windows 节点上不可用,包括:
+
+* 巨页(HugePages):Windows 容器当前不支持。
+* 特权容器:Windows 容器当前不支持。
+ [HostProcess 容器](/zh/docs/tasks/configure-pod-container/create-hostprocess-pod/)提供类似功能。
+* TerminationGracePeriod:需要 containerD。
+
+
+Windows 节点并不支持共享命名空间的所有功能特性。
+有关更多详细信息,请参考 [API 兼容性](#api)。
+
+有关 Kubernetes 测试时所使用的 Windows 版本的详细信息,请参考 [Windows 操作系统版本兼容性](#windows-os-version-support)。
+
+从 API 和 kubectl 的角度来看,Windows 容器的行为与基于 Linux 的容器非常相似。
+然而,在本节所概述的一些关键功能上,二者存在一些显著差异。
+
+
+### 与 Linux 比较 {#comparison-with-Linux-similarities}
+
+Kubernetes 关键组件在 Windows 上的工作方式与在 Linux 上相同。
+本节介绍几个关键的工作负载抽象及其如何映射到 Windows。
+
+
+* [Pod](/zh/docs/concepts/workloads/pods/)
+
+ Pod 是 Kubernetes 的基本构建块,是可以创建或部署的最小和最简单的单元。
+ 你不可以在同一个 Pod 中部署 Windows 和 Linux 容器。
+ Pod 中的所有容器都调度到同一 Node 上,每个 Node 代表一个特定的平台和体系结构。
+ Windows 容器支持以下 Pod 能力、属性和事件:
+
+ * 每个 Pod 有一个或多个容器,具有进程隔离和卷共享能力
+ * Pod `status` 字段
+ * 就绪、存活和启动探针
+ * postStart 和 preStop 容器生命周期回调
+ * ConfigMap 和 Secret:作为环境变量或卷
+ * `emptyDir` 卷
+ * 命名管道形式的主机挂载
+ * 资源限制
+ * 操作系统字段:
+
+ `.spec.os.name` 字段应设置为 `windows` 以表明当前 Pod 使用 Windows 容器。
+ 需要启用 `IdentifyPodOS` 特性门控才能让这个字段被识别。
+
+ {{< note >}}
+ 从 1.24 开始,`IdentifyPodOS` 特性门控进入 Beta 阶段,默认启用。
+ {{< /note >}}
+
+ 如果 `IdentifyPodOS` 特性门控已启用并且你将 `.spec.os.name` 字段设置为 `windows`,
+ 则你不得在对应 Pod 的 `.spec` 中设置以下字段:
+
+ * `spec.hostPID`
+ * `spec.hostIPC`
+ * `spec.securityContext.seLinuxOptions`
+ * `spec.securityContext.seccompProfile`
+ * `spec.securityContext.fsGroup`
+ * `spec.securityContext.fsGroupChangePolicy`
+ * `spec.securityContext.sysctls`
+ * `spec.shareProcessNamespace`
+ * `spec.securityContext.runAsUser`
+ * `spec.securityContext.runAsGroup`
+ * `spec.securityContext.supplementalGroups`
+ * `spec.containers[*].securityContext.seLinuxOptions`
+ * `spec.containers[*].securityContext.seccompProfile`
+ * `spec.containers[*].securityContext.capabilities`
+ * `spec.containers[*].securityContext.readOnlyRootFilesystem`
+ * `spec.containers[*].securityContext.privileged`
+ * `spec.containers[*].securityContext.allowPrivilegeEscalation`
+ * `spec.containers[*].securityContext.procMount`
+ * `spec.containers[*].securityContext.runAsUser`
+ * `spec.containers[*].securityContext.runAsGroup`
+
+ 在上述列表中,通配符(`*`)表示列表中的所有项。
+ 例如,`spec.containers[*].securityContext` 指代所有容器的 SecurityContext 对象。
+ 如果指定了这些字段中的任意一个,则 API 服务器不会接受此 Pod。
+
+
+* [工作负载资源](/zh/docs/concepts/workloads/controllers/)包括:
+
+ * ReplicaSet
+ * Deployment
+ * StatefulSet
+ * DaemonSet
+ * Job
+ * CronJob
+ * ReplicationController
+
+* {{< glossary_tooltip text="Services" term_id="service" >}}
+
+ 有关更多详细信息,请参考[负载均衡和 Service](#load-balancing-and-services)。
+
+
+Pod、工作负载资源和 Service 是在 Kubernetes 上管理 Windows 工作负载的关键元素。
+然而,它们本身还不足以在动态的云原生环境中对 Windows 工作负载进行恰当的生命周期管理。
+Kubernetes 还支持:
+
+* `kubectl exec`
+* Pod 和容器度量指标
+* {{< glossary_tooltip text="Pod 水平自动扩缩容" term_id="horizontal-pod-autoscaler" >}}
+* {{< glossary_tooltip text="资源配额" term_id="resource-quota" >}}
+* 调度器抢占
+
+
+### kubelet 的命令行选项 {#kubelet-compatibility}
+
+某些 kubelet 命令行选项在 Windows 上的行为不同,如下所述:
+
+
+* `--windows-priorityclass` 允许你设置 kubelet 进程的调度优先级
+ (参考 [CPU 资源管理](/zh/docs/concepts/configuration/windows-resource-management/#resource-management-cpu))。
+* `--kubelet-reserve`、`--system-reserve` 和 `--eviction-hard` 标志更新
+ [NodeAllocatable](/zh/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable)。
+* 未实现使用 `--enforce-node-allocable` 驱逐。
+* 未实现使用 `--eviction-hard` 和 `--eviction-soft` 驱逐。
+* 在 Windows 节点上运行时,kubelet 没有内存或 CPU 限制。
+ `--kube-reserved` 和 `--system-reserved` 仅从 `NodeAllocatable` 中减去,并且不保证为工作负载提供的资源。
+ 有关更多信息,请参考 [Windows 节点的资源管理](/zh/docs/concepts/configuration/windows-resource-management/#resource-reservation)。
+* 未实现 `MemoryPressure` 条件。
+* kubelet 不会执行 OOM 驱逐操作。
+
+
+### API 兼容性 {#api}
+
+由于操作系统和容器运行时的缘故,Kubernetes API 在 Windows 上的工作方式存在细微差异。
+某些工作负载属性是为 Linux 设计的,无法在 Windows 上运行。
+
+从较高的层面来看,以下操作系统概念是不同的:
+
+
+* 身份 - Linux 使用 userID(UID)和 groupID(GID),表示为整数类型。
+ 用户名和组名是不规范的,它们只是 `/etc/groups` 或 `/etc/passwd` 中的别名,
+ 作为 UID+GID 的后备标识。
+ Windows 使用更大的二进制[安全标识符](https://docs.microsoft.com/zh-cn/windows/security/identity-protection/access-control/security-identifiers)(SID),
+ 存放在 Windows 安全访问管理器(Security Access Manager,SAM)数据库中。
+ 此数据库在主机和容器之间或容器之间不共享。
+* 文件权限 - Windows 使用基于 SID 的访问控制列表,
+ 而像 Linux 使用基于对象权限和 UID+GID 的位掩码(POSIX 系统)以及**可选的**访问控制列表。
+* 文件路径 - Windows 上的约定是使用 `\` 而不是 `/`。
+ Go IO 库通常接受两者,能让其正常工作,但当你设置要在容器内解读的路径或命令行时,
+ 可能需要用 `\`。
+
+
+* 信号 - Windows 交互式应用处理终止的方式不同,可以实现以下一种或多种:
+ * UI 线程处理包括 `WM_CLOSE` 在内准确定义的消息。
+ * 控制台应用使用控制处理程序(Control Handler)处理 Ctrl-C 或 Ctrl-Break。
+ * 服务会注册可接受 `SERVICE_CONTROL_STOP` 控制码的服务控制处理程序(Service Control Handler)函数。
+
+容器退出码遵循相同的约定,其中 0 表示成功,非零表示失败。
+具体的错误码在 Windows 和 Linux 中可能不同。
+但是,从 Kubernetes 组件(kubelet、kube-proxy)传递的退出码保持不变。
+
+
+##### 容器规范的字段兼容性 {#compatibility-v1-pod-spec-containers}
+
+以下列表记录了 Pod 容器规范在 Windows 和 Linux 之间的工作方式差异:
+
+* 巨页(Huge page)在 Windows 容器运行时中未实现,且不可用。
+ 巨页需要不可为容器配置的[用户特权生效](https://docs.microsoft.com/zh-cn/windows/win32/memory/large-page-support)。
+* `requests.cpu` 和 `requests.memory` -
+ 从节点可用资源中减去请求,因此请求可用于避免一个节点过量供应。
+ 但是,请求不能用于保证已过量供应的节点中的资源。
+ 如果运营商想要完全避免过量供应,则应将设置请求作为最佳实践应用到所有容器。
+
+* `securityContext.allowPrivilegeEscalation` -
+ 不能在 Windows 上使用;所有权能字都无法生效。
+* `securityContext.capabilities` - POSIX 权能未在 Windows 上实现。
+* `securityContext.privileged` - Windows 不支持特权容器。
+* `securityContext.procMount` - Windows 没有 `/proc` 文件系统。
+* `securityContext.readOnlyRootFilesystem` -
+ 不能在 Windows 上使用;对于容器内运行的注册表和系统进程,写入权限是必需的。
+* `securityContext.runAsGroup` - 不能在 Windows 上使用,因为不支持 GID。
+
+* `securityContext.runAsNonRoot` -
+ 此设置将阻止以 `ContainerAdministrator` 身份运行容器,这是 Windows 上与 root 用户最接近的身份。
+* `securityContext.runAsUser` - 改用 [`runAsUserName`](/zh/docs/tasks/configure-pod-container/configure-runasusername)。
+* `securityContext.seLinuxOptions` - 不能在 Windows 上使用,因为 SELinux 特定于 Linux。
+* `terminationMessagePath` - 这个字段有一些限制,因为 Windows 不支持映射单个文件。
+ 默认值为 `/dev/termination-log`,因为默认情况下它在 Windows 上不存在,所以能生效。
+
+
+##### Pod 规范的字段兼容性 {#compatibility-v1-pod}
+
+以下列表记录了 Pod 规范在 Windows 和 Linux 之间的工作方式差异:
+
+* `hostIPC` 和 `hostpid` - 不能在 Windows 上共享主机命名空间。
+* `hostNetwork` - Windows 操作系统不支持共享主机网络。
+* `dnsPolicy` - Windows 不支持将 Pod `dnsPolicy` 设为 `ClusterFirstWithHostNet`,
+ 因为未提供主机网络。Pod 始终用容器网络运行。
+* `podSecurityContext`(参见下文)
+* `shareProcessNamespace` - 这是一个 beta 版功能特性,依赖于 Windows 上未实现的 Linux 命名空间。
+ Windows 无法共享进程命名空间或容器的根文件系统(root filesystem)。
+ 只能共享网络。
+
+* `terminationGracePeriodSeconds` - 这在 Windows 上的 Docker 中没有完全实现,
+ 请参考[GitHub issue](https://github.com/moby/moby/issues/25982)。
+ 目前的行为是通过 CTRL_SHUTDOWN_EVENT 发送 ENTRYPOINT 进程,然后 Windows 默认等待 5 秒,
+ 最后使用正常的 Windows 关机行为终止所有进程。
+ 5 秒默认值实际上位于[容器内](https://github.com/moby/moby/issues/25982#issuecomment-426441183)的 Windows 注册表中,
+ 因此在构建容器时可以覆盖这个值。
+* `volumeDevices` - 这是一个 beta 版功能特性,未在 Windows 上实现。
+ Windows 无法将原始块设备挂接到 Pod。
+* `volumes`
+ * 如果你定义一个 `emptyDir` 卷,则你无法将卷源设为 `memory`。
+* 你无法为卷挂载启用 `mountPropagation`,因为这在 Windows 上不支持。
+
+
+##### Pod 安全上下文的字段兼容性 {#compatibility-v1-pod-spec-containers-securitycontext}
+
+Pod 的所有 [`securityContext`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context)
+字段都无法在 Windows 上生效。
+
+
+## 节点问题检测器 {#node-problem-detector}
+
+节点问题检测器(参考[节点健康监测](/zh/docs/tasks/debug/debug-cluster/monitor-node-health/))初步支持 Windows。
+有关更多信息,请访问该项目的 [GitHub 页面](https://github.com/kubernetes/node-problem-detector#windows)。
+
+
+### Pause 容器 {#pause-container}
+
+在 Kubernetes Pod 中,首先创建一个基础容器或 “pause” 容器来承载容器。
+在 Linux 中,构成 Pod 的 cgroup 和命名空间维持持续存在需要一个进程;
+而 pause 进程就提供了这个功能。
+属于同一 Pod 的容器(包括基础容器和工作容器)共享一个公共网络端点
+(相同的 IPv4 和/或 IPv6 地址,相同的网络端口空间)。
+Kubernetes 使用 pause 容器以允许工作容器崩溃或重启,而不会丢失任何网络配置。
+
+
+Kubernetes 维护一个多体系结构的镜像,包括对 Windows 的支持。
+对于 Kubernetes v{{< skew currentVersion >}},推荐的 pause 镜像为 `k8s.gcr.io/pause:3.6`。
+可在 GitHub 上获得[源代码](https://github.com/kubernetes/kubernetes/tree/master/build/pause)。
+
+Microsoft 维护一个不同的多体系结构镜像,支持 Linux 和 Windows amd64,
+你可以找到的镜像类似 `mcr.microsoft.com/oss/kubernetes/pause:3.6`。
+此镜像的构建与 Kubernetes 维护的镜像同源,但所有 Windows 可执行文件均由
+Microsoft 进行了[验证码签名](https://docs.microsoft.com/zh-cn/windows-hardware/drivers/install/authenticode)。
+如果你正部署到一个需要签名可执行文件的生产或类生产环境,
+Kubernetes 项目建议使用 Microsoft 维护的镜像。
+
+
+### 容器运行时 {#container-runtime}
+
+你需要将{{< glossary_tooltip text="容器运行时" term_id="container-runtime" >}}安装到集群中的每个节点,
+这样 Pod 才能在这些节点上运行。
+
+以下容器运行时适用于 Windows:
+
+{{% thirdparty-content %}}
+
+
+#### ContainerD {#containerd}
+
+{{< feature-state for_k8s_version="v1.20" state="stable" >}}
+
+对于运行 Windows 的 Kubernetes 节点,你可以使用
+{{< glossary_tooltip term_id="containerd" text="ContainerD" >}} 1.4.0+ 作为容器运行时。
+
+学习如何[在 Windows 上安装 ContainerD](/zh/docs/setup/production-environment/container-runtimes/#install-containerd)。
+
+
+{{< note >}}
+将 GMSA 和 containerd 一起用于访问 Windows
+网络共享时存在[已知限制](/zh/docs/tasks/configure-pod-container/configure-gmsa/#gmsa-limitations),
+这需要一个内核补丁。
+{{< /note >}}
+
+
+#### Mirantis 容器运行时 {#mcr}
+
+[Mirantis 容器运行时](https://docs.mirantis.com/mcr/20.10/overview.html)(MCR)
+可作为所有 Windows Server 2019 和更高版本的容器运行时。
+
+有关更多信息,请参考[在 Windows Server 上安装 MCR](https://docs.mirantis.com/mcr/20.10/install/mcr-windows.html)。
+
+
+## Windows 操作系统版本兼容性 {#windows-os-version-support}
+
+在 Windows 节点上,如果主机操作系统版本必须与容器基础镜像操作系统版本匹配,
+则会应用严格的兼容性规则。
+仅 Windows Server 2019 作为容器操作系统时,才能完全支持 Windows 容器。
+
+对于 Kubernetes v{{< skew currentVersion >}},Windows 节点(和 Pod)的操作系统兼容性如下:
+
+Windows Server LTSC release
+: Windows Server 2019
+: Windows Server 2022
+
+Windows Server SAC release
+: Windows Server version 20H2
+
+
+也适用 Kubernetes [版本偏差策略](/zh/docs/setup/release/version-skew-policy/)。
+
+
+## 获取帮助和故障排查 {#troubleshooting}
+
+对 Kubernetes 集群进行故障排查的主要帮助来源应始于[故障排查](/zh/docs/tasks/debug/)页面。
+
+本节包括了一些其他特定于 Windows 的故障排查帮助。
+日志是解决 Kubernetes 中问题的重要元素。
+确保在任何时候向其他贡献者寻求故障排查协助时随附了日志信息。
+遵照 SIG Windows
+[日志收集贡献指南](https://github.com/kubernetes/community/blob/master/sig-windows/CONTRIBUTING.md#gathering-logs)中的指示说明。
+
+
+### 报告问题和功能请求 {#report-issue-and-feature-request}
+
+如果你发现疑似 bug,或者你想提出功能请求,请按照
+[SIG Windows 贡献指南](https://github.com/kubernetes/community/blob/master/sig-windows/CONTRIBUTING.md#reporting-issues-and-feature-requests)
+新建一个 Issue。
+你应该先搜索 issue 列表,以防之前报告过这个问题,凭你对该问题的经验添加评论,
+并随附日志信息。
+Kubernetes Slack 上的 SIG Windows 频道也是一个很好的途径,
+可以在创建工单之前获得一些初始支持和故障排查思路。
+
+## {{% heading "whatsnext" %}}
+
+
+### 部署工具 {#deployment-tools}
+
+kubeadm 工具帮助你部署 Kubernetes 集群,提供管理集群的控制平面以及运行工作负载的节点。
+[添加 Windows 节点](/zh/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/)阐述了如何使用
+kubeadm 将 Windows 节点部署到你的集群。
+
+Kubernetes [集群 API](https://cluster-api.sigs.k8s.io/) 项目也提供了自动部署 Windows 节点的方式。
+
+
+### Windows 分发渠道 {#windows-distribution-channels}
+
+有关 Windows 分发渠道的详细阐述,请参考
+[Microsoft 文档](https://docs.microsoft.com/zh-cn/windows-server/get-started-19/servicing-channels-19)。
+
+有关支持模型在内的不同 Windows Server 服务渠道的信息,请参考
+[Windows Server 服务渠道](https://docs.microsoft.com/zh-cn/windows-server/get-started/servicing-channels-comparison)。
diff --git a/content/zh/docs/setup/production-environment/windows/user-guide-windows-containers.md b/content/zh-cn/docs/concepts/windows/user-guide.md
similarity index 51%
rename from content/zh/docs/setup/production-environment/windows/user-guide-windows-containers.md
rename to content/zh-cn/docs/concepts/windows/user-guide.md
index 3fcbb64e20..7b3ab57b62 100644
--- a/content/zh/docs/setup/production-environment/windows/user-guide-windows-containers.md
+++ b/content/zh-cn/docs/concepts/windows/user-guide.md
@@ -1,14 +1,13 @@
---
-title: Kubernetes 中 Windows 容器的调度指南
+title: Kubernetes 中的 Windows 容器调度指南
content_type: concept
weight: 75
---
-
-
-Windows 应用程序构成了许多组织中运行的服务和应用程序的很大一部分。
+在许多组织中运行的服务和应用程序中,Windows 应用程序构成了很大一部分。
本指南将引导你完成在 Kubernetes 中配置和部署 Windows 容器的步骤。
-
-## 目标
+## 目标 {#objectives}
-* 配置一个示例 deployment 以在 Windows 节点上运行 Windows 容器
-* (可选)使用组托管服务帐户(GMSA)为你的 Pod 配置 Active Directory 身份
+* 配置 Deployment 样例以在 Windows 节点上运行 Windows 容器
+* 在 Kubernetes 中突出 Windows 特定的功能
-
-## 在你开始之前
+## 在你开始之前 {#before-you-begin}
-* 创建一个 Kubernetes 集群,其中包括一个控制平面和
- [运行 Windows 服务器的工作节点](/zh/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/)
-* 重要的是要注意,对于 Linux 和 Windows 容器,在 Kubernetes
- 上创建和部署服务和工作负载的行为几乎相同。
- 与集群接口的 [kubectl 命令](/zh/docs/reference/kubectl/overview/)相同。
- 提供以下部分中的示例只是为了快速启动 Windows 容器的使用体验。
+* 创建一个 Kubernetes 集群,其中包含一个控制平面和一个[运行 Windows Server 的工作节点](/zh/docs/tasks/administer-cluster/kubeadm/adding-windows-nodes/)
+* 务必请注意,在 Kubernetes 上创建和部署服务和工作负载的行为方式与 Linux 和 Windows 容器的行为方式大致相同。
+ 与集群交互的 [kubectl 命令](/zh/docs/reference/kubectl/)是一致的。
+ 下一小节的示例旨在帮助你快速开始使用 Windows 容器。
-
-## 入门:部署 Windows 容器
+## 快速开始:部署 Windows 容器 {#getting-started-deploying-a-windows-container}
-要在 Kubernetes 上部署 Windows 容器,你必须首先创建一个示例应用程序。
-下面的示例 YAML 文件创建了一个简单的 Web 服务器应用程序。
-创建一个名为 `win-webserver.yaml` 的服务规约,其内容如下:
+以下示例 YAML 文件部署了一个在 Windows 容器内运行的简单 Web 服务器的应用程序。
+
+创建一个名为 `win-webserver.yaml` 的 Service 规约,其内容如下:
```yaml
apiVersion: v1
@@ -77,7 +74,7 @@ metadata:
app: win-webserver
spec:
ports:
- # the port that this service should serve on
+ # 此 Service 服务的端口
- port: 80
targetPort: 80
selector:
@@ -112,35 +109,43 @@ spec:
kubernetes.io/os: windows
```
-
{{< note >}}
-端口映射也是支持的,但为简单起见,在此示例中容器端口 80 直接暴露给服务。
+
+端口映射也是支持的,但为简单起见,此示例将容器的端口 80 直接暴露给服务。
{{< /note >}}
-
+1. 检查所有节点是否健康
- ```bash
- kubectl get nodes
- ```
+ ```bash
+ kubectl get nodes
+ ```
+
+1. 部署 Service 并监视 Pod 更新:
- ```bash
- kubectl apply -f win-webserver.yaml
- kubectl get pods -o wide -w
- ```
+ ```bash
+ kubectl apply -f win-webserver.yaml
+ kubectl get pods -o wide -w
+ ```
- When the service is deployed correctly both Pods are marked as Ready. To exit the watch command, press Ctrl+C.
+
+ 当 Service 被正确部署时,两个 Pod 都被标记为就绪(Ready)。要退出 watch 命令,请按 Ctrl+C。
+
-1. 检查所有节点是否健康:
+1. 检查部署是否成功。请验证:
- ```bash
- kubectl get nodes
- ```
+ * 使用 `kubectl get pods` 从 Linux 控制平面节点能够列出两个 Pod
+ * 跨网络的节点到 Pod 通信,从 Linux 控制平面节点上执行 `curl` 访问
+ Pod IP 的 80 端口以检查 Web 服务器响应
+ * Pod 间通信,使用 docker exec 或 kubectl exec
+ 在 Pod 之间(以及跨主机,如果你有多个 Windows 节点)互 ping
+ * Service 到 Pod 的通信,在 Linux 控制平面节点以及独立的 Pod 中执行 `curl`
+ 访问虚拟的服务 IP(在 `kubectl get services` 下查看)
+ * 服务发现,使用 Kubernetes [默认 DNS 后缀](/zh/docs/concepts/services-networking/dns-pod-service/#services)的服务名称,
+ 用 `curl` 访问服务名称
+ * 入站连接,在 Linux 控制平面节点或集群外的机器上执行 `curl` 来访问 NodePort 服务
+ * 出站连接,使用 kubectl exec,从 Pod 内部执行 `curl` 访问外部 IP
-1. 部署服务并观察 pod 更新:
-
- ```bash
- kubectl apply -f win-webserver.yaml
- kubectl get pods -o wide -w
- ```
-
- 正确部署服务后,两个 Pod 都标记为“Ready”。要退出 watch 命令,请按 Ctrl + C。
-
-1. 检查部署是否成功。验证:
-
- * Windows 节点上每个 Pod 有两个容器,使用 `docker ps`
- * Linux 控制平面节点列出两个 Pod,使用 `kubectl get pods`
- * 跨网络的节点到 Pod 通信,从 Linux 控制平面节点 `curl` 你的 pod IPs 的端口80,以检查 Web 服务器响应
- * Pod 到 Pod 的通信,使用 docker exec 或 kubectl exec 在 Pod 之间
- (以及跨主机,如果你有多个 Windows 节点)进行 ping 操作
- * 服务到 Pod 的通信,从 Linux 控制平面节点和各个 Pod 中 `curl` 虚拟服务 IP
- (在 `kubectl get services` 下可见)
- * 服务发现,使用 Kubernetes `curl` 服务名称
- [默认 DNS 后缀](/zh/docs/concepts/services-networking/dns-pod-service/#services)
- * 入站连接,从 Linux 控制平面节点或集群外部的计算机 `curl` NodePort
- * 出站连接,使用 kubectl exec 从 Pod 内部 curl 外部 IP
-
-
-{{< note >}}
-由于当前平台对 Windows 网络堆栈的限制,Windows 容器主机无法访问在其上调度的服务的 IP。只有 Windows pods 才能访问服务 IP。
+由于当前 Windows 平台的网络堆栈限制,Windows 容器主机无法访问调度到其上的 Service 的 IP。
+只有 Windows Pod 能够访问 Service IP。
{{< /note >}}
-
-## 可观测性 {#observability}
-### 抓取来自工作负载的日志
-
-
-日志是可观测性的重要一环;使用日志用户可以获得对负载运行状况的洞察,
-因而日志是故障排查的一个重要手法。
-因为 Windows 容器中的 Windows 容器和负载与 Linux 容器的行为不同,
-用户很难收集日志,因此运行状态的可见性很受限。
-例如,Windows 工作负载通常被配置为将日志输出到 Windows 事件跟踪
-(Event Tracing for Windows,ETW),或者将日志条目推送到应用的事件日志中。
-[LogMonitor](https://github.com/microsoft/windows-container-tools/tree/master/LogMonitor)
-是 Microsoft 提供的一个开源工具,是监视 Windows 容器中所配置的日志源
-的推荐方式。
-LogMonitor 支持监视时间日志、ETW 提供者模块以及自定义的应用日志,
-并使用管道的方式将其输出到标准输出(stdout),以便 `kubectl logs `
-这类命令能够读取这些数据。
-
-请遵照 LogMonitor GitHub 页面上的指令,将其可执行文件和配置文件复制到
-你的所有容器中,并为其添加必要的入口点(Entrypoint),以便 LogMonitor
-能够将你的日志输出推送到标准输出(stdout)。
+## 可观察性 {#observability}
+### 捕捉来自工作负载的日志 {#capturing-logs-from-workloads}
-
-## 使用可配置的容器用户名
+## 配置容器用户 {#configuring-container-user}
-从 Kubernetes v1.16 开始,可以为 Windows 容器配置与其镜像默认值不同的用户名
-来运行其入口点和进程。
-此能力的实现方式和 Linux 容器有些不同。
-在[此处](/zh/docs/tasks/configure-pod-container/configure-runasusername/)
-可了解更多信息。
+### 使用可配置的容器用户名 {#using-configurable-container-usernames}
-
-## 使用组托管服务帐户管理工作负载身份
+### 使用组托管服务帐户(GMSA)管理工作负载身份 {#managing-workload-identity-with-group-managed-service-accounts}
-从 Kubernetes v1.14 开始,可以将 Windows 容器工作负载配置为使用组托管服务帐户(GMSA)。
-组托管服务帐户是 Active Directory 帐户的一种特定类型,它提供自动密码管理,
-简化的服务主体名称(SPN)管理以及将管理委派给跨多台服务器的其他管理员的功能。
-配置了 GMSA 的容器可以访问外部 Active Directory 域资源,同时携带通过 GMSA 配置的身份。
-在[此处](/zh/docs/tasks/configure-pod-container/configure-gmsa/)了解有关为
-Windows 容器配置和使用 GMSA 的更多信息。
+Windows 容器工作负载可以配置为使用组托管服务帐户(Group Managed Service Accounts,GMSA)。
+组托管服务帐户是一种特定类型的活动目录(Active Directory)帐户,可提供自动密码管理、
+简化的服务主体名称(Service Principal Name,SPN)管理,以及将管理委派给多个服务器上的其他管理员的能力。
+配置了 GMSA 的容器可以携带使用 GMSA 配置的身份访问外部活动目录域资源。
+在[此处](/zh/docs/tasks/configure-pod-container/configure-gmsa/)了解有关为 Windows 容器配置和使用 GMSA 的更多信息。
-
-## 污点和容忍度
-
-目前,用户需要将 Linux 和 Windows 工作负载运行在各自特定的操作系统的节点上,
-因而需要结合使用污点和节点选择算符。 这可能仅给 Windows 用户造成不便。
-推荐的方法概述如下,其主要目标之一是该方法不应破坏与现有 Linux 工作负载的兼容性。
-
+## 污点和容忍度 {#taints-and-tolerations}
+
+用户需要使用某种污点(Taint)和节点选择器的组合,以便将 Linux 和 Windows 工作负载各自调度到特定操作系统的节点。
+下面概述了推荐的方法,其主要目标之一是该方法不应破坏现有 Linux 工作负载的兼容性。
+
+如果启用了 `IdentifyPodOS` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/),
+你可以(并且应该)将 Pod 的 `.spec.os.name` 设置为该 Pod 中的容器设计所用于的操作系统。
+对于运行 Linux 容器的 Pod,将 `.spec.os.name` 设置为 `linux`。
+对于运行 Windows 容器的 Pod,将 `.spec.os.name` 设置为 `Windows`。
{{< note >}}
+
+从 1.24 开始,`IdentifyPodOS` 特性处于 Beta 阶段,默认启用。
{{< /note >}}
+
-如果 `IdentifyPodOS` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)是启用的,
-你可以(并且应该)为 Pod 设置 `.spec.os.name` 以表明该 Pod
-中的容器所针对的操作系统。 对于运行 Linux 容器的 Pod,设置
-`.spec.os.name` 为 `linux`。 对于运行 Windows 容器的 Pod,设置 `.spec.os.name`
-为 `Windows`。
-
-{{< note >}}
-从 1.24 开始,`IdentifyPodOS` 功能处于 Beta 阶段,默认启用。
-{{< /note >}}
-
-在将 Pod 分配给节点时,调度程序不使用 `.spec.os.name` 的值。你应该使用正常的 Kubernetes
-机制[将 Pod 分配给节点](/zh/docs/concepts/scheduling-eviction/assign-pod-node/),
-确保集群的控制平面将 Pod 放置到适合运行的操作系统。
-`.spec.os.name` 值对 Windows Pod 的调度没有影响,因此仍然需要污点、容忍度以及节点选择器,
-以确保 Windows Pod 调度至合适的 Windows 节点。
-
-
-### 确保特定操作系统的工作负载落在适当的容器主机上
+调度器在将 Pod 分配到节点时并不使用 `.spec.os.name` 的值。
+你应该使用正常的 Kubernetes 机制[将 Pod 分配给节点](/zh/docs/concepts/scheduling-eviction/assign-pod-node/),
+以确保集群的控制平面将 Pod 放置到运行适当操作系统的节点上。
+
+`.spec.os.name` 值对 Windows Pod 的调度没有影响,
+因此仍然需要污点和容忍以及节点选择器来确保 Windows Pod 落在适当的 Windows 节点。
+
+
-用户可以使用污点和容忍度确保 Windows 容器可以调度在适当的主机上。目前所有 Kubernetes 节点都具有以下默认标签:
+### 确保特定于操作系统的工作负载落到合适的容器主机上 {#ensuring-os-specific-workloads-land-on-the-appropriate-container-host}
+
+用户可以使用污点(Taint)和容忍度(Toleration)确保将 Windows 容器调度至合适的主机上。
+现在,所有的 Kubernetes 节点都有以下默认标签:
* kubernetes.io/os = [windows|linux]
* kubernetes.io/arch = [amd64|arm64|...]
-
-如果 Pod 规范未指定诸如 `"kubernetes.io/os": windows` 之类的 nodeSelector,则该 Pod
-可能会被调度到任何主机(Windows 或 Linux)上。
-这是有问题的,因为 Windows 容器只能在 Windows 上运行,而 Linux 容器只能在 Linux 上运行。
+如果 Pod 规约没有指定像 `"kubernetes.io/os": windows` 这样的 nodeSelector,
+则 Pod 可以被调度到任何主机上,Windows 或 Linux。
+这可能会有问题,因为 Windows 容器只能在 Windows 上运行,而 Linux 容器只能在 Linux 上运行。
最佳实践是使用 nodeSelector。
-
-但是,我们了解到,在许多情况下,用户都有既存的大量的 Linux 容器部署,以及一个现成的配置生态系统,
-例如社区 Helm charts,以及程序化 Pod 生成案例,例如 Operators。
-在这些情况下,你可能会不愿意更改配置添加 nodeSelector。替代方法是使用污点。
-由于 kubelet 可以在注册期间设置污点,因此可以轻松修改它,使其仅在 Windows 上运行时自动添加污点。
+但是,我们了解到,在许多情况下,用户已经预先存在大量 Linux 容器部署,
+以及现成配置的生态系统,例如社区中的 Helm Chart 包和程序化的 Pod 生成案例,例如 Operator。
+在这些情况下,你可能不愿更改配置来添加节点选择器。
+另一种方法是使用污点。因为 kubelet 可以在注册过程中设置污点,
+所以可以很容易地修改为,当只能在 Windows 上运行时,自动添加污点。
-
例如:`--register-with-taints='os=windows:NoSchedule'`
-
-向所有 Windows 节点添加污点后,Kubernetes 将不会在它们上调度任何负载(包括现有的 Linux Pod)。
-为了使某 Windows Pod 调度到 Windows 节点上,该 Pod 需要 nodeSelector 和合适的匹配的容忍度设置来选择 Windows,
+通过向所有 Windows 节点添加污点,任何负载都不会被调度到这些节点上(包括现有的 Linux Pod)。
+为了在 Windows 节点上调度 Windows Pod,它需要 nodeSelector 和匹配合适的容忍度来选择 Windows。
```yaml
nodeSelector:
- kubernetes.io/os: windows
- node.kubernetes.io/windows-build: '10.0.17763'
+ kubernetes.io/os: windows
+ node.kubernetes.io/windows-build: '10.0.17763'
tolerations:
- - key: "os"
- operator: "Equal"
- value: "windows"
- effect: "NoSchedule"
+ - key: "os"
+ operator: "Equal"
+ value: "windows"
+ effect: "NoSchedule"
```
-
-### 处理同一集群中的多个 Windows 版本
-
-每个 Pod 使用的 Windows Server 版本必须与该节点的 Windows Server 版本相匹配。
-如果要在同一集群中使用多个 Windows Server 版本,则应该设置其他节点标签和
-nodeSelector。
-
-Kubernetes 1.17 自动添加了一个新标签 `node.kubernetes.io/windows-build` 来简化此操作。
-如果你运行的是旧版本,则建议手动将此标签添加到 Windows 节点。
-
-此标签反映了需要兼容的 Windows 主要、次要和内部版本号。以下是当前每个
-Windows Server 版本使用的值。
+### 处理同一集群中的多个 Windows 版本 {#handling-multiple-windows-versions-in-the-same-cluster}
-| 产品名称 | 内部编号 |
+每个 Pod 使用的 Windows Server 版本必须与节点的版本匹配。
+如果要在同一个集群中使用多个 Windows Server 版本,则应设置额外的节点标签和节点选择器。
+
+Kubernetes 1.17 自动添加了一个新标签 `node.kubernetes.io/windows-build` 来简化这一点。
+如果你运行的是旧版本,则建议手动将此标签添加到 Windows 节点。
+
+此标签反映了需要匹配以实现兼容性的 Windows 主要、次要和内部版本号。
+以下是目前用于每个 Windows Server 版本的值。
+
+
+| 产品名称 | 构建号 |
|--------------------------------------|------------------------|
| Windows Server 2019 | 10.0.17763 |
-| Windows Server version 1809 | 10.0.17763 |
-| Windows Server version 1903 | 10.0.18362 |
+| Windows Server, Version 20H2 | 10.0.19042 |
+| Windows Server 2022 | 10.0.20348 |
-
-
-### 使用 RuntimeClass 简化
-
-[RuntimeClass](/zh/docs/concepts/containers/runtime-class/) 可用于
-简化使用污点和容忍度的过程。
-集群管理员可以创建 `RuntimeClass` 对象,用于封装这些污点和容忍度。
-
-1. 将此文件保存到 `runtimeClasses.yml` 文件。
- 它包括适用于 Windows 操作系统、体系结构和版本的 `nodeSelector`。
+### 使用 RuntimeClass 进行简化 {#simplifying-with-runtimeclass}
- ```yaml
- apiVersion: node.k8s.io/v1
- kind: RuntimeClass
- metadata:
- name: windows-2019
- handler: 'docker'
- scheduling:
- nodeSelector:
- kubernetes.io/os: 'windows'
- kubernetes.io/arch: 'amd64'
- node.kubernetes.io/windows-build: '10.0.17763'
- tolerations:
- - effect: NoSchedule
- key: os
- operator: Equal
- value: "windows"
- ```
+[RuntimeClass] 可用于简化使用污点和容忍度的流程。
+集群管理员可以创建一个用于封装这些污点和容忍度的 `RuntimeClass` 对象。
-
-2. 集群管理员执行 `kubectl create -f runtimeClasses.yml` 操作
-3. 根据需要向 Pod 规约中添加 `runtimeClassName: windows-2019`
-
+1. 以集群管理员身份运行 `kubectl create -f runtimeClasses.yml`
+1. 根据情况,向 Pod 规约中添加 `runtimeClassName: windows-2019`
+
例如:
```yaml
@@ -503,3 +478,5 @@ spec:
selector:
app: iis-2019
```
+
+[RuntimeClass]: https://kubernetes.io/docs/concepts/containers/runtime-class/
diff --git a/content/zh/docs/concepts/workloads/_index.md b/content/zh-cn/docs/concepts/workloads/_index.md
similarity index 100%
rename from content/zh/docs/concepts/workloads/_index.md
rename to content/zh-cn/docs/concepts/workloads/_index.md
diff --git a/content/zh/docs/concepts/workloads/controllers/_index.md b/content/zh-cn/docs/concepts/workloads/controllers/_index.md
similarity index 100%
rename from content/zh/docs/concepts/workloads/controllers/_index.md
rename to content/zh-cn/docs/concepts/workloads/controllers/_index.md
diff --git a/content/zh/docs/concepts/workloads/controllers/cron-jobs.md b/content/zh-cn/docs/concepts/workloads/controllers/cron-jobs.md
similarity index 78%
rename from content/zh/docs/concepts/workloads/controllers/cron-jobs.md
rename to content/zh-cn/docs/concepts/workloads/controllers/cron-jobs.md
index e31fa8edc3..e52908f51e 100644
--- a/content/zh/docs/concepts/workloads/controllers/cron-jobs.md
+++ b/content/zh-cn/docs/concepts/workloads/controllers/cron-jobs.md
@@ -86,6 +86,7 @@ in time within that interval when the job should start.
-->
## CronJob
+
CronJob 用于执行周期性的动作,例如备份、报告生成等。
这些任务中的每一个都应该配置为周期性重复的(例如:每天/每周/每月一次);
你可以定义任务开始执行的时间间隔。
@@ -150,6 +151,69 @@ To generate CronJob schedule expressions, you can also use web tools like [cront
-->
要生成 CronJob 时间表表达式,你还可以使用 [crontab.guru](https://crontab.guru/) 之类的 Web 工具。
+
+
+## 时区 {#time-zones}
+对于没有指定时区的 CronJob,kube-controller-manager 基于本地时区解释排期表(Schedule)。
+
+{{< feature-state for_k8s_version="v1.24" state="alpha" >}}
+
+如果启用了 `CronJobTimeZone` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/),
+你可以为 CronJob 指定一个时区(如果你没有启用该特性门控,或者你使用的是不支持试验性时区功能的
+Kubernetes 版本,集群中所有 CronJob 的时区都是未指定的)。
+
+启用该特性后,你可以将 `spec.timeZone`
+设置为有效[时区](https://zh.wikipedia.org/zh-hant/%E6%97%B6%E5%8C%BA%E4%BF%A1%E6%81%AF%E6%95%B0%E6%8D%AE%E5%BA%93s)名称。
+例如,设置 `spec.timeZone: "Etc/UTC"` 指示 Kubernetes 采用 UTC 来解释排期表。
+
+Go 标准库中的时区数据库包含在二进制文件中,并用作备用数据库,以防系统上没有可用的外部数据库。
+
+
+
+## 时区 {#time-zones}
+对于没有指定时区的 CronJob,kube-controller-manager 会根据其本地时区来解释其排期表(schedule)。
+
+{{< feature-state for_k8s_version="v1.24" state="alpha" >}}
+
+
+如果启用 `CronJobTimeZone` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/),
+你可以为 CronJob 指定时区(如果你不启用该特性门控,或者如果你使用的 Kubernetes 版本不支持实验中的时区特性,
+则集群中的所有 CronJob 都属于未指定时区)。
+
+
+当你启用该特性时,你可以将 `spec.timeZone` 设置为有效的[时区](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)名称。
+例如,设置 `spec.timeZone: "Etc/UTC"` 表示 Kubernetes
+使用协调世界时(Coordinated Universal Time)进行解释排期表。
+
+Go 标准库中的时区数据库包含在二进制文件中,并用作备用数据库,以防系统上没有外部数据库可用。
Job 会创建一个或者多个 Pods,并将继续重试 Pods 的执行,直到指定数量的 Pods 成功终止。
随着 Pods 成功结束,Job 跟踪记录成功完成的 Pods 个数。
@@ -46,7 +49,11 @@ Job 会创建一个或者多个 Pods,并将继续重试 Pods 的执行,直
你也可以使用 Job 以并行的方式运行多个 Pod。
+如果你想按某种排期表(Schedule)运行 Job(单个任务或多个并行任务),请参阅
+[CronJob](/docs/concepts/workloads/controllers/cron-jobs/)。
+
+
+
你可以使用下面的命令来运行此示例:
```shell
kubectl apply -f https://kubernetes.io/examples/controllers/job.yaml
```
-
+
+
输出类似于:
```
job.batch/pi created
```
-
+
使用 `kubectl` 来检查 Job 的状态:
```shell
kubectl describe jobs/pi
```
-
+
+
输出类似于:
```
@@ -131,7 +148,10 @@ To list all the Pods that belong to a Job in a machine readable form, you can us
pods=$(kubectl get pods --selector=job-name=pi --output=jsonpath='{.items[*].metadata.name}')
echo $pods
```
-
+
+
输出类似于:
```
@@ -139,7 +159,7 @@ pi-5rwd7
```
+
输出类似于:
```
3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632788659361533818279682303019520353018529689957736225994138912497217752834791315155748572424541506959508295331168617278558890750983817546374649393192550604009277016711390098488240128583616035637076601047101819429555961989467678374494482553797747268471040475346462080466842590694912933136770289891521047521620569660240580381501935112533824300355876402474964732639141992726042699227967823547816360093417216412199245863150302861829745557067498385054945885869269956909272107975093029553211653449872027559602364806654991198818347977535663698074265425278625518184175746728909777727938000816470600161452491921732172147723501414419735685481613611573525521334757418494684385233239073941433345477624168625189835694855620992192221842725502542568876717904946016534668049886272327917860857843838279679766814541009538837863609506800642251252051173929848960841284886269456042419652850222106611863067442786220391949450471237137869609563643719172874677646575739624138908658326459958133904780275901
```
+
-## 编写 Job 规约
+## 编写 Job 规约 {#writing-a-job-spec}
与 Kubernetes 中其他资源的配置类似,Job 也需要 `apiVersion`、`kind` 和 `metadata` 字段。
Job 的名字必须是合法的 [DNS 子域名](/zh/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)。
-Job 配置还需要一个[`.spec` 节](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status)。
+Job 配置还需要一个 [`.spec` 节](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status)。
-### Pod 模版
+### Pod 模版 {#pod-template}
Job 的 `.spec` 中只有 `.spec.template` 是必需的字段。
@@ -195,7 +218,7 @@ Job 的 `.spec` 中只有 `.spec.template` 是必需的字段。
完全相同,只是其中不再需要 `apiVersion` 或 `kind` 字段。
除了作为 Pod 所必需的字段之外,Job 中的 Pod 模版必需设置合适的标签
-(参见[Pod 选择算符](#pod-selector))和合适的重启策略。
+(参见 [Pod 选择算符](#pod-selector))和合适的重启策略。
Job 中 Pod 的 [`RestartPolicy`](/zh/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy)
只能设置为 `Never` 或 `OnFailure` 之一。
@@ -219,6 +242,7 @@ There are three main types of task suitable to run as a Job:
### Job 的并行执行 {#parallel-jobs}
适合以 Job 形式来运行的任务主要有三种:
+
-## 处理 Pod 和容器失效
+## 处理 Pod 和容器失效 {#handling-pod-and-container-failures}
Pod 中的容器可能因为多种不同原因失效,例如因为其中的进程退出时返回值非零,
或者容器因为超出内存约束而被杀死等等。
@@ -430,7 +454,7 @@ exponential back-off delay (10s, 20s, 40s ...) capped at six minutes. The
back-off count is reset when a Job's Pod is deleted or successful without any
other Pods for the Job failing around that time.
-->
-### Pod 回退失效策略
+### Pod 回退失效策略 {#pod-backoff-failure-policy}
在有些情形下,你可能希望 Job 在经历若干次重试之后直接进入失败状态,因为这很
可能意味着遇到了配置错误。
@@ -463,7 +487,7 @@ allows you to still view the logs of completed pods to check for errors, warning
The job object also remains after it is completed so that you can view its status. It is up to the user to delete
old jobs after noting their status. Delete the job with `kubectl` (e.g. `kubectl delete jobs/pi` or `kubectl delete -f ./job.yaml`). When you delete the job using `kubectl`, all the pods it created are deleted too.
-->
-## Job 终止与清理
+## Job 终止与清理 {#clean-up-finished-jobs-automatically}
Job 完成时不会再创建新的 Pod,不过已有的 Pod [通常](#pod-backoff-failure-policy)也不会被删除。
保留这些 Pod 使得你可以查看已完成的 Pod 的日志输出,以便检查错误、警告
@@ -732,7 +756,7 @@ Job 被创建时,Job 控制器会马上开始执行 Pod 创建操作以满足
不过你可能想要暂时挂起 Job 执行,或启动处于挂起状态的job,
并拥有一个自定义控制器以后再决定什么时候开始。
-
+
+
输出类似于:
```yaml
@@ -999,7 +1026,7 @@ the selector that the system normally generates for you automatically.
它们也会被名为 `new` 的 Job 所控制。
你需要在新 Job 中设置 `manualSelector: true`,因为你并未使用系统通常自动为你
-生成的选择算符。
+生成的选择算符。
```yaml
kind: Job
@@ -1025,29 +1052,31 @@ mismatch.
### 使用 Finalizer 追踪 Job {#job-tracking-with-finalizers}
{{< feature-state for_k8s_version="v1.23" state="beta" >}}
{{< note >}}
+
要使用该行为,你必须为 [API 服务器](/zh/docs/reference/command-line-tools-reference/kube-apiserver/)
和[控制器管理器](/zh/docs/reference/command-line-tools-reference/kube-controller-manager/)
启用 `JobTrackingWithFinalizers`
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)。
默认是启用的。
+
启用后,控制面基于下述行为追踪新的 Job。在启用该特性之前创建的 Job 不受影响。
作为用户,你会看到的唯一区别是控制面对 Job 完成情况的跟踪更加准确。
{{< /note >}}
@@ -1117,7 +1146,7 @@ Job 会重新创建新的 Pod 来替代已终止的 Pod。
-### 单个 Job 启动控制器 Pod
+### 单个 Job 启动控制器 Pod {#single-job-starts-controller-pod}
另一种模式是用唯一的 Job 来创建 Pod,而该 Pod 负责启动其他 Pod,因此扮演了一种
后启动 Pod 的控制器的角色。
diff --git a/content/zh/docs/concepts/workloads/controllers/replicaset.md b/content/zh-cn/docs/concepts/workloads/controllers/replicaset.md
similarity index 78%
rename from content/zh/docs/concepts/workloads/controllers/replicaset.md
rename to content/zh-cn/docs/concepts/workloads/controllers/replicaset.md
index ca92f8378e..b55efa8345 100644
--- a/content/zh/docs/concepts/workloads/controllers/replicaset.md
+++ b/content/zh-cn/docs/concepts/workloads/controllers/replicaset.md
@@ -48,7 +48,7 @@ ReplicaSet's identifying information within their ownerReferences field. It's th
knows of the state of the Pods it is maintaining and plans accordingly.
-->
ReplicaSet 通过 Pod 上的
-[metadata.ownerReferences](/zh/docs/concepts/workloads/controllers/garbage-collection/#owners-and-dependents)
+[metadata.ownerReferences](/zh-cn/docs/concepts/workloads/controllers/garbage-collection/#owners-and-dependents)
字段连接到附属 Pod,该字段给出当前对象的属主资源。
ReplicaSet 所获得的 Pod 都在其 ownerReferences 字段中包含了属主 ReplicaSet
的标识信息。正是通过这一连接,ReplicaSet 知道它所维护的 Pod 集合的状态,
@@ -56,10 +56,11 @@ ReplicaSet 所获得的 Pod 都在其 ownerReferences 字段中包含了属主 R
ReplicaSet 使用其选择算符来辨识要获得的 Pod 集合。如果某个 Pod 没有
-OwnerReference 或者其 OwnerReference 不是一个
+OwnerReference 或者其 OwnerReference 不是一个
{{< glossary_tooltip text="控制器" term_id="controller" >}},且其匹配到
某 ReplicaSet 的选择算符,则该 Pod 立即被此 ReplicaSet 获得。
@@ -68,14 +69,14 @@ OwnerReference 或者其 OwnerReference 不是一个
A ReplicaSet ensures that a specified number of pod replicas are running at any given
time. However, a Deployment is a higher-level concept that manages ReplicaSets and
-provides declarative updates to pods along with a lot of other useful features.
+provides declarative updates to Pods along with a lot of other useful features.
Therefore, we recommend using Deployments instead of directly using ReplicaSets, unless
you require custom update orchestration or don't require updates at all.
This actually means that you may never need to manipulate ReplicaSet objects:
use a Deployment instead, and define your application in the spec section.
-->
-## 何时使用 ReplicaSet
+## 何时使用 ReplicaSet {#when-to-use-a-replicaset}
ReplicaSet 确保任何时间都有指定数量的 Pod 副本在运行。
然而,Deployment 是一个更高级的概念,它管理 ReplicaSet,并向 Pod
@@ -89,17 +90,16 @@ Deployment,并在 spec 部分定义你的应用。
-## 示例
+## 示例 {#example}
{{< codenew file="controllers/frontend.yaml" >}}
将此清单保存到 `frontend.yaml` 中,并将其提交到 Kubernetes 集群,
-应该就能创建 yaml 文件所定义的 ReplicaSet 及其管理的 Pod。
-
+就能创建 yaml 文件所定义的 ReplicaSet 及其管理的 Pod。
```shell
kubectl apply -f https://kubernetes.io/examples/controllers/frontend.yaml
@@ -139,25 +139,25 @@ And you will see output similar to:
你会看到类似如下的输出:
```
-Name: frontend
-Namespace: default
-Selector: tier=frontend
-Labels: app=guestbook
- tier=frontend
+Name: frontend
+Namespace: default
+Selector: tier=frontend
+Labels: app=guestbook
+ tier=frontend
Annotations: kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"apps/v1","kind":"ReplicaSet","metadata":{"annotations":{},"labels":{"app":"guestbook","tier":"frontend"},"name":"frontend",...
-Replicas: 3 current / 3 desired
-Pods Status: 3 Running / 0 Waiting / 0 Succeeded / 0 Failed
+Replicas: 3 current / 3 desired
+Pods Status: 3 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
- Labels: tier=frontend
+ Labels: tier=frontend
Containers:
php-redis:
- Image: gcr.io/google_samples/gb-frontend:v3
+ Image: gcr.io/google_samples/gb-frontend:v3
Port:
Host Port:
Environment:
- Mounts:
- Volumes:
+ Mounts:
+ Volumes:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
@@ -226,26 +226,19 @@ metadata:
-## 非模板 Pod 的获得
+## 非模板 Pod 的获得 {#non-template-pod-acquisitions}
-尽管你完全可以直接创建裸的 Pods,强烈建议你确保这些裸的 Pods 并不包含可能与你
-的某个 ReplicaSet 的选择算符相匹配的标签。原因在于 ReplicaSet 并不仅限于拥有
-在其模板中设置的 Pods,它还可以像前面小节中所描述的那样获得其他 Pods。
+尽管你完全可以直接创建裸的 Pod,强烈建议你确保这些裸的 Pod 并不包含可能与你的某个
+ReplicaSet 的选择算符相匹配的标签。原因在于 ReplicaSet 并不仅限于拥有在其模板中设置的
+Pod,它还可以像前面小节中所描述的那样获得其他 Pod。
{{< codenew file="pods/pod-rs.yaml" >}}
@@ -256,11 +249,10 @@ ReplicaSet, they will immediately be acquired by it.
Suppose you create the Pods after the frontend ReplicaSet has been deployed and has set up its initial Pod replicas to
fulfill its replica count requirement:
-->
-由于这些 Pod 没有控制器(Controller,或其他对象)作为其属主引用,并且
-其标签与 frontend ReplicaSet 的选择算符匹配,它们会立即被该 ReplicaSet
-获取。
+由于这些 Pod 没有控制器(Controller,或其他对象)作为其属主引用,
+并且其标签与 frontend ReplicaSet 的选择算符匹配,它们会立即被该 ReplicaSet 获取。
-假定你在 frontend ReplicaSet 已经被部署之后创建 Pods,并且你已经在 ReplicaSet
+假定你在 frontend ReplicaSet 已经被部署之后创建 Pod,并且你已经在 ReplicaSet
中设置了其初始的 Pod 副本数以满足其副本计数需要:
```shell
@@ -273,8 +265,8 @@ its desired count.
Fetching the Pods:
-->
-新的 Pods 会被该 ReplicaSet 获取,并立即被 ReplicaSet 终止,因为
-它们的存在会使得 ReplicaSet 中 Pod 个数超出其期望值。
+新的 Pod 会被该 ReplicaSet 获取,并立即被 ReplicaSet 终止,
+因为它们的存在会使得 ReplicaSet 中 Pod 个数超出其期望值。
取回 Pods:
@@ -286,9 +278,9 @@ kubectl get pods
-输出显示新的 Pods 或者已经被终止,或者处于终止过程中:
+输出显示新的 Pod 或者已经被终止,或者处于终止过程中:
-```shell
+```
NAME READY STATUS RESTARTS AGE
frontend-b2zdv 1/1 Running 0 10m
frontend-vcmts 1/1 Running 0 10m
@@ -319,9 +311,9 @@ kubectl apply -f https://kubernetes.io/examples/controllers/frontend.yaml
You shall see that the ReplicaSet has acquired the Pods and has only created new ones according to its spec until the
number of its new Pods and the original matches its desired count. As fetching the Pods:
-->
-你会看到 ReplicaSet 已经获得了该 Pods,并仅根据其规约创建新的 Pods,直到
-新的 Pods 和原来的 Pods 的总数达到其预期个数。
-这时取回 Pods:
+你会看到 ReplicaSet 已经获得了该 Pod,并仅根据其规约创建新的 Pod,
+直到新的 Pod 和原来的 Pod 的总数达到其预期个数。
+这时取回 Pod 列表:
```shell
kubectl get pods
@@ -339,10 +331,13 @@ pod1 1/1 Running 0 36s
pod2 1/1 Running 0 36s
```
+
采用这种方式,一个 ReplicaSet 中可以包含异质的 Pods 集合。
-## 编写 ReplicaSet 的 spec
+## 编写 ReplicaSet 的清单 {#writing-a-replicaset-manifest}
与所有其他 Kubernetes API 对象一样,ReplicaSet 也需要 `apiVersion`、`kind`、和 `metadata` 字段。
对于 ReplicaSets 而言,其 `kind` 始终是 ReplicaSet。
ReplicaSet 对象的名称必须是合法的
-[DNS 子域名](/zh/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)。
+[DNS 子域名](/zh-cn/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)。
-ReplicaSet 也需要 [`.spec`](https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status)
+ReplicaSet 也需要
+[`.spec`](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status)
部分。
-### Pod 模版
+### Pod 模版 {#pod-template}
-`.spec.template` 是一个[Pod 模版](/zh/docs/concepts/workloads/pods/#pod-templates),
+`.spec.template` 是一个 [Pod 模版](/zh-cn/docs/concepts/workloads/pods/#pod-templates),
要求设置标签。在 `frontend.yaml` 示例中,我们指定了标签 `tier: frontend`。
注意不要将标签与其他控制器的选择算符重叠,否则那些控制器会尝试收养此 Pod。
-对于模板的[重启策略](/zh/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy)
+对于模板的[重启策略](/zh-cn/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy)
字段,`.spec.template.spec.restartPolicy`,唯一允许的取值是 `Always`,这也是默认值.
### Pod 选择算符 {#pod-selector}
-`.spec.selector` 字段是一个[标签选择算符](/zh/docs/concepts/overview/working-with-objects/labels/)。
+`.spec.selector` 字段是一个[标签选择算符](/zh-cn/docs/concepts/overview/working-with-objects/labels/)。
如前文中[所讨论的](#how-a-replicaset-works),这些是用来标识要被获取的 Pods
的标签。在签名的 `frontend.yaml` 示例中,选择算符为:
@@ -408,17 +404,16 @@ matchLabels:
tier: frontend
```
-在 ReplicaSet 中,`.spec.template.metadata.labels` 的值必须与 `spec.selector` 值
-相匹配,否则该配置会被 API 拒绝。
+在 ReplicaSet 中,`.spec.template.metadata.labels` 的值必须与 `spec.selector`
+值相匹配,否则该配置会被 API 拒绝。
{{< note >}}
-对于设置了相同的 `.spec.selector`,但
-`.spec.template.metadata.labels` 和 `.spec.template.spec` 字段不同的
-两个 ReplicaSet 而言,每个 ReplicaSet 都会忽略被另一个 ReplicaSet 所
-创建的 Pods。
+对于设置了相同的 `.spec.selector`,但
+`.spec.template.metadata.labels` 和 `.spec.template.spec` 字段不同的两个
+ReplicaSet 而言,每个 ReplicaSet 都会忽略被另一个 ReplicaSet 所创建的 Pods。
{{< /note >}}
-## 使用 ReplicaSets
+## 使用 ReplicaSets {#working-with-replicasets}
-### 删除 ReplicaSet 和它的 Pod
+### 删除 ReplicaSet 和它的 Pod {#deleting-a-replicaset-and-its-pods}
要删除 ReplicaSet 和它的所有 Pod,使用
[`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete) 命令。
-默认情况下,[垃圾收集器](/zh/docs/concepts/workloads/controllers/garbage-collection/)
+默认情况下,[垃圾收集器](/zh-cn/docs/concepts/workloads/controllers/garbage-collection/)
自动删除所有依赖的 Pod。
-当使用 REST API 或 `client-go` 库时,你必须在删除选项中将 `propagationPolicy`
+当使用 REST API 或 `client-go` 库时,你必须在 `-d` 选项中将 `propagationPolicy`
设置为 `Background` 或 `Foreground`。例如:
```shell
kubectl proxy --port=8080
curl -X DELETE 'localhost:8080/apis/apps/v1/namespaces/default/replicasets/frontend' \
- -d '{"kind":"DeleteOptions","apiVersion":"v1","propagationPolicy":"Foreground"}' \
- -H "Content-Type: application/json"
+ -d '{"kind":"DeleteOptions","apiVersion":"v1","propagationPolicy":"Foreground"}' \
+ -H "Content-Type: application/json"
```
-### 只删除 ReplicaSet
+### 只删除 ReplicaSet {#deleting-just-a-replicaset}
你可以只删除 ReplicaSet 而不影响它的 Pods,方法是使用
[`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete)
@@ -489,8 +486,8 @@ curl -X DELETE 'localhost:8080/apis/apps/v1/namespaces/default/replicasets/fron
@@ -498,20 +495,19 @@ To update Pods to a new spec in a controlled way, use a
由于新旧 ReplicaSet 的 `.spec.selector` 是相同的,新的 ReplicaSet 将接管老的 Pod。
但是,它不会努力使现有的 Pod 与新的、不同的 Pod 模板匹配。
若想要以可控的方式更新 Pod 的规约,可以使用
-[Deployment](/zh/docs/concepts/workloads/controllers/deployment/#creating-a-deployment)
+[Deployment](/zh-cn/docs/concepts/workloads/controllers/deployment/#creating-a-deployment)
资源,因为 ReplicaSet 并不直接支持滚动更新。
-### 将 Pod 从 ReplicaSet 中隔离
+### 将 Pod 从 ReplicaSet 中隔离 {#isolating-pods-from-a-replicaset}
-可以通过改变标签来从 ReplicaSet 的目标集中移除 Pod。
+可以通过改变标签来从 ReplicaSet 中移除 Pod。
这种技术可以用来从服务中去除 Pod,以便进行排错、数据恢复等。
以这种方式移除的 Pod 将被自动替换(假设副本的数量没有改变)。
@@ -519,9 +515,9 @@ from service for debugging, data recovery, etc. Pods that are removed in this wa
### Scaling a ReplicaSet
A ReplicaSet can be easily scaled up or down by simply updating the `.spec.replicas` field. The ReplicaSet controller
-ensures that a desired number of pods with a matching label selector are available and operational.
+ensures that a desired number of Pods with a matching label selector are available and operational.
-->
-### 缩放 RepliaSet
+### 缩放 RepliaSet {#scaling-a-replicaset}
通过更新 `.spec.replicas` 字段,ReplicaSet 可以被轻松的进行缩放。ReplicaSet
控制器能确保匹配标签选择器的数量的 Pod 是可用的和可操作的。
@@ -547,11 +543,10 @@ prioritize scaling down pods based on the following general algorithm:
较小的优先被裁减掉
3. 所处节点上副本个数较多的 Pod 优先于所处节点上副本较少者
4. 如果 Pod 的创建时间不同,最近创建的 Pod 优先于早前创建的 Pod 被裁减。
- (当 `LogarithmicScaleDown` 这一
- [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
+ (当 `LogarithmicScaleDown` 这一[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
被启用时,创建时间是按整数幂级来分组的)。
-如果以上比较结果都相同,则随机选择。
+如果以上比较结果都相同,则随机选择。
-通过使用 [`controller.kubernetes.io/pod-deletion-cost`](/zh/docs/reference/labels-annotations-taints/#pod-deletion-cost)
+通过使用 [`controller.kubernetes.io/pod-deletion-cost`](/zh-cn/docs/reference/labels-annotations-taints/#pod-deletion-cost)
注解,用户可以对 ReplicaSet 缩容时要先删除哪些 Pods 设置偏好。
此功能特性处于 Beta 阶段,默认被禁用。你可以通过为 kube-apiserver 和
-kube-controller-manager 设置
-[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
+kube-controller-manager 设置[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
`PodDeletionCost` 来启用此功能。
{{< note >}}
@@ -601,7 +595,7 @@ kube-controller-manager 设置
-->
- 此机制实施时仅是尽力而为,并不能对 Pod 的删除顺序作出任何保证;
- 用户应避免频繁更新注解值,例如根据某观测度量值来更新此注解值是应该避免的。
- 这样做会在 API 服务器上产生大量的 Pod 更新操作。
+ 这样做会在 API 服务器上产生大量的 Pod 更新操作。
{{< /note >}}
-#### 使用场景示例
+#### 使用场景示例 {#example-use-case}
同一应用的不同 Pods 可能其利用率是不同的。在对应用执行缩容操作时,可能
希望移除利用率较低的 Pods。为了避免频繁更新 Pods,应用应该在执行缩容
@@ -623,17 +617,16 @@ the down scaling; for example, the driver pod of a Spark deployment.
是可以起作用的。
-### ReplicaSet 作为水平的 Pod 自动缩放器目标
+### ReplicaSet 作为水平的 Pod 自动缩放器目标 {#replicaset-as-a-horizontal-pod-autoscaler-target}
-ReplicaSet 也可以作为
-[水平的 Pod 缩放器 (HPA)](/zh/docs/tasks/run-application/horizontal-pod-autoscale/)
+ReplicaSet 也可以作为[水平的 Pod 缩放器 (HPA)](/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale/)
的目标。也就是说,ReplicaSet 可以被 HPA 自动缩放。
以下是 HPA 以我们在前一个示例中创建的副本集为目标的示例。
@@ -642,7 +635,7 @@ ReplicaSet 也可以作为
将这个列表保存到 `hpa-rs.yaml` 并提交到 Kubernetes 集群,就能创建它所定义的
HPA,进而就能根据复制的 Pod 的 CPU 利用率对目标 ReplicaSet进行自动缩放。
@@ -655,7 +648,7 @@ kubectl apply -f https://k8s.io/examples/controllers/hpa-rs.yaml
Alternatively, you can use the `kubectl autoscale` command to accomplish the same
(and it's easier!)
-->
-或者,可以使用 `kubectl autoscale` 命令完成相同的操作。 (而且它更简单!)
+或者,可以使用 `kubectl autoscale` 命令完成相同的操作。(而且它更简单!)
```shell
kubectl autoscale rs frontend --max=10 --min=3 --cpu-percent=50
@@ -664,7 +657,7 @@ kubectl autoscale rs frontend --max=10 --min=3 --cpu-percent=50
-## ReplicaSet 的替代方案
+## ReplicaSet 的替代方案 {#alternatives-to-replicaset}
-### Deployment (推荐)
+### Deployment(推荐) {#deployment-recommended}
-[`Deployment`](/zh/docs/concepts/workloads/controllers/deployment/) 是一个
-可以拥有 ReplicaSet 并使用声明式方式在服务器端完成对 Pods 滚动更新的对象。
-尽管 ReplicaSet 可以独立使用,目前它们的主要用途是提供给 Deployment 作为
-编排 Pod 创建、删除和更新的一种机制。当使用 Deployment 时,你不必关心
-如何管理它所创建的 ReplicaSet,Deployment 拥有并管理其 ReplicaSet。
+[`Deployment`](/zh-cn/docs/concepts/workloads/controllers/deployment/) 是一个可以拥有
+ReplicaSet 并使用声明式方式在服务器端完成对 Pods 滚动更新的对象。
+尽管 ReplicaSet 可以独立使用,目前它们的主要用途是提供给 Deployment 作为编排
+Pod 创建、删除和更新的一种机制。当使用 Deployment 时,你不必关心如何管理它所创建的
+ReplicaSet,Deployment 拥有并管理其 ReplicaSet。
因此,建议你在需要 ReplicaSet 时使用 Deployment。
-### 裸 Pod
+### 裸 Pod {#bare-pods}
与用户直接创建 Pod 的情况不同,ReplicaSet 会替换那些由于某些原因被删除或被终止的
Pod,例如在节点故障或破坏性的节点维护(如内核升级)的情况下。
因为这个原因,我们建议你使用 ReplicaSet,即使应用程序只需要一个 Pod。
想像一下,ReplicaSet 类似于进程监视器,只不过它在多个节点上监视多个 Pod,
而不是在单个节点上监视单个进程。
-ReplicaSet 将本地容器重启的任务委托给了节点上的某个代理(例如,Kubelet 或 Docker)去完成。
+ReplicaSet 将本地容器重启的任务委托给了节点上的某个代理(例如,Kubelet)去完成。
-
### Job
-使用[`Job`](/zh/docs/concepts/workloads/controllers/job/) 代替ReplicaSet,
+使用[`Job`](/zh-cn/docs/concepts/workloads/controllers/job/) 代替 ReplicaSet,
可以用于那些期望自行终止的 Pod。
### DaemonSet
对于管理那些提供主机级别功能(如主机监控和主机日志)的容器,
-就要用 [`DaemonSet`](/zh/docs/concepts/workloads/controllers/daemonset/)
+就要用 [`DaemonSet`](/zh-cn/docs/concepts/workloads/controllers/daemonset/)
而不用 ReplicaSet。
这些 Pod 的寿命与主机寿命有关:这些 Pod 需要先于主机上的其他 Pod 运行,
并且在机器准备重新启动/关闭时安全地终止。
@@ -734,9 +726,9 @@ The two serve the same purpose, and behave similarly, except that a ReplicationC
selector requirements as described in the [labels user guide](/docs/concepts/overview/working-with-objects/labels/#label-selectors).
As such, ReplicaSets are preferred over ReplicationControllers
-->
-ReplicaSet 是 [ReplicationController](/zh/docs/concepts/workloads/controllers/replicationcontroller/)
+ReplicaSet 是 [ReplicationController](/zh-cn/docs/concepts/workloads/controllers/replicationcontroller/)
的后继者。二者目的相同且行为类似,只是 ReplicationController 不支持
-[标签用户指南](/zh/docs/concepts/overview/working-with-objects/labels/#label-selectors)
+[标签用户指南](/zh-cn/docs/concepts/overview/working-with-objects/labels/#label-selectors)
中讨论的基于集合的选择算符需求。
因此,相比于 ReplicationController,应优先考虑 ReplicaSet。
@@ -753,9 +745,13 @@ ReplicaSet 是 [ReplicationController](/zh/docs/concepts/workloads/controllers/r
* Read about [PodDisruptionBudget](/docs/concepts/workloads/pods/disruptions/) and how
you can use it to manage application availability during disruptions.
-->
-* 了解 [Pods](/zh/docs/concepts/workloads/pods)。
-* 了解 [Deployments](/zh/docs/concepts/workloads/controllers/deployment/)。
-* [使用 Deployment 运行一个无状态应用](/zh/docs/tasks/run-application/run-stateless-application-deployment/),它依赖于 ReplicaSet。
-* `ReplicaSet` 是 Kubernetes REST API 中的顶级资源。阅读 {{< api-reference page="workload-resources/replica-set-v1" >}}
- 对象定义理解关于该资源的 API。
-* 阅读[Pod 干扰预算(Disruption Budget)](/zh/docs/concepts/workloads/pods/disruptions/),了解如何在干扰下运行高度可用的应用。
+* 了解 [Pod](/zh-cn/docs/concepts/workloads/pods)。
+* 了解 [Deployment](/zh-cn/docs/concepts/workloads/controllers/deployment/)。
+* [使用 Deployment 运行一个无状态应用](/zh-cn/docs/tasks/run-application/run-stateless-application-deployment/),
+ 它依赖于 ReplicaSet。
+* `ReplicaSet` 是 Kubernetes REST API 中的顶级资源。阅读
+ {{< api-reference page="workload-resources/replica-set-v1" >}}
+ 对象定义理解关于该资源的 API。
+* 阅读 [Pod 干扰预算(Disruption Budget)](/zh-cn/docs/concepts/workloads/pods/disruptions/),
+ 了解如何在干扰下运行高度可用的应用。
+
diff --git a/content/zh/docs/concepts/workloads/controllers/replicationcontroller.md b/content/zh-cn/docs/concepts/workloads/controllers/replicationcontroller.md
similarity index 100%
rename from content/zh/docs/concepts/workloads/controllers/replicationcontroller.md
rename to content/zh-cn/docs/concepts/workloads/controllers/replicationcontroller.md
diff --git a/content/zh/docs/concepts/workloads/controllers/statefulset.md b/content/zh-cn/docs/concepts/workloads/controllers/statefulset.md
similarity index 100%
rename from content/zh/docs/concepts/workloads/controllers/statefulset.md
rename to content/zh-cn/docs/concepts/workloads/controllers/statefulset.md
diff --git a/content/zh/docs/concepts/workloads/controllers/ttlafterfinished.md b/content/zh-cn/docs/concepts/workloads/controllers/ttlafterfinished.md
similarity index 100%
rename from content/zh/docs/concepts/workloads/controllers/ttlafterfinished.md
rename to content/zh-cn/docs/concepts/workloads/controllers/ttlafterfinished.md
diff --git a/content/zh/docs/concepts/workloads/pods/_index.md b/content/zh-cn/docs/concepts/workloads/pods/_index.md
similarity index 100%
rename from content/zh/docs/concepts/workloads/pods/_index.md
rename to content/zh-cn/docs/concepts/workloads/pods/_index.md
diff --git a/content/zh/docs/concepts/workloads/pods/disruptions.md b/content/zh-cn/docs/concepts/workloads/pods/disruptions.md
similarity index 100%
rename from content/zh/docs/concepts/workloads/pods/disruptions.md
rename to content/zh-cn/docs/concepts/workloads/pods/disruptions.md
diff --git a/content/zh/docs/concepts/workloads/pods/ephemeral-containers.md b/content/zh-cn/docs/concepts/workloads/pods/ephemeral-containers.md
similarity index 100%
rename from content/zh/docs/concepts/workloads/pods/ephemeral-containers.md
rename to content/zh-cn/docs/concepts/workloads/pods/ephemeral-containers.md
diff --git a/content/zh/docs/concepts/workloads/pods/init-containers.md b/content/zh-cn/docs/concepts/workloads/pods/init-containers.md
similarity index 95%
rename from content/zh/docs/concepts/workloads/pods/init-containers.md
rename to content/zh-cn/docs/concepts/workloads/pods/init-containers.md
index 198111fe04..18782f28ce 100644
--- a/content/zh/docs/concepts/workloads/pods/init-containers.md
+++ b/content/zh-cn/docs/concepts/workloads/pods/init-containers.md
@@ -145,8 +145,8 @@ have some advantages for start-up related code:
* Init 容器能以不同于 Pod 内应用容器的文件系统视图运行。因此,Init 容器可以访问
应用容器不能访问的 {{< glossary_tooltip text="Secret" term_id="secret" >}} 的权限。
-* 由于 Init 容器必须在应用容器启动之前运行完成,因此 Init 容器
- 提供了一种机制来阻塞或延迟应用容器的启动,直到满足了一组先决条件。
+* 由于 Init 容器必须在应用容器启动之前运行完成,因此 Init
+ 容器提供了一种机制来阻塞或延迟应用容器的启动,直到满足了一组先决条件。
一旦前置条件满足,Pod 内的所有的应用容器会并行启动。
+### 示例 {#examples}
+
+下面是一些如何使用 Init 容器的想法:
+
+* 等待一个 Service 完成创建,通过类似如下 Shell 命令:
+
```shell
for i in {1..100}; do sleep 1; if dig myservice; then exit 0; fi; done; exit 1
```
- * Register this Pod with a remote server from the downward API with a command like:
+
+* 注册这个 Pod 到远程服务器,通过在命令中调用 API,类似如下:
+
```shell
curl -X POST http://$MANAGEMENT_SERVICE_HOST:$MANAGEMENT_SERVICE_PORT/register -d 'instance=$()&ip=$()'
```
+
+
+* 在启动应用容器之前等一段时间,使用类似命令:
+
```shell
sleep 60
```
-
+
-### 示例 {#examples}
-
-下面是一些如何使用 Init 容器的想法:
-
-* 等待一个 Service 完成创建,通过类似如下 shell 命令:
-
- ```shell
- for i in {1..100}; do sleep 1; if dig myservice; then exit 0; fi; done; exit 1
- ```
-
-* 注册这个 Pod 到远程服务器,通过在命令中调用 API,类似如下:
-
- ```shell
- curl -X POST http://$MANAGEMENT_SERVICE_HOST:$MANAGEMENT_SERVICE_PORT/register \
- -d 'instance=$()&ip=$()'
- ```
-
-* 在启动应用容器之前等一段时间,使用类似命令:
-
- ```shell
- sleep 60
- ```
-
* 克隆 Git 仓库到{{< glossary_tooltip text="卷" term_id="volume" >}}中。
* 将配置值放到配置文件中,运行模板工具为主应用容器动态地生成配置文件。
@@ -249,6 +242,7 @@ kubectl apply -f myapp.yaml
The output is similar to this:
-->
输出类似于:
+
```
pod/myapp-pod created
```
@@ -261,10 +255,12 @@ And check on its status with:
```shell
kubectl get -f myapp.yaml
```
+
输出类似于:
+
```
NAME READY STATUS RESTARTS AGE
myapp-pod 0/1 Init:0/2 0 6m
@@ -278,10 +274,12 @@ or for more details:
```shell
kubectl describe -f myapp.yaml
```
+
输出类似于:
+
```
Name: myapp-pod
Namespace: default
@@ -408,13 +406,26 @@ init containers. [What's next](#what-s-next) contains a link to a more detailed
During Pod startup, the kubelet delays running init containers until the networking
and storage are ready. Then the kubelet runs the Pod's init containers in the order
they appear in the Pod's spec.
+-->
+## 具体行为 {#detailed-behavior}
+在 Pod 启动过程中,每个 Init 容器会在网络和数据卷初始化之后按顺序启动。
+kubelet 运行依据 Init 容器在 Pod 规约中的出现顺序依次运行之。
+
+
+每个 Init 容器成功退出后才会启动下一个 Init 容器。
+如果某容器因为容器运行时的原因无法启动,或以错误状态退出,kubelet 会根据
+Pod 的 `restartPolicy` 策略进行重试。
+然而,如果 Pod 的 `restartPolicy` 设置为 "Always",Init 容器失败时会使用
+`restartPolicy` 的 "OnFailure" 策略。
+
-## 具体行为 {#detailed-behavior}
-
-在 Pod 启动过程中,每个 Init 容器会在网络和数据卷初始化之后按顺序启动。
-kubelet 运行依据 Init 容器在 Pod 规约中的出现顺序依次运行之。
-
-每个 Init 容器成功退出后才会启动下一个 Init 容器。
-如果某容器因为容器运行时的原因无法启动,或以错误状态退出,kubelet 会根据
-Pod 的 `restartPolicy` 策略进行重试。
-然而,如果 Pod 的 `restartPolicy` 设置为 "Always",Init 容器失败时会使用
-`restartPolicy` 的 "OnFailure" 策略。
-
在所有的 Init 容器没有成功之前,Pod 将不会变成 `Ready` 状态。
Init 容器的端口将不会在 Service 中进行聚集。正在初始化中的 Pod 处于 `Pending` 状态,
但会将状况 `Initializing` 设置为 false。
@@ -446,11 +446,6 @@ Altering an init container image field is equivalent to restarting the Pod.
Because init containers can be restarted, retried, or re-executed, init container
code should be idempotent. In particular, code that writes to files on `EmptyDirs`
should be prepared for the possibility that an output file already exists.
-
-Init containers have all of the fields of an app container. However, Kubernetes
-prohibits `readinessProbe` from being used because init containers cannot
-define readiness distinct from completion. This is enforced during validation.
-
-->
对 Init 容器规约的修改仅限于容器的 `image` 字段。
更改 Init 容器的 `image` 字段,等同于重启该 Pod。
@@ -458,6 +453,11 @@ define readiness distinct from completion. This is enforced during validation.
因为 Init 容器可能会被重启、重试或者重新执行,所以 Init 容器的代码应该是幂等的。
特别地,基于 `emptyDirs` 写文件的代码,应该对输出文件可能已经存在做好准备。
+
Init 容器具有应用容器的所有字段。然而 Kubernetes 禁止使用 `readinessProbe`,
因为 Init 容器不能定义不同于完成态(Completion)的就绪态(Readiness)。
Kubernetes 会在校验时强制执行此检查。
@@ -487,31 +487,36 @@ Init 容器一直重复失败。
Given the ordering and execution for init containers, the following rules
for resource usage apply:
+-->
+### 资源 {#resources}
+在给定的 Init 容器执行顺序下,资源使用适用于如下规则:
+
+
+* 所有 Init 容器上定义的任何特定资源的 limit 或 request 的最大值,作为
+ Pod **有效初始 request/limit**。
+ 如果任何资源没有指定资源限制,这被视为最高限制。
+* Pod 对资源的 **有效 limit/request** 是如下两者中的较大者:
+ * 所有应用容器对某个资源的 limit/request 之和
+ * 对某个资源的有效初始 limit/request
+
+
-### 资源 {#resources}
-
-在给定的 Init 容器执行顺序下,资源使用适用于如下规则:
-
-* 所有 Init 容器上定义的任何特定资源的 limit 或 request 的最大值,作为 Pod *有效初始 request/limit*。
- 如果任何资源没有指定资源限制,这被视为最高限制。
-* Pod 对资源的 *有效 limit/request* 是如下两者的较大者:
- * 所有应用容器对某个资源的 limit/request 之和
- * 对某个资源的有效初始 limit/request
* 基于有效 limit/request 完成调度,这意味着 Init 容器能够为初始化过程预留资源,
这些资源在 Pod 生命周期过程中并没有被使用。
-* Pod 的 *有效 QoS 层* ,与 Init 容器和应用容器的一样。
+* Pod 的 **有效 QoS 层** ,与 Init 容器和应用容器的一样。
+### Pod 重启的原因 {#pod-restart-reasons}
+Pod 重启会导致 Init 容器重新执行,主要有如下几个原因:
+
+
-### Pod 重启的原因 {#pod-restart-reasons}
-
-Pod 重启会导致 Init 容器重新执行,主要有如下几个原因:
-
* Pod 的基础设施容器 (译者注:如 `pause` 容器) 被重启。这种情况不多见,
必须由具备 root 权限访问节点的人员来完成。
@@ -549,8 +555,8 @@ applies for Kubernetes v1.20 and later. If you are using an earlier version of
Kubernetes, consult the documentation for the version you are using.
-->
当 Init 容器的镜像发生改变或者 Init 容器的完成记录因为垃圾收集等原因被丢失时,
-Pod 不会被重启。这一行为适用于 Kubernetes v1.20 及更新版本。如果你在使用较早
-版本的 Kubernetes,可查阅你所使用的版本对应的文档。
+Pod 不会被重启。这一行为适用于 Kubernetes v1.20 及更新版本。
+如果你在使用较早版本的 Kubernetes,可查阅你所使用的版本对应的文档。
## {{% heading "whatsnext" %}}
@@ -558,5 +564,6 @@ Pod 不会被重启。这一行为适用于 Kubernetes v1.20 及更新版本。
* Read about [creating a Pod that has an init container](/docs/tasks/configure-pod-container/configure-pod-initialization/#create-a-pod-that-has-an-init-container)
* Learn how to [debug init containers](/docs/tasks/debug/debug-application/debug-init-containers/)
-->
-* 阅读[创建包含 Init 容器的 Pod](/zh/docs/tasks/configure-pod-container/configure-pod-initialization/#create-a-pod-that-has-an-init-container)
-* 学习如何[调试 Init 容器](/zh/docs/tasks/debug/debug-application/debug-init-containers/)
+* 阅读[创建包含 Init 容器的 Pod](/zh-cn/docs/tasks/configure-pod-container/configure-pod-initialization/#create-a-pod-that-has-an-init-container)
+* 学习如何[调试 Init 容器](/zh-cn/docs/tasks/debug/debug-application/debug-init-containers/)
+
diff --git a/content/zh/docs/concepts/workloads/pods/pod-lifecycle.md b/content/zh-cn/docs/concepts/workloads/pods/pod-lifecycle.md
similarity index 100%
rename from content/zh/docs/concepts/workloads/pods/pod-lifecycle.md
rename to content/zh-cn/docs/concepts/workloads/pods/pod-lifecycle.md
diff --git a/content/zh/docs/concepts/workloads/pods/pod-topology-spread-constraints.md b/content/zh-cn/docs/concepts/workloads/pods/pod-topology-spread-constraints.md
similarity index 83%
rename from content/zh/docs/concepts/workloads/pods/pod-topology-spread-constraints.md
rename to content/zh-cn/docs/concepts/workloads/pods/pod-topology-spread-constraints.md
index ab91304c04..5c698ac514 100644
--- a/content/zh/docs/concepts/workloads/pods/pod-topology-spread-constraints.md
+++ b/content/zh-cn/docs/concepts/workloads/pods/pod-topology-spread-constraints.md
@@ -10,19 +10,14 @@ content_type: concept
weight: 40
-->
-{{< feature-state for_k8s_version="v1.19" state="stable" >}}
-
-
你可以使用 _拓扑分布约束(Topology Spread Constraints)_ 来控制
-{{< glossary_tooltip text="Pods" term_id="Pod" >}} 在集群内故障域
-之间的分布,例如区域(Region)、可用区(Zone)、节点和其他用户自定义拓扑域。
+{{< glossary_tooltip text="Pod" term_id="Pod" >}} 在集群内故障域之间的分布,
+例如区域(Region)、可用区(Zone)、节点和其他用户自定义拓扑域。
这样做有助于实现高可用并提升资源利用率。
@@ -123,31 +118,75 @@ You can define one or multiple `topologySpreadConstraint` to instruct the kube-s
- when `whenUnsatisfiable` equals to "DoNotSchedule", `maxSkew` is the maximum
permitted difference between the number of matching pods in the target
topology and the global minimum.
+ (the minimum number of pods that match the label selector in a topology domain.
+ For example, if you have 3 zones with 0, 2 and 3 matching pods respectively,
+ The global minimum is 0).
- when `whenUnsatisfiable` equals to "ScheduleAnyway", scheduler gives higher
precedence to topologies that would help reduce the skew.
+-->
+
+- **maxSkew** 描述 Pod 分布不均的程度。这是给定拓扑类型中任意两个拓扑域中匹配的
+ Pod 之间的最大允许差值。它必须大于零。取决于 `whenUnsatisfiable` 的取值,
+ 其语义会有不同。
+ - 当 `whenUnsatisfiable` 等于 "DoNotSchedule" 时,`maxSkew` 是目标拓扑域中匹配的
+ Pod 数与全局最小值(一个拓扑域中与标签选择器匹配的 Pod 的最小数量。例如,如果你有
+ 3 个区域,分别具有 0 个、2 个 和 3 个匹配的 Pod,则全局最小值为 0。)之间可存在的差异。
+ - 当 `whenUnsatisfiable` 等于 "ScheduleAnyway" 时,调度器会更为偏向能够降低偏差值的拓扑域。
+
+
+- **minDomains** 表示符合条件的域的最小数量。域是拓扑的一个特定实例。
+ 符合条件的域是其节点与节点选择器匹配的域。
+
+ - 指定的 `minDomains` 的值必须大于 0。
+ - 当符合条件的、拓扑键匹配的域的数量小于 `minDomains` 时,Pod 拓扑分布将“全局最小值”
+ (global minimum)设为 0,然后进行 `skew` 计算。“全局最小值”是一个符合条件的域中匹配
+ Pod 的最小数量,如果符合条件的域的数量小于 `minDomains`,则全局最小值为零。
+ - 当符合条件的拓扑键匹配域的个数等于或大于 `minDomains` 时,该值对调度没有影响。
+ - 当 `minDomains` 为 nil 时,约束的行为等于 `minDomains` 为 1。
+ - 当 `minDomains` 不为 nil 时,`whenUnsatisfiable` 的值必须为 "`DoNotSchedule`" 。
+
+ {{< note >}}
+
+ `minDomains` 字段是在 1.24 版本中新增的 alpha 字段。你必须启用
+ `MinDomainsInPodToplogySpread` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)才能使用它。
+ {{< /note >}}
+
+
-
-- **maxSkew** 描述 Pod 分布不均的程度。这是给定拓扑类型中任意两个拓扑域中
- 匹配的 pod 之间的最大允许差值。它必须大于零。取决于 `whenUnsatisfiable` 的
- 取值,其语义会有不同。
- - 当 `whenUnsatisfiable` 等于 "DoNotSchedule" 时,`maxSkew` 是目标拓扑域
- 中匹配的 Pod 数与全局最小值之间可存在的差异。
- - 当 `whenUnsatisfiable` 等于 "ScheduleAnyway" 时,调度器会更为偏向能够降低
- 偏差值的拓扑域。
- **topologyKey** 是节点标签的键。如果两个节点使用此键标记并且具有相同的标签值,
- 则调度器会将这两个节点视为处于同一拓扑域中。调度器试图在每个拓扑域中放置数量
- 均衡的 Pod。
+ 则调度器会将这两个节点视为处于同一拓扑域中。调度器试图在每个拓扑域中放置数量均衡的 Pod。
+
- **whenUnsatisfiable** 指示如果 Pod 不满足分布约束时如何处理:
- `DoNotSchedule`(默认)告诉调度器不要调度。
- - `ScheduleAnyway` 告诉调度器仍然继续调度,只是根据如何能将偏差最小化来对
- 节点进行排序。
-- **labelSelector** 用于查找匹配的 pod。匹配此标签的 Pod 将被统计,以确定相应
- 拓扑域中 Pod 的数量。
+ - `ScheduleAnyway` 告诉调度器仍然继续调度,只是根据如何能将偏差最小化来对节点进行排序。
+
+- **labelSelector** 用于查找匹配的 Pod。匹配此标签的 Pod 将被统计,
+ 以确定相应拓扑域中 Pod 的数量。
有关详细信息,请参考[标签选择算符](/zh/docs/concepts/overview/working-with-objects/labels/#label-selectors)。
-你可以执行 `kubectl explain Pod.spec.topologySpreadConstraints` 命令以
-了解关于 topologySpreadConstraints 的更多信息。
+你可以执行 `kubectl explain Pod.spec.topologySpreadConstraints`
+命令以了解关于 topologySpreadConstraints 的更多信息。
`topologyKey: zone` 意味着均匀分布将只应用于存在标签键值对为
-"zone:<any value>" 的节点。
+"zone:<任何值>" 的节点。
`whenUnsatisfiable: DoNotSchedule` 告诉调度器如果新的 Pod 不满足约束,
则让它保持悬决状态。
-如果调度器将新的 Pod 放入 "zoneA",Pods 分布将变为 [3, 1],因此实际的偏差
-为 2(3 - 1)。这违反了 `maxSkew: 1` 的约定。此示例中,新 Pod 只能放置在
+如果调度器将新的 Pod 放入 "zoneA",Pods 分布将变为 [3, 1],因此实际的偏差为
+2(3 - 1)。这违反了 `maxSkew: 1` 的约定。此示例中,新 Pod 只能放置在
"zoneB" 上:
{{}}
@@ -313,8 +351,8 @@ You can use 2 TopologySpreadConstraints to control the Pods spreading on both zo
In this case, to match the first constraint, the incoming Pod can only be placed onto "zoneB"; while in terms of the second constraint, the incoming Pod can only be placed onto "node4". Then the results of 2 constraints are ANDed, so the only viable option is to place on "node4".
-->
在这种情况下,为了匹配第一个约束,新的 Pod 只能放置在 "zoneB" 中;而在第二个约束中,
-新的 Pod 只能放置在 "node4" 上。最后两个约束的结果加在一起,唯一可行的选择是放置
-在 "node4" 上。
+新的 Pod 只能放置在 "node4" 上。最后两个约束的结果加在一起,唯一可行的选择是放置在
+"node4" 上。
如果对集群应用 "two-constraints.yaml",会发现 "mypod" 处于 `Pending` 状态。
这是因为:为了满足第一个约束,"mypod" 只能放在 "zoneB" 中,而第二个约束要求
@@ -406,7 +444,7 @@ class zoneC cluster;
而且你知道 "zoneC" 必须被排除在外。在这种情况下,可以按如下方式编写 YAML,
以便将 "mypod" 放置在 "zoneB" 上,而不是 "zoneC" 上。同样,`spec.nodeSelector`
@@ -437,7 +475,7 @@ There are some implicit conventions worth noting here:
- The scheduler will bypass the nodes without `topologySpreadConstraints[*].topologyKey` present. This implies that:
1. the Pods located on those nodes do not impact `maxSkew` calculation - in the above example, suppose "node1" does not have label "zone", then the 2 Pods will be disregarded, hence the incoming Pod will be scheduled into "zoneA".
- 2. the incoming Pod has no chances to be scheduled onto this kind of nodes - in the above example, suppose a "node5" carrying label `{zone-typo: zoneC}` joins the cluster, it will be bypassed due to the absence of label key "zone".
+ 2. the incoming Pod has no chances to be scheduled onto such nodes - in the above example, suppose a "node5" carrying label `{zone-typo: zoneC}` joins the cluster, it will be bypassed due to the absence of label key "zone".
-->
- 只有与新的 Pod 具有相同命名空间的 Pod 才能作为匹配候选者。
- 调度器会忽略没有 `topologySpreadConstraints[*].topologyKey` 的节点。这意味着:
@@ -452,8 +490,8 @@ There are some implicit conventions worth noting here:
-- 注意,如果新 Pod 的 `topologySpreadConstraints[*].labelSelector` 与自身的
- 标签不匹配,将会发生什么。
+- 注意,如果新 Pod 的 `topologySpreadConstraints[*].labelSelector`
+ 与自身的标签不匹配,将会发生什么。
在上面的例子中,如果移除新 Pod 上的标签,Pod 仍然可以调度到 "zoneB",因为约束仍然满足。
然而,在调度之后,集群的不平衡程度保持不变。zoneA 仍然有 2 个带有 {foo:bar} 标签的 Pod,
zoneB 有 1 个带有 {foo:bar} 标签的 Pod。
@@ -471,8 +509,8 @@ topology spread constraints are applied to a Pod if, and only if:
-->
### 集群级别的默认约束 {#cluster-level-default-constraints}
-为集群设置默认的拓扑分布约束也是可能的。默认拓扑分布约束在且仅在以下条件满足
-时才会应用到 Pod 上:
+为集群设置默认的拓扑分布约束也是可能的。
+默认拓扑分布约束在且仅在以下条件满足时才会被应用到 Pod 上:
- Pod 没有在其 `.spec.topologySpreadConstraints` 设置任何约束;
- Pod 隶属于某个服务、副本控制器、ReplicaSet 或 StatefulSet。
@@ -511,16 +549,12 @@ profiles:
{{< note >}}
-默认调度约束所生成的评分可能与
-[`SelectorSpread` 插件](/zh/docs/reference/scheduling/config/#scheduling-plugins)
-所生成的评分有冲突。
-建议你在为 `PodTopologySpread` 设置默认约束是禁用调度方案中的该插件。
+[`SelectorSpread` 插件](/zh/docs/reference/scheduling/config/#scheduling-plugins)默认是被禁用的。
+建议使用 `PodTopologySpread` 来实现类似的行为。
{{< /note >}}
#### 内部默认约束 {#internal-default-constraints}
-{{< feature-state for_k8s_version="v1.20" state="beta" >}}
+{{< feature-state for_k8s_version="v1.24" state="stable" >}}
-当你使用了默认启用的 `DefaultPodTopologySpread` 特性门控时,原来的
-`SelectorSpread` 插件会被禁用。
-kube-scheduler 会使用下面的默认拓扑约束作为 `PodTopologySpread` 插件的
-配置:
+如果你没有为 Pod 拓扑分布配置任何集群级别的默认约束,
+kube-scheduler 的行为就像你指定了以下默认拓扑约束一样:
```yaml
defaultConstraints:
@@ -553,9 +583,9 @@ defaultConstraints:
-此外,原来用于提供等同行为的 `SelectorSpread` 插件也会被禁用。
+此外,原来用于提供等同行为的 `SelectorSpread` 插件默认被禁用。
{{< note >}}
{{< note >}}
要了解有关为 Kubernetes 做出贡献的更多信息,请参阅
[贡献者文档](https://www.kubernetes.dev/docs/)。
-{{< /note >}}
+
+你还可以阅读
+{{< glossary_tooltip text="CNCF" term_id="cncf" >}}
+关于为 Kubernetes 做贡献的[页面](https://contribute.cncf.io/contributors/projects/#kubernetes)。
-SIG Docs 的[批准人(Approvers)](/zh/docs/contribute/participate/roles-and-responsibilites/#approvers)们每周轮流负责
+SIG Docs 的[批准人(Approvers)](/zh/docs/contribute/participate/roles-and-responsibilities/#approvers)们每周轮流负责
[管理仓库的 PR](https://github.com/kubernetes/website/wiki/PR-Wranglers)。
本节介绍 PR 管理者的职责。关于如何提供较好的评审意见,
@@ -179,10 +179,10 @@ To close a pull request, leave a `/close` comment on the PR.
要关闭 PR,请在 PR 上输入 `/close` 评论。
{{< note >}}
-一个名为 [`fejta-bot`](https://github.com/fejta-bot) 的自动服务会在 Issue 停滞 90
+一个名为 [`k8s-ci-robot`](https://github.com/k8s-ci-robot) 的自动服务会在 Issue 停滞 90
天后自动将其标记为过期;然后再等 30 天,如果仍然无人过问,则将其关闭。
PR 管理者应该在 issues 处于无人过问状态 14-30 天后关闭它们。
{{< /note >}}
@@ -206,7 +206,7 @@ In late 2021, SIG Docs introduced the PR Wrangler Shadow Program. The program wa
- Others can reach out on the [#sig-docs Slack channel](https://kubernetes.slack.com/messages/sig-docs) for requesting to shadow an assigned PR Wrangler for a specific week. Feel free to reach out to Brad Topol (`@bradtopol`) or one of the [SIG Docs co-chairs/leads](https://github.com/kubernetes/community/tree/master/sig-docs#leadership).
-- Once you've signed up to shadow a PR Wrangler, introduce yourself to the PR Wrangler on the [Kubernetes Slack](slack.k8s.io).
+- Once you've signed up to shadow a PR Wrangler, introduce yourself to the PR Wrangler on the [Kubernetes Slack](https://slack.k8s.io).
-->
### 成为一名影子
@@ -221,4 +221,4 @@ In late 2021, SIG Docs introduced the PR Wrangler Shadow Program. The program wa
[SIG Docs 联席主席/主管](https://github.com/kubernetes/community/tree/master/sig-docs#leadership)。
- 注册成为一名 PR 管理者的影子时,
- 请你在 [Kubernetes Slack](slack.k8s.io) 向这名 PR 管理者做一次自我介绍。
+ 请你在 [Kubernetes Slack](https://slack.k8s.io) 向这名 PR 管理者做一次自我介绍。
diff --git a/content/zh/docs/contribute/participate/roles-and-responsibilities.md b/content/zh-cn/docs/contribute/participate/roles-and-responsibilities.md
similarity index 100%
rename from content/zh/docs/contribute/participate/roles-and-responsibilities.md
rename to content/zh-cn/docs/contribute/participate/roles-and-responsibilities.md
diff --git a/content/zh/docs/contribute/review/_index.md b/content/zh-cn/docs/contribute/review/_index.md
similarity index 100%
rename from content/zh/docs/contribute/review/_index.md
rename to content/zh-cn/docs/contribute/review/_index.md
diff --git a/content/zh/docs/contribute/review/for-approvers.md b/content/zh-cn/docs/contribute/review/for-approvers.md
similarity index 100%
rename from content/zh/docs/contribute/review/for-approvers.md
rename to content/zh-cn/docs/contribute/review/for-approvers.md
diff --git a/content/zh/docs/contribute/review/reviewing-prs.md b/content/zh-cn/docs/contribute/review/reviewing-prs.md
similarity index 99%
rename from content/zh/docs/contribute/review/reviewing-prs.md
rename to content/zh-cn/docs/contribute/review/reviewing-prs.md
index 7710a6dc14..d8eb48f1d6 100644
--- a/content/zh/docs/contribute/review/reviewing-prs.md
+++ b/content/zh-cn/docs/contribute/review/reviewing-prs.md
@@ -164,7 +164,7 @@ Figure 1. Review process steps.
1. Click on the `+` symbol beside the line you want to comment on.
2. Fill in any comments you have about the line and click either **Add single comment** (if you have only one comment to make) or **Start a review** (if you have multiple comments to make).
3. When finished, click **Review changes** at the top of the page. Here, you can add
- add a summary of your review (and leave some positive comments for the contributor!),
+ a summary of your review (and leave some positive comments for the contributor!),
approve the PR, comment or request changes as needed. New contributors should always
choose **Comment**.
-->
diff --git a/content/zh/docs/contribute/style/_index.md b/content/zh-cn/docs/contribute/style/_index.md
similarity index 100%
rename from content/zh/docs/contribute/style/_index.md
rename to content/zh-cn/docs/contribute/style/_index.md
diff --git a/content/zh/docs/contribute/style/content-guide.md b/content/zh-cn/docs/contribute/style/content-guide.md
similarity index 85%
rename from content/zh/docs/contribute/style/content-guide.md
rename to content/zh-cn/docs/contribute/style/content-guide.md
index 1f787a1b93..91e9d0ee96 100644
--- a/content/zh/docs/contribute/style/content-guide.md
+++ b/content/zh-cn/docs/contribute/style/content-guide.md
@@ -15,19 +15,19 @@ weight: 10
本页包含 Kubernetes 文档的一些指南。
-如果你不清楚哪些事情是可以做的,请加入到
-[Kubernetes Slack](http://slack.k8s.io/) 的 `#sig-docs` 频道提问!
-你可以在 http://slack.k8s.io 注册到 Kubernetes Slack。
+如果你不清楚哪些事情是可以做的,请加入到
+[Kubernetes Slack](https://slack.k8s.io/) 的 `#sig-docs` 频道提问!
+你可以在 https://slack.k8s.io 注册到 Kubernetes Slack。
关于为 Kubernetes 文档创建新内容的更多信息,可参考
[样式指南](/zh/docs/contribute/style/style-guide)。
@@ -42,7 +42,7 @@ Source for the Kubernetes website, including the docs, resides in the
Located in the `kubernetes/website/content//docs` folder, the
majority of Kubernetes documentation is specific to the [Kubernetes
-project](https://github.com/kubernetes/kubernetes).
+project](https://github.com/kubernetes/kubernetes).
## What's allowed
@@ -72,12 +72,12 @@ Kubernetes 网站(包括其文档)源代码位于
### Third party content
Kubernetes documentation includes applied examples of projects in the Kubernetes project—projects that live in the [kubernetes](https://github.com/kubernetes) and
-[kubernetes-sigs](https://github.com/kubernetes-sigs) GitHub organizations.
+[kubernetes-sigs](https://github.com/kubernetes-sigs) GitHub organizations.
-Links to active content in the Kubernetes project are always allowed.
+Links to active content in the Kubernetes project are always allowed.
-Kubernetes requires some third party content to function. Examples include container runtimes (containerd, CRI-O, Docker),
-[networking policy](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) (CNI plugins), [Ingress controllers](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/), and [logging](https://kubernetes.io/docs/concepts/cluster-administration/logging/).
+Kubernetes requires some third party content to function. Examples include container runtimes (containerd, CRI-O, Docker),
+[networking policy](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) (CNI plugins), [Ingress controllers](/docs/concepts/services-networking/ingress-controllers/), and [logging](/docs/concepts/cluster-administration/logging/).
Docs can link to third-party open source software (OSS) outside the Kubernetes project only if it's necessary for Kubernetes to function.
-->
@@ -94,7 +94,7 @@ Kubernetes 需要某些第三方内容才能正常工作。例如
容器运行时(containerd、CRI-O、Docker),
[联网策略](/zh/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/)
(CNI 插件),[Ingress 控制器](/zh/docs/concepts/services-networking/ingress-controllers/)
-以及[日志](https://kubernetes.io/zh/docs/concepts/cluster-administration/logging/)等。
+以及[日志](/zh/docs/concepts/cluster-administration/logging/)等。
只有对应的第三方开源软件(OSS)是运行 Kubernetes 所必需的,才可以在文档中包含
指向这些 Kubernetes 项目之外的软件的链接。
@@ -109,7 +109,8 @@ Dual-sourced content requires double the effort (or more!) to maintain
and grows stale more quickly.
{{< note >}}
-If you're a maintainer for a Kubernetes project and need help hosting your own docs,
+
+If you're a maintainer for a Kubernetes project and need help hosting your own docs,
ask for help in [#sig-docs on Kubernetes Slack](https://kubernetes.slack.com/messages/C1J0BPD2M/).
{{< /note >}}
-->
@@ -128,15 +129,13 @@ ask for help in [#sig-docs on Kubernetes Slack](https://kubernetes.slack.com/mes
### 更多信息 {#more-information}
-如果你对允许出现的内容有疑问,请加入到 [Kubernetes Slack](http://slack.k8s.io/)
+如果你对允许出现的内容有疑问,请加入到 [Kubernetes Slack](https://slack.k8s.io/)
的 `#sig-docs` 频道提问!
## {{% heading "whatsnext" %}}
* 阅读[样式指南](/zh/docs/contribute/style/style-guide)。
-
-
diff --git a/content/zh/docs/contribute/style/content-organization.md b/content/zh-cn/docs/contribute/style/content-organization.md
similarity index 100%
rename from content/zh/docs/contribute/style/content-organization.md
rename to content/zh-cn/docs/contribute/style/content-organization.md
diff --git a/content/zh/docs/contribute/style/diagram-guide.md b/content/zh-cn/docs/contribute/style/diagram-guide.md
similarity index 100%
rename from content/zh/docs/contribute/style/diagram-guide.md
rename to content/zh-cn/docs/contribute/style/diagram-guide.md
diff --git a/content/zh/docs/contribute/style/hugo-shortcodes/example1.md b/content/zh-cn/docs/contribute/style/hugo-shortcodes/example1.md
similarity index 100%
rename from content/zh/docs/contribute/style/hugo-shortcodes/example1.md
rename to content/zh-cn/docs/contribute/style/hugo-shortcodes/example1.md
diff --git a/content/zh/docs/contribute/style/hugo-shortcodes/example2.md b/content/zh-cn/docs/contribute/style/hugo-shortcodes/example2.md
similarity index 100%
rename from content/zh/docs/contribute/style/hugo-shortcodes/example2.md
rename to content/zh-cn/docs/contribute/style/hugo-shortcodes/example2.md
diff --git a/content/zh/docs/contribute/style/hugo-shortcodes/index.md b/content/zh-cn/docs/contribute/style/hugo-shortcodes/index.md
similarity index 100%
rename from content/zh/docs/contribute/style/hugo-shortcodes/index.md
rename to content/zh-cn/docs/contribute/style/hugo-shortcodes/index.md
diff --git a/content/zh/docs/contribute/style/hugo-shortcodes/podtemplate.json b/content/zh-cn/docs/contribute/style/hugo-shortcodes/podtemplate.json
similarity index 100%
rename from content/zh/docs/contribute/style/hugo-shortcodes/podtemplate.json
rename to content/zh-cn/docs/contribute/style/hugo-shortcodes/podtemplate.json
diff --git a/content/zh/docs/contribute/style/page-content-types.md b/content/zh-cn/docs/contribute/style/page-content-types.md
similarity index 100%
rename from content/zh/docs/contribute/style/page-content-types.md
rename to content/zh-cn/docs/contribute/style/page-content-types.md
diff --git a/content/zh/docs/contribute/style/style-guide.md b/content/zh-cn/docs/contribute/style/style-guide.md
similarity index 100%
rename from content/zh/docs/contribute/style/style-guide.md
rename to content/zh-cn/docs/contribute/style/style-guide.md
diff --git a/content/zh/docs/contribute/style/write-new-topic.md b/content/zh-cn/docs/contribute/style/write-new-topic.md
similarity index 100%
rename from content/zh/docs/contribute/style/write-new-topic.md
rename to content/zh-cn/docs/contribute/style/write-new-topic.md
diff --git a/content/zh/docs/contribute/suggesting-improvements.md b/content/zh-cn/docs/contribute/suggesting-improvements.md
similarity index 100%
rename from content/zh/docs/contribute/suggesting-improvements.md
rename to content/zh-cn/docs/contribute/suggesting-improvements.md
diff --git a/content/zh/docs/doc-contributor-tools/linkchecker/README.md b/content/zh-cn/docs/doc-contributor-tools/linkchecker/README.md
similarity index 87%
rename from content/zh/docs/doc-contributor-tools/linkchecker/README.md
rename to content/zh-cn/docs/doc-contributor-tools/linkchecker/README.md
index 86d1c81683..6f31aed3ab 100644
--- a/content/zh/docs/doc-contributor-tools/linkchecker/README.md
+++ b/content/zh-cn/docs/doc-contributor-tools/linkchecker/README.md
@@ -1,24 +1,26 @@
-
# 内置链接检查工具
-
-你可以使用 [htmltest](https://github.com/wjdp/htmltest) 来检查 [`/content/en/`](https://git.k8s.io/website/content/en/) 下面的失效链接。这在重构章节内容、移动页面或者重命名文件或页眉时非常有用。
+你可以使用 [htmltest](https://github.com/wjdp/htmltest) 来检查
+[`/content/en/`](https://git.k8s.io/website/content/en/) 下面的失效链接。
+这在重构章节内容、移动页面或者重命名文件或页眉时非常有用。
-
## 工作原理
-
`htmltest` 会扫描 kubernetes website 仓库构建生成的 HTML 文件。通过执行 `make` 命令进行了下列操作:
-
## 哪些链接不会检查
-
-该链接检查器扫描生成的 HTML 文件,而非原始的 Markdown. 该 htmltest 工具依赖于一个配置文件,[`.htmltest.yml`](https://git.k8s.io/website/.htmltest.yml),来决定检查哪些内容。
+该链接检查器扫描生成的 HTML 文件,而非原始的 Markdown. 该 htmltest 工具依赖于配置文件
+[`.htmltest.yml`](https://git.k8s.io/website/.htmltest.yml),来决定检查哪些内容。
该链接检查器扫描以下内容:
-
该链接检查器不会扫描以下内容:
-
- 包含在顶部和侧边导航栏的链接,以及页脚链接或者页面的 `` 部分中的链接,例如 CSS 样式表、脚本以及元信息的链接。
-- 顶级页面及其子页面,例如: `/training`, `/community`, `/case-studies/adidas`
+- 顶级页面及其子页面,例如:`/training`、`/community`、`/case-studies/adidas`
- 博客文章
-- API 参考文档,例如:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/
+- API 参考文档,例如: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/
- 本地化内容
-
## 先决条件以及安装说明
-
必须安装:
* [Docker](https://docs.docker.com/get-docker/)
* [make](https://www.gnu.org/software/make/)
-
-
## 运行链接检查器
-
运行链接检查器需要:
-
## 理解输出的内容
-
如果链接检查器发现了失效链接,则输出内容类似如下:
@@ -125,7 +128,7 @@ tasks/access-kubernetes-api/custom-resources/index.html
hash does not exist --- tasks/access-kubernetes-api/custom-resources/index.html --> #preserving-unknown-fields
```
-
这是一系列失效链接。该日志附带了每个页面下的失效链接。
-在这部分输出中,包含失效链接的文件是 `tasks/access-kubernetes-api/custom-resources.md`.
+在这部分输出中,包含失效链接的文件是 `tasks/access-kubernetes-api/custom-resources.md`。
-该工具给出了一个理由:`hash does not exist`. 在大部分情况下,你可以忽略这个。
+该工具给出了一个理由:`hash does not exist`,在大部分情况下,你可以忽略这个。
-目标链接是 `#preserving-unknown-fields`.
+目标链接是 `#preserving-unknown-fields`。
修复这个问题的一种方式是:
-
运行 htmltest 来验证失效链接是否已修复。
\ No newline at end of file
diff --git a/content/zh/docs/home/_index.md b/content/zh-cn/docs/home/_index.md
similarity index 100%
rename from content/zh/docs/home/_index.md
rename to content/zh-cn/docs/home/_index.md
diff --git a/content/zh-cn/docs/home/supported-doc-versions.md b/content/zh-cn/docs/home/supported-doc-versions.md
new file mode 100644
index 0000000000..d455a039a3
--- /dev/null
+++ b/content/zh-cn/docs/home/supported-doc-versions.md
@@ -0,0 +1,34 @@
+---
+title: Kubernetes 文档支持的版本
+content_type: custom
+layout: supported-versions
+card:
+ name: about
+ weight: 10
+ title: Kubernetes 文档支持的版本
+---
+
+
+
+
+
+本网站包含当前版本和之前四个版本的 Kubernetes 文档。
+
+Kubernetes 版本的文档可用性与当前是否支持该版本是分开的。
+阅读[支持期限](/zh/releases/patch-releases/#support-period),了解官方支持 Kubernetes 的哪些版本,以及支持多长时间。
diff --git a/content/zh/docs/images/diagram-guide-example-3.svg b/content/zh-cn/docs/images/diagram-guide-example-3.svg
similarity index 100%
rename from content/zh/docs/images/diagram-guide-example-3.svg
rename to content/zh-cn/docs/images/diagram-guide-example-3.svg
diff --git a/content/zh/docs/images/ha-control-plane.svg b/content/zh-cn/docs/images/ha-control-plane.svg
similarity index 100%
rename from content/zh/docs/images/ha-control-plane.svg
rename to content/zh-cn/docs/images/ha-control-plane.svg
diff --git a/content/zh-cn/docs/images/ingress.svg b/content/zh-cn/docs/images/ingress.svg
new file mode 100644
index 0000000000..450a0aae9b
--- /dev/null
+++ b/content/zh-cn/docs/images/ingress.svg
@@ -0,0 +1 @@
+cluster
Ingress-managed load balancer
routing rule
Ingress
Pod
Service
Pod
client
\ No newline at end of file
diff --git a/content/zh-cn/docs/images/ingressFanOut.svg b/content/zh-cn/docs/images/ingressFanOut.svg
new file mode 100644
index 0000000000..a6bf202635
--- /dev/null
+++ b/content/zh-cn/docs/images/ingressFanOut.svg
@@ -0,0 +1 @@
+cluster
Ingress-managed load balancer
/foo
/bar
Ingress, 178.91.123.132
Pod
Service service1:4200
Pod
Pod
Service service2:8080
Pod
client
\ No newline at end of file
diff --git a/content/zh-cn/docs/images/ingressNameBased.svg b/content/zh-cn/docs/images/ingressNameBased.svg
new file mode 100644
index 0000000000..7e1d7be98c
--- /dev/null
+++ b/content/zh-cn/docs/images/ingressNameBased.svg
@@ -0,0 +1 @@
+cluster
Ingress-managed load balancer
Host: foo.bar.com
Host: bar.foo.com
Ingress, 178.91.123.132
Pod
Service service1:80
Pod
Pod
Service service2:80
Pod
client
\ No newline at end of file
diff --git a/content/zh-cn/docs/images/tutor-service-nodePort-fig01.svg b/content/zh-cn/docs/images/tutor-service-nodePort-fig01.svg
new file mode 100644
index 0000000000..bb4d866f85
--- /dev/null
+++ b/content/zh-cn/docs/images/tutor-service-nodePort-fig01.svg
@@ -0,0 +1 @@
+
SNAT
SNAT
client
Node 2
Node 1
Endpoint
\ No newline at end of file
diff --git a/content/zh-cn/docs/images/tutor-service-nodePort-fig02.svg b/content/zh-cn/docs/images/tutor-service-nodePort-fig02.svg
new file mode 100644
index 0000000000..1a891575e5
--- /dev/null
+++ b/content/zh-cn/docs/images/tutor-service-nodePort-fig02.svg
@@ -0,0 +1 @@
+
client
Node 1
Node 2
endpoint
\ No newline at end of file
diff --git a/content/zh/docs/reference/_index.md b/content/zh-cn/docs/reference/_index.md
similarity index 96%
rename from content/zh/docs/reference/_index.md
rename to content/zh-cn/docs/reference/_index.md
index 1f3a9dcd93..af2a04118b 100644
--- a/content/zh/docs/reference/_index.md
+++ b/content/zh-cn/docs/reference/_index.md
@@ -137,6 +137,7 @@ operator to use or manage a cluster.
* [kube-apiserver configuration (v1alpha1)](/docs/reference/config-api/apiserver-config.v1alpha1/)
* [kube-apiserver configuration (v1)](/docs/reference/config-api/apiserver-config.v1/)
* [kube-apiserver encryption (v1)](/docs/reference/config-api/apiserver-encryption.v1/)
+* [kube-apiserver event rate limit (v1alpha1)](/docs/reference/config-api/apiserver-eventratelimit.v1/)
* [kubelet configuration (v1alpha1)](/docs/reference/config-api/kubelet-config.v1alpha1/) and
[kubelet configuration (v1beta1)](/docs/reference/config-api/kubelet-config.v1beta1/)
* [kubelet credential providers (v1alpha1)](/docs/reference/config-api/kubelet-credentialprovider.v1alpha1/)
@@ -148,6 +149,7 @@ operator to use or manage a cluster.
* [Client authentication API (v1beta1)](/docs/reference/config-api/client-authentication.v1beta1/) and
[Client authentication API (v1)](/docs/reference/config-api/client-authentication.v1/)
* [WebhookAdmission configuration (v1)](/docs/reference/config-api/apiserver-webhookadmission.v1/)
+* [ImagePolicy API (v1alpha1)](/docs/reference/config-api/imagepolicy.v1alpha1/)
-->
## 配置 API
@@ -158,6 +160,7 @@ operator to use or manage a cluster.
* [kube-apiserver 配置 (v1alpha1)](/zh/docs/reference/config-api/apiserver-config.v1alpha1/)
* [kube-apiserver 配置 (v1)](/zh/docs/reference/config-api/apiserver-config.v1/)
* [kube-apiserver 加密 (v1)](/zh/docs/reference/config-api/apiserver-encryption.v1/)
+* [kube-apiserver 事件速率限制 (v1alpha1)](/zh/docs/reference/config-api/apiserver-eventratelimit.v1/)
* [kubelet 配置 (v1alpha1)](/zh/docs/reference/config-api/kubelet-config.v1alpha1/) 和
[kubelet 配置 (v1beta1)](/zh/docs/reference/config-api/kubelet-config.v1beta1/)
* [kubelet 凭据驱动 (v1alpha1)](/zh/docs/reference/config-api/kubelet-credentialprovider.v1alpha1/)
@@ -169,6 +172,7 @@ operator to use or manage a cluster.
* [客户端认证 API (v1beta1)](/zh/docs/reference/config-api/client-authentication.v1beta1/) 和
[客户端认证 API (v1)](/zh/docs/reference/config-api/client-authentication.v1/)
* [WebhookAdmission 配置 (v1)](/zh/docs/reference/config-api/apiserver-webhookadmission.v1/)
+* [ImagePolicy API (v1alpha1)](/zh/docs/reference/config-api/imagepolicy.v1alpha1/)
- [身份认证](/zh/docs/reference/access-authn-authz/authentication/)
- [使用启动引导令牌来执行身份认证](/zh/docs/reference/access-authn-authz/bootstrap-tokens/)
@@ -53,4 +55,5 @@ Reference documentation:
- 服务账号
- [开发者指南](/zh/docs/tasks/configure-pod-container/configure-service-account/)
- [管理文档](/zh/docs/reference/access-authn-authz/service-accounts-admin/)
-
+- [Kubelet 认证和鉴权](/zh/docs/reference/access-authn-authz/kubelet-authn-authz/)
+ - 包括 kubelet [TLS 启动引导](/zh/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/)
diff --git a/content/zh/docs/reference/access-authn-authz/abac.md b/content/zh-cn/docs/reference/access-authn-authz/abac.md
similarity index 100%
rename from content/zh/docs/reference/access-authn-authz/abac.md
rename to content/zh-cn/docs/reference/access-authn-authz/abac.md
diff --git a/content/zh/docs/reference/access-authn-authz/admission-controllers.md b/content/zh-cn/docs/reference/access-authn-authz/admission-controllers.md
similarity index 58%
rename from content/zh/docs/reference/access-authn-authz/admission-controllers.md
rename to content/zh-cn/docs/reference/access-authn-authz/admission-controllers.md
index b5f0976fcd..b1068539c5 100644
--- a/content/zh/docs/reference/access-authn-authz/admission-controllers.md
+++ b/content/zh-cn/docs/reference/access-authn-authz/admission-controllers.md
@@ -21,14 +21,14 @@ weight: 30
-此页面概述了准入控制器。
+此页面提供准入控制器(Admission Controllers)的概述。
-## 什么是准入控制插件?
+## 什么是准入控制插件? {#what-are-they}
准入控制器是一段代码,它会在请求通过认证和授权之后、对象被持久化之前拦截到达 API
服务器的请求。控制器由下面的[列表](#what-does-each-admission-controller-do)组成,
-并编译进 `kube-apiserver` 二进制文件,并且只能由集群管理员配置。
+并编译进 `kube-apiserver` 可执行文件,并且只能由集群管理员配置。
在该列表中,有两个特殊的控制器:MutatingAdmissionWebhook 和 ValidatingAdmissionWebhook。
它们根据 API 中的配置,分别执行变更和验证
[准入控制 webhook](/zh/docs/reference/access-authn-authz/extensible-admission-controllers/#admission-webhooks)。
@@ -64,14 +64,14 @@ If any of the controllers in either phase reject the request, the entire
request is rejected immediately and an error is returned to the end-user.
-->
准入控制器可以执行 “验证(Validating)” 和/或 “变更(Mutating)” 操作。
-变更(mutating)控制器可以根据被其接受的请求修改相关对象;验证(validating)控制器则不行。
+变更(mutating)控制器可以根据被其接受的请求更改相关对象;验证(validating)控制器则不行。
准入控制器限制创建、删除、修改对象或连接到代理的请求,不限制读取对象的请求。
准入控制过程分为两个阶段。第一阶段,运行变更准入控制器。第二阶段,运行验证准入控制器。
再次提醒,某些控制器既是变更准入控制器又是验证准入控制器。
-如果任何一个阶段的任何控制器拒绝了该请求,则整个请求将立即被拒绝,并向终端用户返回一个错误。
+如果两个阶段之一的任何一个控制器拒绝了某请求,则整个请求将立即被拒绝,并向最终用户返回错误。
-最后,除了对对象进行变更外,准入控制器还可以有其它作用:将相关资源作为请求处理的一部分进行变更。
-增加使用配额就是一个典型的示例,说明了这样做的必要性。
+最后,除了对对象进行变更外,准入控制器还可能有其它副作用:将相关资源作为请求处理的一部分进行变更。
+增加配额用量就是一个典型的示例,说明了这样做的必要性。
此类用法都需要相应的回收或回调过程,因为任一准入控制器都无法确定某个请求能否通过所有其它准入控制器。
-## 为什么需要准入控制器?
+## 为什么需要准入控制器? {#why-do-i-need-them}
Kubernetes 的许多高级功能都要求启用一个准入控制器,以便正确地支持该特性。
-因此,没有正确配置准入控制器的 Kubernetes API 服务器是不完整的,它无法支持你期望的所有特性。
+因此,没有正确配置准入控制器的 Kubernetes API 服务器是不完整的,它无法支持你所期望的所有特性。
-## 如何启用一个准入控制器?
+## 如何启用一个准入控制器? {how-do-i-turn-on-an-admission-controller}
-Kubernetes API 服务器的 `enable-admission-plugins` 标志接受一个用于在集群修改对象之前
-调用的(以逗号分隔的)准入控制插件顺序列表。
+Kubernetes API 服务器的 `enable-admission-plugins` 标志接受一个(以逗号分隔的)准入控制插件列表,
+这些插件会在集群修改对象之前被调用。
-例如,下面的命令就启用了 `NamespaceLifecycle` 和 `LimitRanger` 准入控制插件:
+例如,下面的命令启用 `NamespaceLifecycle` 和 `LimitRanger` 准入控制插件:
```shell
kube-apiserver --enable-admission-plugins=NamespaceLifecycle,LimitRanger ...
@@ -128,7 +128,7 @@ have to modify the systemd unit file if the API server is deployed as a systemd
service, you may modify the manifest file for the API server if Kubernetes is deployed
in a self-hosted way.
-->
-根据你 Kubernetes 集群的部署方式以及 API 服务器的启动方式的不同,你可能需要以不同的方式应用设置。
+根据你 Kubernetes 集群的部署方式以及 API 服务器的启动方式,你可能需要以不同的方式应用设置。
例如,如果将 API 服务器部署为 systemd 服务,你可能需要修改 systemd 单元文件;
如果以自托管方式部署 Kubernetes,你可能需要修改 API 服务器的清单文件。
{{< /note >}}
@@ -138,7 +138,7 @@ in a self-hosted way.
The Kubernetes API server flag `disable-admission-plugins` takes a comma-delimited list of admission control plugins to be disabled, even if they are in the list of plugins enabled by default.
-->
-## 怎么关闭准入控制器?
+## 怎么关闭准入控制器? {#how-do-i-turn-off-an-admission-controller}
Kubernetes API 服务器的 `disable-admission-plugins` 标志,会将传入的(以逗号分隔的)
准入控制插件列表禁用,即使是默认启用的插件也会被禁用。
@@ -152,9 +152,9 @@ kube-apiserver --disable-admission-plugins=PodNodeSelector,AlwaysDeny ...
To see which admission plugins are enabled:
-->
-## 哪些插件是默认启用的?
+## 哪些插件是默认启用的? {#which-plugins-are-enabled-by-default}
-下面的命令可以查看哪些插件是默认启用的:
+要查看哪些插件是被启用的:
```shell
kube-apiserver -h | grep enable-admission-plugins
@@ -164,26 +164,25 @@ kube-apiserver -h | grep enable-admission-plugins
In the current version, the default ones are:
-->
-在目前版本中,它们是:
+在目前版本中,默认启用的插件有:
-```shell
-CertificateApproval, CertificateSigning, CertificateSubjectRestriction, DefaultIngressClass, DefaultStorageClass, DefaultTolerationSeconds, LimitRanger, MutatingAdmissionWebhook, NamespaceLifecycle, PersistentVolumeClaimResize, Priority, ResourceQuota, RuntimeClass, ServiceAccount, StorageObjectInUseProtection, TaintNodesByCondition, ValidatingAdmissionWebhook
+```
+CertificateApproval, CertificateSigning, CertificateSubjectRestriction, DefaultIngressClass, DefaultStorageClass, DefaultTolerationSeconds, LimitRanger, MutatingAdmissionWebhook, NamespaceLifecycle, PersistentVolumeClaimResize, PodSecurity, Priority, ResourceQuota, RuntimeClass, ServiceAccount, StorageObjectInUseProtection, TaintNodesByCondition, ValidatingAdmissionWebhook
```
-## 每个准入控制器的作用是什么?
+## 每个准入控制器的作用是什么? {#what-does-each-admission-controller-do}
-### AlwaysAdmit {#alwaysadmit}
+### AlwaysAdmit {#alwaysadmit}
{{< feature-state for_k8s_version="v1.13" state="deprecated" >}}
-该准入控制器会允许所有的 pod 接入集群。已废弃,因为它的行为根本就和没有准入控制器一样。
+
+该准入控制器允许所有的 Pod 进入集群。此插件已被弃用,因其行为与没有准入控制器一样。
### AlwaysDeny {#alwaysdeny}
@@ -192,7 +191,7 @@ This admission controller allows all pods into the cluster. It is deprecated bec
-拒绝所有的请求。由于它没有实际意义,已废弃。
+拒绝所有的请求。由于它没有实际意义,已被弃用。
### AlwaysPullImages {#alwayspullimages}
@@ -205,58 +204,58 @@ scheduled onto the right node), without any authorization check against the imag
is enabled, images are always pulled prior to starting containers, which means valid credentials are
required.
-->
-该准入控制器会修改每一个新创建的 Pod 的镜像拉取策略为 Always 。
+该准入控制器会修改每个新创建的 Pod,将其镜像拉取策略设置为 Always。
这在多租户集群中是有用的,这样用户就可以放心,他们的私有镜像只能被那些有凭证的人使用。
-如果没有这个准入控制器,一旦镜像被拉取到节点上,任何用户的 Pod 都可以通过已了解到的镜像
-的名称(假设 Pod 被调度到正确的节点上)来使用它,而不需要对镜像进行任何授权检查。
-当启用这个准入控制器时,总是在启动容器之前拉取镜像,这意味着需要有效的凭证。
+如果没有这个准入控制器,一旦镜像被拉取到节点上,任何用户的 Pod 都可以通过已了解到的镜像的名称
+(假设 Pod 被调度到正确的节点上)来使用它,而不需要对镜像进行任何鉴权检查。
+启用这个准入控制器之后,启动容器之前必须拉取镜像,这意味着需要有效的凭证。
-### CertificateApproval
+### CertificateApproval {#certificateapproval}
-
-此准入控制器获取“审批” CertificateSigningRequest 资源的请求并执行额外的授权检查,
-以确保审批请求的用户有权限审批 `spec.signerName` 请求 CertificateSigningRequest 资源的证书请求。
+此准入控制器获取“审批” CertificateSigningRequest 资源的请求并执行额外的鉴权检查,
+以确保针对设置了 `spec.signerName` 的 CertificateSigningRequest 资源而言,
+审批请求的用户有权限对证书请求执行 `approve` 操作。
+有关对 CertificateSigningRequest 资源执行不同操作所需权限的详细信息,
+请参阅[证书签名请求](/zh/docs/reference/access-authn-authz/certificate-signing-requests/)。
-有关对证书签名请求资源执行不同操作所需权限的详细信息,
-请参阅[证书签名请求](/zh/docs/reference/access-authn-authz/certificate-signing-requests/)
-
-### CertificateSigning
+### CertificateSigning {#certificatesigning}
-此准入控制器获取 CertificateSigningRequest 资源的 `status.certificate` 字段更新请求并执行额外的授权检查,
-以确保签发证书的用户有权限为 `spec.signerName` 请求 CertificateSigningRequest 资源的证书请求`签发`证书。
+此准入控制器监视对 CertificateSigningRequest 资源的 `status.certificate` 字段的更新请求,
+并执行额外的鉴权检查,以确保针对设置了 `spec.signerName` 的 CertificateSigningRequest 资源而言,
+签发证书的用户有权限对证书请求执行 `sign` 操作。
-有关对证书签名请求资源执行不同操作所需权限的详细信息,
-请参阅[证书签名请求](/zh/docs/reference/access-authn-authz/certificate-signing-requests/)
+有关对 CertificateSigningRequest 资源执行不同操作所需权限的详细信息,
+请参阅[证书签名请求](/zh/docs/reference/access-authn-authz/certificate-signing-requests/)。
-### CertificateSubjectRestrictions
+### CertificateSubjectRestriction {#certificatesubjectrestriction}
-此准入控制器获取具有 `kubernetes.io/kube-apiserver-client` 的 `spec.signerName` 的
-CertificateSigningRequest 资源创建请求,
-它拒绝任何包含了 `system:masters` 一个“组”(或者“组织”)的请求。
+此准入控制器监视 `spec.signerName` 被设置为 `kubernetes.io/kube-apiserver-client` 的
+CertificateSigningRequest 资源创建请求,并拒绝所有将 “group”(或 “organization attribute”)
+设置为 `system:masters` 的请求。
### DefaultIngressClass {#defaultingressclass}
@@ -266,8 +265,8 @@ ingress class and automatically adds a default ingress class to them. This way,
request any special ingress class do not need to care about them at all and they will get the
default one.
-->
-该准入控制器监测没有请求任何特定 Ingress 类的 `Ingress` 对象的创建,并自动向其添加默认 Ingress 类。
-这样,没有任何特殊 Ingress 类需求的用户根本不需要关心它们,它们将获得默认 Ingress 类。
+该准入控制器监测没有请求任何特定 Ingress 类的 `Ingress` 对象创建请求,并自动向其添加默认 Ingress 类。
+这样,没有任何特殊 Ingress 类需求的用户根本不需要关心它们,他们将被设置为默认 Ingress 类。
-当未配置默认 Ingress 类时,此准入控制器不执行任何操作。如果将多个 Ingress 类标记为默认 Ingress 类,
-它将拒绝任何创建 `Ingress` 的操作,并显示错误。
-要修复此错误,管理员必须重新检查其 `IngressClass` 对象,并仅将其中一个标记为默认(通过注解
-"ingressclass.kubernetes.io/is-default-class")。
-此准入控制器会忽略所有 `Ingress` 更新操作,仅响应创建操作。
+当未配置默认 Ingress 类时,此准入控制器不执行任何操作。如果有多个 Ingress 类被标记为默认 Ingress 类,
+此控制器将拒绝所有创建 `Ingress` 的操作,并返回错误信息。
+要修复此错误,管理员必须重新检查其 `IngressClass` 对象,并仅将其中一个标记为默认
+(通过注解 "ingressclass.kubernetes.io/is-default-class")。
+此准入控制器会忽略所有 `Ingress` 更新操作,仅处理创建操作。
关于 Ingress 类以及如何将 Ingress 类标记为默认的更多信息,请参见
-[ingress](/zh/docs/concepts/services-networking/ingress/)。
+[Ingress](/zh/docs/concepts/services-networking/ingress/) 页面。
### DefaultStorageClass {#defaultstorageclass}
@@ -297,9 +296,9 @@ and automatically adds a default storage class to them.
This way, users that do not request any special storage class do not need to care about them at all and they
will get the default one.
-->
-该准入控制器监测没有请求任何特定存储类的 `PersistentVolumeClaim` 对象的创建,
+此准入控制器监测没有请求任何特定存储类的 `PersistentVolumeClaim` 对象的创建请求,
并自动向其添加默认存储类。
-这样,没有任何特殊存储类需求的用户根本不需要关心它们,它们将获得默认存储类。
+这样,没有任何特殊存储类需求的用户根本不需要关心它们,它们将被设置为使用默认存储类。
当未配置默认存储类时,此准入控制器不执行任何操作。如果将多个存储类标记为默认存储类,
-它将拒绝任何创建 `PersistentVolumeClaim` 的操作,并显示错误。
-要修复此错误,管理员必须重新访问其 `StorageClass` 对象,并仅将其中一个标记为默认。
-此准入控制器会忽略所有 `PersistentVolumeClaim` 更新操作,仅响应创建操作。
+此控制器将拒绝所有创建 `PersistentVolumeClaim` 的请求,并返回错误信息。
+要修复此错误,管理员必须重新检查其 `StorageClass` 对象,并仅将其中一个标记为默认。
+此准入控制器会忽略所有 `PersistentVolumeClaim` 更新操作,仅处理创建操作。
-关于持久化卷和存储类,以及如何将存储类标记为默认,请参见
-[持久化卷](/zh/docs/concepts/storage/persistent-volumes/)。
+关于持久卷申领和存储类,以及如何将存储类标记为默认,请参见[持久卷](/zh/docs/concepts/storage/persistent-volumes/)页面。
### DefaultTolerationSeconds {#defaulttolerationseconds}
-该准入控制器基于 k8s-apiserver 输入参数 `default-not-ready-toleration-seconds` 和
+此准入控制器基于 k8s-apiserver 的输入参数 `default-not-ready-toleration-seconds` 和
`default-unreachable-toleration-seconds` 为 Pod 设置默认的容忍度,以容忍 `notready:NoExecute` 和
-`unreachable:NoExecute` 污点。
+`unreachable:NoExecute` 污点
(如果 Pod 尚未容忍 `node.kubernetes.io/not-ready:NoExecute` 和
-`node.kubernetes.io/unreachable:NoExecute` 污点的话)
-`default-not-ready-toleration-seconds` 和 `default-unreachable-toleration-seconds` 的默认值是 5 分钟。
+`node.kubernetes.io/unreachable:NoExecute` 污点的话)。
+`default-not-ready-toleration-seconds` 和 `default-unreachable-toleration-seconds`
+的默认值是 5 分钟。
### DenyEscalatingExec {#denyescalatingexec}
@@ -345,9 +344,9 @@ This admission controller will deny exec and attach commands to pods that run wi
allow host access. This includes pods that run as privileged, have access to the host IPC namespace, and
have access to the host PID namespace.
-->
-该准入控制器将拒绝在由于拥有升级特权,而具备访问宿主机能力的 Pod 中执行 exec 和
-attach 命令。这包括在特权模式运行的 Pod,可以访问主机 IPC 名字空间的 Pod,
-和访问主机 PID 名字空间的 Pod 。
+此准入控制器将拒绝在由于拥有提级特权而具备访问宿主机能力的 Pod 中执行 exec 和
+attach 命令。这类 Pod 包括在特权模式运行的 Pod、可以访问主机 IPC 名字空间的 Pod、
+和访问主机 PID 名字空间的 Pod。
-DenyExecOnPrivileged 准入插件已被废弃。
+DenyEscalatingExec 准入插件已被弃用。
建议使用基于策略的准入插件(例如 [PodSecurityPolicy](#podsecuritypolicy) 和自定义准入插件),
-该插件可以针对特定用户或名字空间,还可以防止创建权限过高的 Pod。
+这类插件可以针对特定用户或名字空间,还可以防止创建权限过高的 Pod。
### DenyExecOnPrivileged {#denyexeconprivileged}
@@ -368,14 +367,14 @@ DenyExecOnPrivileged 准入插件已被废弃。
-如果一个 pod 拥有一个特权容器,该准入控制器将拦截所有在该 pod 中执行 exec 命令的请求。
+如果一个 Pod 中存在特权容器,该准入控制器将拦截所有在该 Pod 中执行 exec 命令的请求。
此功能已合并至 [DenyEscalatingExec](#denyescalatingexec)。
-而 DenyExecOnPrivileged 准入插件已被废弃。
+而 DenyExecOnPrivileged 准入插件已被弃用。
建议使用基于策略的准入插件(例如 [PodSecurityPolicy](#podsecuritypolicy) 和自定义准入插件),
-该插件可以针对特定用户或名字空间,还可以防止创建权限过高的 Pod。
+这类插件可以针对特定用户或名字空间,还可以防止创建权限过高的 Pod。
-### DenyServiceExternalIPs
+### DenyServiceExternalIPs {#denyserviceexternalips}
-该准入控制器拒绝 `Service` 字段 `externalIPs` 的所有新规使用。 此功能非常强大(允许网络流量拦截),
-并且无法很好地受策略控制。 启用后,群集用户将无法创建使用 `externalIPs` 的新服务,也无法在现有
-`Service` 对象上向 `externalIPs` 添加新值。 `externalIPs` 的现有使用不受影响,用户可以从现有
-`Service` 对象上的 `externalIPs` 中删除值。
+此准入控制器拒绝新的 `Service` 中使用字段 `externalIPs`。
+此功能非常强大(允许网络流量拦截),并且无法很好地受策略控制。
+启用后,集群用户将无法创建使用 `externalIPs` 的新 `Service`,也无法在现有
+`Service` 对象上为 `externalIPs` 添加新值。
+`externalIPs` 的现有使用不受影响,用户可以在现有 `Service` 对象上从
+`externalIPs` 中删除值。
-大多数用户根本不需要此功能,集群管理员应考虑将其禁用。
-确实需要使用此功能的集群应考虑使用一些自定义策略来管理其的使用。
+大多数用户根本不需要此特性,集群管理员应考虑将其禁用。
+确实需要使用此特性的集群应考虑使用一些自定义策略来管理 `externalIPs` 的使用。
### EventRateLimit {#eventratelimit}
@@ -416,45 +417,30 @@ of it.
This admission controller mitigates the problem where the API server gets flooded by
event requests. The cluster admin can specify event rate limits by:
-->
-该准入控制器缓解了事件请求淹没 API 服务器的问题。集群管理员可以通过以下方式指定事件速率限制:
+此准入控制器缓解了事件请求淹没 API 服务器的问题。集群管理员可以通过以下方式指定事件速率限制:
* 启用 `EventRateLimit` 准入控制器;
-* 从文件中引用 `EventRateLimit` 配置文件,并提供给 API 服务器命令的
- `--admission-control-config-file` 标志:
+* 在通过 API 服务器的命令行标志 `--admission-control-config-file` 设置的文件中,
+ 引用 `EventRateLimit` 配置文件:
-{{< tabs name="eventratelimit_example" >}}
-{{% tab name="apiserver.config.k8s.io/v1" %}}
-```yaml
-apiVersion: apiserver.config.k8s.io/v1
-kind: AdmissionConfiguration
-plugins:
-- name: EventRateLimit
- path: eventconfig.yaml
-...
-```
-{{% /tab %}}
-{{% tab name="apiserver.k8s.io/v1alpha1" %}}
-```yaml
-# Deprecated in v1.17 in favor of apiserver.config.k8s.io/v1
-apiVersion: apiserver.k8s.io/v1alpha1
-kind: AdmissionConfiguration
-plugins:
-- name: EventRateLimit
- path: eventconfig.yaml
-...
-```
-{{% /tab %}}
-{{< /tabs >}}
+ ```yaml
+ apiVersion: apiserver.config.k8s.io/v1
+ kind: AdmissionConfiguration
+ plugins:
+ - name: EventRateLimit
+ path: eventconfig.yaml
+ ...
+ ```
-可以在配置中指定四种类型的限制:
+可以在配置中指定的限制有四种类型:
* `Server`: API 服务器收到的所有事件请求共享一个桶。
-* `Namespace`: 每个名字空间都有一个专用的桶。
-* `User`: 给每个用户都分配一个桶。
-* `SourceAndObject`: 根据事件的源和涉及对象的每种组合分配桶。
+* `Namespace`: 每个名字空间都对应一个专用的桶。
+* `User`: 为每个用户分配一个桶。
+* `SourceAndObject`: 根据事件的来源和涉及对象的各种组合分配桶。
-下面是一个配置示例 `eventconfig.yaml`:
+下面是一个针对此配置的 `eventconfig.yaml` 示例:
```yaml
apiVersion: eventratelimit.admission.k8s.io/v1alpha1
kind: Configuration
limits:
-- type: Namespace
- qps: 50
- burst: 100
- cacheSize: 2000
-- type: User
- qps: 10
- burst: 50
+ - type: Namespace
+ qps: 50
+ burst: 100
+ cacheSize: 2000
+ - type: User
+ qps: 10
+ burst: 50
```
详情请参见
-[事件速率限制提案](https://git.k8s.io/community/contributors/design-proposals/api-machinery/admission_control_event_rate_limit.md)。
+[EventRateLimit 配置 API 文档(v1alpha1)](/zh/docs/reference/config-api/apiserver-eventratelimit.v1alpha1/)。
### ExtendedResourceToleration {#extendedresourcetoleration}
@@ -503,30 +489,29 @@ name as the key. This admission controller, if enabled, automatically
adds tolerations for such taints to pods requesting extended resources, so users don't have to manually
add these tolerations.
-->
-该插件有助于创建可扩展资源的专用节点。
-如果运营商想创建可扩展资源的专用节点(如 GPU、FPGA 等),
-那他们应该以扩展资源名称作为键名,
+此插件有助于创建带有扩展资源的专用节点。
+如果运维人员想要创建带有扩展资源(如 GPU、FPGA 等)的专用节点,他们应该以扩展资源名称作为键名,
[为节点设置污点](/zh/docs/concepts/scheduling-eviction/taint-and-toleration/)。
-如果启用了该准入控制器,会将此类污点的容忍自动添加到请求扩展资源的 Pod 中,
-用户不必再手动添加这些容忍。
+如果启用了此准入控制器,会将此类污点的容忍度自动添加到请求扩展资源的 Pod 中,
+用户不必再手动添加这些容忍度。
### ImagePolicyWebhook {#imagepolicywebhook}
-ImagePolicyWebhook 准入控制器允许使用一个后端的 webhook 做出准入决策。
+ImagePolicyWebhook 准入控制器允许使用后端 Webhook 做出准入决策。
-#### 配置文件格式
+#### 配置文件格式 {#configuration-file-format}
-ImagePolicyWebhook 使用配置文件来为后端行为设置配置选项。该文件可以是 JSON 或 YAML,
+ImagePolicyWebhook 使用配置文件来为后端行为设置选项。该文件可以是 JSON 或 YAML,
并具有以下格式:
```yaml
@@ -545,11 +530,9 @@ imagePolicy:
-从文件中引用 ImagePolicyWebhook 的配置文件,并将其提供给 API 服务器命令标志
-`--admission-control-config-file`:
+在通过命令行标志 `--admission-control-config-file` 为 API 服务器提供的文件中,
+引用 ImagePolicyWebhook 配置文件:
-{{< tabs name="imagepolicywebhook_example1" >}}
-{{% tab name="apiserver.config.k8s.io/v1" %}}
```yaml
apiVersion: apiserver.config.k8s.io/v1
kind: AdmissionConfiguration
@@ -558,27 +541,12 @@ plugins:
path: imagepolicyconfig.yaml
...
```
-{{% /tab %}}
-{{% tab name="apiserver.k8s.io/v1alpha1" %}}
-```yaml
-# v1.17 中已废弃以鼓励使用 apiserver.config.k8s.io/v1
-apiVersion: apiserver.k8s.io/v1alpha1
-kind: AdmissionConfiguration
-plugins:
-- name: ImagePolicyWebhook
- path: imagepolicyconfig.yaml
-...
-```
-{{% /tab %}}
-{{< /tabs >}}
-或者,你也可以直接将配置嵌入到文件中:
+或者,你也可以直接将配置嵌入到该文件中:
-{{< tabs name="imagepolicywebhook_example2" >}}
-{{% tab name="apiserver.config.k8s.io/v1" %}}
```yaml
apiVersion: apiserver.config.k8s.io/v1
kind: AdmissionConfiguration
@@ -592,24 +560,6 @@ plugins:
retryBackoff: 500
defaultAllow: true
```
-{{% /tab %}}
-{{% tab name="apiserver.k8s.io/v1alpha1" %}}
-```yaml
-# v1.17 中已废弃以鼓励使用 apiserver.config.k8s.io/v1
-apiVersion: apiserver.k8s.io/v1alpha1
-kind: AdmissionConfiguration
-plugins:
-- name: ImagePolicyWebhook
- configuration:
- imagePolicy:
- kubeConfigFile:
- allowTTL: 50
- denyTTL: 50
- retryBackoff: 500
- defaultAllow: true
-```
-{{% /tab %}}
-{{< /tabs >}}
ImagePolicyWebhook 的配置文件必须引用
[kubeconfig](/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
-格式的文件;该文件设置了到后端的连接参数。
-要求后端使用 TLS 进行通信。
+格式的文件;该文件用来设置与后端的连接。要求后端使用 TLS 进行通信。
-kubeconfig 文件的 cluster 字段需要指向远端服务,user 字段需要包含已返回的授权者。
+kubeconfig 文件的 `clusters` 字段需要指向远端服务,`users` 字段需要包含已返回的授权者。
#### 请求载荷
当面对一个准入决策时,API 服务器发送一个描述操作的 JSON 序列化的
`imagepolicy.k8s.io/v1alpha1` `ImageReview` 对象。
-该对象包含描述被审核容器的字段,以及所有匹配 `*.image-policy.k8s.io/*` 的
-Pod 注解。
+该对象包含描述被准入容器的字段,以及与 `*.image-policy.k8s.io/*` 匹配的所有 Pod 注解。
+{{ note }}
注意,Webhook API 对象与其他 Kubernetes API 对象一样受制于相同的版本控制兼容性规则。
-实现者应该知道对 alpha 对象的更宽松的兼容性,并检查请求的 "apiVersion" 字段,
+实现者应该知道对 alpha 对象兼容性是相对宽松的,并检查请求的 "apiVersion" 字段,
以确保正确的反序列化。
此外,API 服务器必须启用 `imagepolicy.k8s.io/v1alpha1` API 扩展组
(`--runtime-config=imagepolicy.k8s.io/v1alpha1=true`)。
+{{ /note }}
远程服务将填充请求的 `ImageReviewStatus` 字段,并返回允许或不允许访问的响应。
-响应体的 "spec" 字段会被忽略,并且可以省略。一个允许访问应答会返回:
+响应体的 `spec` 字段会被忽略,并且可以被省略。一个允许访问应答会返回:
```json
{
@@ -750,22 +711,25 @@ To disallow access, the service would return:
```
-更多的文档,请参阅 `imagepolicy.v1alpha1` API 对象和
-`plugin/pkg/admission/imagepolicy/admission.go`。
+更多的文档,请参阅 [`imagepolicy.v1alpha1` API](/zh/docs/reference/config-api/imagepolicy.v1alpha1/)。
-#### 使用注解进行扩展
+#### 使用注解进行扩展 {#extending-with-annotations}
一个 Pod 中匹配 `*.image-policy.k8s.io/*` 的注解都会被发送给 Webhook。
-这样做使得了解后端镜像策略的用户可以向它发送额外的信息,并为不同的后端实现
-接收不同的信息。
+这样做使得了解后端镜像策略的用户可以向它发送额外的信息,
+并让不同的后端实现接收不同的信息。
-* 在紧急情况下,请求 "break glass" 覆盖一个策略。
-* 从一个记录了 break-glass 的请求的 ticket 系统得到的一个 ticket 号码。
-* 向策略服务器提供一个提示,用于提供镜像的 imageID,以方便它进行查找。
+* 在紧急情况下,请求破例覆盖某个策略。
+* 从一个记录了破例的请求的工单(Ticket)系统得到的一个工单号码。
+* 向策略服务器提供提示信息,用于提供镜像的 imageID,以方便它进行查找。
在任何情况下,注解都是由用户提供的,并不会被 Kubernetes 以任何方式进行验证。
-在将来,如果一个注解确定将被广泛使用,它可能会被提升为 ImageReviewSpec 的一个命名字段。
-### LimitPodHardAntiAffinityTopology {#limitpodhardantiaffinitytopology}
+### LimitPodHardAntiAffinityTopology {#limitpodhardantiaffinitytopology}
-该准入控制器拒绝(定义了 `AntiAffinity` 拓扑键的)任何 Pod
-(`requiredDuringSchedulingRequiredDuringExecution` 中的
-`kubernetes.io/hostname` 除外)。
+此准入控制器拒绝定义了 `AntiAffinity` 拓扑键的任何 Pod
+(`requiredDuringSchedulingRequiredDuringExecution` 中的 `kubernetes.io/hostname` 除外)。
### LimitRanger {#limitranger}
-该准入控制器会观察传入的请求,并确保它不会违反 `Namespace` 中 `LimitRange`
-对象枚举的任何约束。
-如果你在 Kubernetes 部署中使用了 `LimitRange` 对象,则必须使用此准入控制器来
-执行这些约束。
-LimitRanger 还可以用于将默认资源请求应用到没有指定任何内容的 Pod;
-当前,默认的 LimitRanger 对 `default` 名字空间中的所有 Pod 都应用了
-0.1 CPU 的需求。
+此准入控制器会监测传入的请求,并确保请求不会违反 `Namespace` 中 `LimitRange` 对象所设置的任何约束。
+如果你在 Kubernetes 部署中使用了 `LimitRange` 对象,则必须使用此准入控制器来执行这些约束。
+LimitRanger 还可以用于将默认资源请求应用到没有设定资源约束的 Pod;
+当前,默认的 LimitRanger 对 `default` 名字空间中的所有 Pod 都设置 0.1 CPU 的需求。
请查看
-[limitRange 设计文档](https://git.k8s.io/community/contributors/design-proposals/resource-management/admission_control_limit_range.md)
-和 [LimitRange 例子](/zh/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/)
-以了解更多细节。
+[limitRange API 文档](/zh/docs/reference/kubernetes-api/policy-resources/limit-range-v1/)和
+[LimitRange 例子](/zh/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/)以了解更多细节。
-### MutatingAdmissionWebhook {#mutatingadmissionwebhook}
+### MutatingAdmissionWebhook {#mutatingadmissionwebhook}
-该准入控制器调用任何与请求匹配的变更 Webhook。匹配的 Webhook 将被串行调用。
-每一个 Webhook 都可以根据需要修改对象。
+此准入控制器调用任何与请求匹配的变更(Mutating) Webhook。匹配的 Webhook 将被顺序调用。
+每一个 Webhook 都可以自由修改对象。
`MutatingAdmissionWebhook`,顾名思义,仅在变更阶段运行。
@@ -841,42 +801,41 @@ If a webhook called by this has side effects (for example, decrementing quota) i
*must* have a reconciliation system, as it is not guaranteed that subsequent
webhooks or validating admission controllers will permit the request to finish.
-->
-如果由此准入控制器调用的 Webhook 有副作用(如降低配额),
-则它 *必须* 具有协调系统,因为不能保证后续的 Webhook 和验证准入控制器都会允许完成请求。
+如果由此准入控制器调用的 Webhook 有副作用(如:减少配额),
+则它 **必须** 具有协调系统,因为不能保证后续的 Webhook 和验证准入控制器都会允许完成请求。
如果你禁用了 MutatingAdmissionWebhook,那么还必须使用 `--runtime-config` 标志禁止
-`admissionregistration.k8s.io/v1` 组/版本中的 `MutatingWebhookConfiguration`
-对象(版本 >=1.9 时,这两个对象都是默认启用的)。
+`admissionregistration.k8s.io/v1` 组/版本中的 `MutatingWebhookConfiguration`,
+二者都是默认启用的。
-#### 谨慎编写和安装变更 webhook
+#### 谨慎编写和安装变更 webhook {#use-caution-when-authoring-and-installing-mutating-webhooks}
* 当用户尝试创建的对象与返回的对象不同时,用户可能会感到困惑。
-* 当它们回读的对象与尝试创建的对象不同,内建的控制环可能会出问题。
+* 当他们读回的对象与尝试创建的对象不同,内建的控制回路可能会出问题。
* 与覆盖原始请求中设置的字段相比,使用原始请求未设置的字段会引起问题的可能性较小。
- 应尽量避免前面那种方式。
-* 内建资源和第三方资源的控制回路未来可能会受到破坏性的更改,使现在运行良好的 Webhook
- 无法再正常运行。即使完成了 Webhook API 安装,也不代表会为该 webhook 提供无限期的支持。
+ 应尽量避免覆盖原始请求中的字段设置。
+* 内建资源和第三方资源的控制回路未来可能会出现破坏性的变更,使现在运行良好的 Webhook
+ 无法再正常运行。即使完成了 Webhook API 安装,也不代表该 Webhook 会被提供无限期的支持。
### NamespaceAutoProvision {#namespaceautoprovision}
@@ -887,9 +846,9 @@ It creates a namespace if it cannot be found.
This admission controller is useful in deployments that do not want to restrict creation of
a namespace prior to its usage.
-->
-该准入控制器会检查名字空间资源上的所有传入请求,并检查所引用的名字空间是否确实存在。
-如果找不到,它将创建一个名字空间。
-此准入控制器对于不想要求名字空间必须先创建后使用的集群部署中很有用。
+此准入控制器会检查针对名字空间域资源的所有传入请求,并检查所引用的名字空间是否确实存在。
+如果找不到所引用的名字空间,控制器将创建一个名字空间。
+此准入控制器对于不想要求名字空间必须先创建后使用的集群部署很有用。
### NamespaceExists {#namespaceexists}
@@ -897,26 +856,28 @@ a namespace prior to its usage.
This admission controller checks all requests on namespaced resources other than `Namespace` itself.
If the namespace referenced from a request doesn't exist, the request is rejected.
-->
-该准入控制器检查除 `Namespace` 以外的名字空间作用域资源上的所有请求。
+此准入控制器检查针对名字空间作用域的资源(除 `Namespace` 自身)的所有请求。
如果请求引用的名字空间不存在,则拒绝该请求。
### NamespaceLifecycle {#namespacelifecycle}
-该准入控制器禁止在一个正在被终止的 `Namespace` 中创建新对象,并确保
-使用不存在的 `Namespace` 的请求被拒绝。
+该准入控制器禁止在一个正在被终止的 `Namespace` 中创建新对象,并确保针对不存在的
+`Namespace` 的请求被拒绝。
该准入控制器还会禁止删除三个系统保留的名字空间,即 `default`、
`kube-system` 和 `kube-public`。
-删除 `Namespace` 会触发删除该名字空间中所有对象(Pod、Service 等)的一系列操作。
+`Namespace` 的删除操作会触发一系列删除该名字空间中所有对象(Pod、Service 等)的操作。
为了确保这个过程的完整性,我们强烈建议启用这个准入控制器。
### NodeRestriction {#noderestriction}
@@ -926,51 +887,52 @@ This admission controller limits the `Node` and `Pod` objects a kubelet can modi
kubelets must use credentials in the `system:nodes` group, with a username in the form `system:node:`.
Such kubelets will only be allowed to modify their own `Node` API object, and only modify `Pod` API objects that are bound to their node.
-->
-该准入控制器限制了 kubelet 可以修改的 `Node` 和 `Pod` 对象。
+该准入控制器限制了某 kubelet 可以修改的 `Node` 和 `Pod` 对象。
为了受到这个准入控制器的限制,kubelet 必须使用在 `system:nodes` 组中的凭证,
并使用 `system:node:` 形式的用户名。
-这样,kubelet 只可修改自己的 `Node` API 对象,只能修改绑定到节点本身的 Pod 对象。
+这样,kubelet 只可修改自己的 `Node` API 对象,只能修改绑定到自身节点的 Pod 对象。
-在 Kubernetes 1.11+ 的版本中,不允许 kubelet 从 `Node` API 对象中更新或删除污点。
+不允许 kubelet 更新或删除 `Node` API 对象的污点。
-在 Kubernetes 1.13+ 的版本中,`NodeRestriction` 准入插件可防止 kubelet 删除
-`Node` API 对象,并对 `kubernetes.io/` 或 `k8s.io/` 前缀标签的 kubelet
-强制进行如下修改:
+`NodeRestriction` 准入插件可防止 kubelet 删除其 `Node` API 对象,
+并对前缀为 `kubernetes.io/` 或 `k8s.io/` 的标签的修改对 kubelet 作如下限制:
-* **防止** kubelet 添加/删除/更新带有 `node-restriction.kubernetes.io/` 前缀的标签。
- 保留此前缀的标签,供管理员用来标记 Node 对象以隔离工作负载,并且不允许 kubelet
+* **禁止** kubelet 添加、删除或更新前缀为 `node-restriction.kubernetes.io/` 的标签。
+ 这类前缀的标签时保留给管理员的,用以为 `Node` 对象设置标签以隔离工作负载,而不允许 kubelet
修改带有该前缀的标签。
-* **允许** kubelet 添加/删除/更新这些和这些前缀的标签:
+* **允许** kubelet 添加、删除、更新以下标签:
* `kubernetes.io/hostname`
* `kubernetes.io/arch`
* `kubernetes.io/os`
* `beta.kubernetes.io/instance-type`
* `node.kubernetes.io/instance-type`
* `failure-domain.beta.kubernetes.io/region` (已弃用)
- * `failure-domain.beta.kubernetes.io/zone` (已弃用)
+ * `failure-domain.beta.kubernetes.io/zone` (已弃用)
* `topology.kubernetes.io/region`
* `topology.kubernetes.io/zone`
- * `kubelet.kubernetes.io/`-prefixed labels
- * `node.kubernetes.io/`-prefixed labels
+ * `kubelet.kubernetes.io/` 为前缀的标签
+ * `node.kubernetes.io/` 为前缀的标签
-kubelet 保留 `kubernetes.io` 或 `k8s.io` 前缀的所有标签,并且将来可能会被
+以 `kubernetes.io` 或 `k8s.io` 为前缀的所有其他标签都限制 kubelet 使用,并且将来可能会被
`NodeRestriction` 准入插件允许或禁止。
将来的版本可能会增加其他限制,以确保 kubelet 具有正常运行所需的最小权限集。
@@ -984,39 +946,32 @@ This admission controller also protects the access to `metadata.ownerReferences[
of an object, so that only users with "update" permission to the `finalizers`
subresource of the referenced *owner* can change it.
-->
-该准入控制器保护对 `metadata.ownerReferences` 对象的访问,以便只有对该对象具有
-“删除” 权限的用户才能对其进行更改。
+此准入控制器保护对对象的 `metadata.ownerReferences` 的访问,以便只有对该对象具有
+“delete” 权限的用户才能对其进行更改。
该准入控制器还保护对 `metadata.ownerReferences[x].blockOwnerDeletion` 对象的访问,
-以便只有对所引用的 **属主(owner)** 的 `finalizers` 子资源具有 “更新”
+以便只有对所引用的 **属主(owner)** 的 `finalizers` 子资源具有 “update”
权限的用户才能对其进行更改。
### PersistentVolumeClaimResize {#persistentvolumeclaimresize}
-
-该准入控制器检查传入的 `PersistentVolumeClaim` 调整大小请求,对其执行额外的验证操作。
-
-{{< note >}}
-
-对调整卷大小的支持是一种 Beta 特性。作为集群管理员,你必须确保特性门控 `ExpandPersistentVolumes`
-设置为 `true` 才能启用调整大小。
-{{< /note >}}
+{{< feature-state for_k8s_version="v1.24" state="stable" >}}
+此准入控制器检查传入的 `PersistentVolumeClaim` 调整大小请求,对其执行额外的验证检查操作。
+
+
-启用 `ExpandPersistentVolumes` 特性门控之后,建议将 `PersistentVolumeClaimResize`
-准入控制器也启用。除非 PVC 的 `StorageClass` 明确地将 `allowVolumeExpansion` 设置为
-`true` 来显式启用调整大小。否则,默认情况下该准入控制器会阻止所有对 PVC 大小的调整。
+建议启用 `PersistentVolumeClaimResize` 准入控制器。除非 PVC 的 `StorageClass` 明确地将
+`allowVolumeExpansion` 设置为 `true` 来显式启用调整大小。
+否则,默认情况下该准入控制器会阻止所有对 PVC 大小的调整。
例如:由以下 `StorageClass` 创建的所有 `PersistentVolumeClaim` 都支持卷容量扩充:
@@ -1038,7 +993,7 @@ allowVolumeExpansion: true
For more information about persistent volume claims, see [PersistentVolumeClaims](/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims).
-->
关于持久化卷申领的更多信息,请参见
-[PersistentVolumeClaims](/zh/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)。
+[PersistentVolumeClaim](/zh/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)。
### PersistentVolumeLabel {#persistentvolumelabel}
@@ -1052,15 +1007,15 @@ region and/or zone.
If the admission controller doesn't support automatic labelling your PersistentVolumes, you
may need to add the labels manually to prevent pods from mounting volumes from
a different zone. PersistentVolumeLabel is DEPRECATED and labeling persistent volumes has been taken over by
-[cloud controller manager](/docs/tasks/administer-cluster/running-cloud-controller/).
+the {{< glossary_tooltip text="cloud-controller-manager" term_id="cloud-controller-manager" >}}.
Starting from 1.11, this admission controller is disabled by default.
-->
-该准入控制器会自动将区(region)或区域(zone)标签附加到由云提供商(如 GCE、AWS)
-定义的 PersistentVolume。这有助于确保 Pod 和 PersistentVolume 位于相同的区或区域。
+此准入控制器会自动将由云提供商(如 GCE、AWS)定义的区(region)或区域(zone)
+标签附加到 PersistentVolume 上。这有助于确保 Pod 和 PersistentVolume 位于相同的区或区域。
如果准入控制器不支持为 PersistentVolumes 自动添加标签,那你可能需要手动添加标签,
以防止 Pod 挂载其他区域的卷。
-PersistentVolumeLabel 已被废弃,标记持久卷已由
-[云管理控制器](/zh/docs/tasks/administer-cluster/running-cloud-controller/)接管。
+PersistentVolumeLabel 已被弃用,为持久卷添加标签的操作已由
+{{< glossary_tooltip text="云管理控制器" term_id="cloud-controller-manager" >}}接管。
从 1.11 开始,默认情况下禁用此准入控制器。
### PodNodeSelector {#podnodeselector}
@@ -1068,70 +1023,56 @@ PersistentVolumeLabel 已被废弃,标记持久卷已由
{{< feature-state for_k8s_version="v1.5" state="alpha" >}}
-该准入控制器通过读取名字空间注解和全局配置,来为名字空间中可以使用的节点选择器
-设置默认值并实施限制。
+此准入控制器通过读取名字空间注解和全局配置,来为名字空间中可以使用的节点选择器设置默认值并实施限制。
-#### 配置文件格式
+#### 配置文件格式 {#configuration-file-format-podnodeselector}
-`PodNodeSelector` 使用配置文件来设置后端行为的选项。
-请注意,配置文件格式将在将来某个版本中改为版本化文件。
+`PodNodeSelector` 使用配置文件来设置后端行为的选项。请注意,配置文件格式将在将来某个版本中改为版本化文件。
该文件可以是 JSON 或 YAML,格式如下:
```yaml
podNodeSelectorPluginConfig:
- clusterDefaultNodeSelector: name-of-node-selector
- namespace1: name-of-node-selector
- namespace2: name-of-node-selector
+ clusterDefaultNodeSelector: name-of-node-selector
+ namespace1: name-of-node-selector
+ namespace2: name-of-node-selector
```
-基于提供给 API 服务器命令行标志 `--admission-control-config-file` 的文件名,
-从文件中引用 `PodNodeSelector` 配置文件:
+通过 API 服务器命令行标志 `--admission-control-config-file` 为 API 服务器提供的文件中,
+需要引用 `PodNodeSelector` 配置文件:
-{{< tabs name="podnodeselector_example1" >}}
-{{% tab name="apiserver.config.k8s.io/v1" %}}
```yaml
apiVersion: apiserver.config.k8s.io/v1
kind: AdmissionConfiguration
plugins:
-- name: PodNodeSelector
- path: podnodeselector.yaml
+ - name: PodNodeSelector
+ path: podnodeselector.yaml
...
```
-{{% /tab %}}
-{{% tab name="apiserver.k8s.io/v1alpha1" %}}
-```yaml
-# 在 v1.17 中废弃,以鼓励使用 apiserver.config.k8s.io/v1
-apiVersion: apiserver.k8s.io/v1alpha1
-kind: AdmissionConfiguration
-plugins:
-- name: PodNodeSelector
- path: podnodeselector.yaml
-...
-```
-{{% /tab %}}
-{{< /tabs >}}
-#### 配置注解格式
+#### 配置注解格式 {#configuration-annotation-format}
-`PodNodeSelector` 使用键为 `scheduler.alpha.kubernetes.io/node-selector` 的注解
-为名字空间设置节点选择算符。
+`PodNodeSelector` 使用键为 `scheduler.alpha.kubernetes.io/node-selector`
+的注解为名字空间设置节点选择算符。
```yaml
apiVersion: v1
@@ -1144,28 +1085,30 @@ metadata:
-#### 内部行为
+#### 内部行为 {#internal-behavior}
-该准入控制器行为如下:
+此准入控制器行为如下:
1. 如果 `Namespace` 的注解带有键 `scheduler.alpha.kubernetes.io/node-selector`,
则将其值用作节点选择算符。
2. 如果名字空间缺少此类注解,则使用 `PodNodeSelector` 插件配置文件中定义的
`clusterDefaultNodeSelector` 作为节点选择算符。
-3. 评估 Pod 节点选择算符和名字空间节点选择算符是否存在冲突。存在冲突将导致拒绝。
+3. 评估 Pod 节点选择算符和名字空间节点选择算符是否存在冲突。存在冲突将拒绝 Pod。
4. 评估 Pod 节点选择算符和特定于名字空间的被允许的选择算符所定义的插件配置文件是否存在冲突。
- 存在冲突将导致拒绝。
+ 存在冲突将导致拒绝 Pod。
{{< note >}}
-这是下节已被废弃的 [PodSecurityPolicy](#podsecuritypolicy) 准入控制器的替代品。
-此准入控制器负责在创建和修改 Pod 时根据请求的安全上下文和
+这是下节所讨论的已被废弃的 [PodSecurityPolicy](#podsecuritypolicy) 准入控制器的替代品。
+此准入控制器负责在创建和修改 Pod 时,根据请求的安全上下文和
[Pod 安全标准](/zh/docs/concepts/security/pod-security-standards/)
来确定是否可以执行请求。
@@ -1212,31 +1155,33 @@ See also the [PodSecurityPolicy](/docs/concepts/security/pod-security-policy/) d
for more information.
-->
查看 [Pod 安全策略文档](/zh/docs/concepts/security/pod-security-policy/)
-了解更多细节。
+进一步了解其间细节。
### PodTolerationRestriction {#podtolerationrestriction}
{{< feature-state for_k8s_version="v1.7" state="alpha" >}}
-准入控制器 PodTolerationRestriction 检查 Pod 的容忍度与其名字空间的容忍度之间
-是否存在冲突。如果存在冲突,则拒绝 Pod 请求。
-然后,它将名字空间的容忍度合并到 Pod 的容忍度中,之后根据名字空间的容忍度
-白名单检查所得到的容忍度结果。如果检查成功,则将接受 Pod 请求,否则拒绝该请求。
+准入控制器 PodTolerationRestriction 检查 Pod 的容忍度与其名字空间的容忍度之间是否存在冲突。
+如果存在冲突,则拒绝 Pod 请求。
+控制器接下来会将名字空间的容忍度合并到 Pod 的容忍度中,
+根据名字空间的容忍度白名单检查所得到的容忍度结果。
+如果检查成功,则将接受 Pod 请求,否则拒绝该请求。
-如果 Pod 的名字空间没有任何关联的默认容忍度或容忍度白名单,则使用集群级别的
-默认容忍度或容忍度白名单(如果有的话)。
+如果 Pod 的名字空间没有任何关联的默认容忍度或容忍度白名单,
+则使用集群级别的默认容忍度或容忍度白名单(如果有的话)。
-名字空间的容忍度通过注解健 `scheduler.alpha.kubernetes.io/defaultTolerations`
+名字空间的容忍度通过注解键 `scheduler.alpha.kubernetes.io/defaultTolerations`
来设置。可接受的容忍度可以通过 `scheduler.alpha.kubernetes.io/tolerationsWhitelist`
注解键来添加。
@@ -1263,7 +1208,9 @@ metadata:
### 优先级 {#priority}
@@ -1273,21 +1220,22 @@ The priority admission controller uses the `priorityClassName` field and populat
### ResourceQuota {#resourcequota}
-该准入控制器会监测传入的请求,并确保它不违反任何一个 `Namespace` 中的 `ResourceQuota`
-对象中枚举出来的约束。
-如果你在 Kubernetes 部署中使用了 `ResourceQuota`,你必须使用这个准入控制器来强制
-执行配额限制。
+此准入控制器会监测传入的请求,并确保它不违反任何一个 `Namespace` 中的 `ResourceQuota`
+对象中列举的约束。如果你在 Kubernetes 部署中使用了 `ResourceQuota`,
+则必须使用这个准入控制器来强制执行配额限制。
-请查看
-[resourceQuota 设计文档](https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md)和 [Resource Quota 例子](/zh/docs/concepts/policy/resource-quotas/)
-了解更多细节。
+请参阅
+[resourceQuota API 参考](/zh/docs/reference/kubernetes-api/policy-resources/resource-quota-v1/)
+和 [Resource Quota 例子](/zh/docs/concepts/policy/resource-quotas/)了解更多细节。
### RuntimeClass {#runtimeclass}
-+{{< feature-state for_k8s_version="v1.20" state="stable" >}}
+{{< feature-state for_k8s_version="v1.20" state="stable" >}}
-如果你开启 `PodOverhead`
-[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/),
-并且通过 [Pod 开销](/zh/docs/concepts/scheduling-eviction/pod-overhead/)
-配置来定义一个 RuntimeClass,这个准入控制器会检查新的 Pod。
-当启用的时候,这个准入控制器会拒绝任何 overhead 字段已经设置的 Pod。
+如果你所定义的 RuntimeClass 包含 [Pod 开销](/zh/docs/concepts/scheduling-eviction/pod-overhead/),
+这个准入控制器会检查新的 Pod。被启用后,此准入控制器会拒绝所有已经设置了 overhead 字段的 Pod 创建请求。
对于配置了 RuntimeClass 并在其 `.spec` 中选定 RuntimeClass 的 Pod,
此准入控制器会根据相应 RuntimeClass 中定义的值为 Pod 设置 `.spec.overhead`。
-{{< note >}}
-Pod 的 `.spec.overhead` 字段和 RuntimeClass 的 `.overhead` 字段均为处于 beta 版本。
-如果你未启用 `PodOverhead` 特性门控,则所有 Pod 均被视为未设置 `.spec.overhead`。
-{{< /note >}}
-
详情请参见 [Pod 开销](/zh/docs/concepts/scheduling-eviction/pod-overhead/)。
### SecurityContextDeny {#securitycontextdeny}
@@ -1340,14 +1280,13 @@ then you could use this admission controller to restrict the set of values a sec
See [Pod Security Standards](/docs/concepts/security/pod-security-standards/) for more context on restricting
pod privileges.
-->
-该准入控制器将拒绝任何试图设置特定提升
+此准入控制器将拒绝任何试图设置特定提升
[SecurityContext](/zh/docs/tasks/configure-pod-container/security-context/)
-字段的 Pod,正如任务
-[为 Pod 或 Container 配置安全上下文](/zh/docs/tasks/configure-pod-container/security-context/)
-中所展示的那样。
-如果集群没有使用 [Pod 安全性准入](/zh/docs/concepts/security/pod-security-admission/)、
-[PodSecurityPolicies](/zh/docs/concepts/security/pod-security-policy/),
-也没有任何外部执行机制,那么你可以使用此准入控制器来限制安全上下文所能获取的值集。
+中某些字段的 Pod,正如任务[为 Pod 或 Container 配置安全上下文](/zh/docs/tasks/configure-pod-container/security-context/)
+中所展示的那样。如果集群没有使用
+[Pod 安全性准入](/zh/docs/concepts/security/pod-security-admission/)、
+[PodSecurityPolicy](/zh/docs/concepts/security/pod-security-policy/),
+也没有任何外部强制机制,那么你可以使用此准入控制器来限制安全上下文所能获取的值集。
有关限制 Pod 权限的更多内容,请参阅
[Pod 安全标准](/zh/docs/concepts/security/pod-security-standards/)。
@@ -1357,14 +1296,15 @@ pod privileges.
此准入控制器实现了
[ServiceAccount](/zh/docs/tasks/configure-pod-container/configure-service-account/)
的自动化。
如果你打算使用 Kubernetes 的 ServiceAccount 对象,我们强烈建议你使用这个准入控制器。
-### StorageObjectInUseProtection
+### StorageObjectInUseProtection {#storageobjectinuseprotection}
`StorageObjectInUseProtection` 插件将 `kubernetes.io/pvc-protection` 或
-`kubernetes.io/pv-protection` finalizers 添加到新创建的持久化卷声明(PVC)
-或持久化卷(PV)中。
-如果用户尝试删除 PVC/PV,除非 PVC/PV 的保护控制器移除 finalizers,否则
-PVC/PV 不会被删除。
-有关更多详细信息,请参考
+`kubernetes.io/pv-protection` finalizers 添加到新创建的持久卷申领(PVC)
+或持久卷(PV)中。如果用户尝试删除 PVC/PV,除非 PVC/PV 的保护控制器移除 finalizers,
+否则 PVC/PV 不会被删除。有关更多详细信息,请参考
[保护使用中的存储对象](/zh/docs/concepts/storage/persistent-volumes/#storage-object-in-use-protection)。
-### TaintNodesByCondition {#taintnodesbycondition}
+### TaintNodesByCondition {#taintnodesbycondition}
{{< feature-state for_k8s_version="v1.17" state="stable" >}}
-该准入控制器为新创建的节点添加 `NotReady` 和 `NoSchedule`
-{{< glossary_tooltip text="污点" term_id="taint" >}}。
-这些污点能够避免一些竞态条件的发生,这类静态条件可能导致 Pod 在更新节点污点以准确
-反映其所报告状况之前,就被调度到新节点上。
+该准入控制器为新创建的节点添加 `NotReady` 和 `NoSchedule` {{< glossary_tooltip text="污点" term_id="taint" >}}。
+这些污点能够避免一些竞态条件的发生,而这类竞态条件可能导致 Pod
+在更新节点污点以准确反映其所报告状况之前,就被调度到新节点上。
### ValidatingAdmissionWebhook {#validatingadmissionwebhook}
@@ -1403,18 +1343,18 @@ webhooks are called in parallel; if any of them rejects the request, the request
fails. This admission controller only runs in the validation phase; the webhooks it calls may not
mutate the object, as opposed to the webhooks called by the `MutatingAdmissionWebhook` admission controller.
-->
-该准入控制器调用与请求匹配的所有验证 Webhook。
+此准入控制器调用与请求匹配的所有验证性 Webhook。
匹配的 Webhook 将被并行调用。如果其中任何一个拒绝请求,则整个请求将失败。
-该准入控制器仅在验证(Validating)阶段运行;与 `MutatingAdmissionWebhook` 准入控制器
-所调用的 Webhook 相反,它调用的 Webhook 应该不会使对象出现变更。
+该准入控制器仅在验证(Validating)阶段运行;与 `MutatingAdmissionWebhook`
+准入控制器所调用的 Webhook 相反,它调用的 Webhook 不可以变更对象。
-如果以此方式调用的 Webhook 有其它作用(如,降低配额),则它必须具有协调机制。
-这是因为无法保证后续的 Webhook 或其他有效的准入控制器都允许请求完成。
+如果以此方式调用的 Webhook 有其它副作用(如:减少配额),则它必须具有协调机制。
+这是因为无法保证后续的 Webhook 或其他验证性准入控制器都允许请求完成。
如果你禁用了 ValidatingAdmissionWebhook,还必须通过 `--runtime-config` 标志来禁用
-`admissionregistration.k8s.io/v1` 组/版本中的 `ValidatingWebhookConfiguration`
-对象(默认情况下在 1.9 版和更高版本中均处于启用状态)。
-
+`admissionregistration.k8s.io/v1` 组/版本中的 `ValidatingWebhookConfiguration`
+对象(默认情况下在 v1.9 和更高版本中均处于启用状态)。
## 有推荐的准入控制器吗?
@@ -1439,10 +1382,3 @@ Yes. The recommended admission controllers are enabled by default (shown [here](
因此,你无需显式指定它们。
你可以使用 `--enable-admission-plugins` 标志( **顺序不重要** )来启用默认设置以外的其他准入控制器。
-{{< note >}}
-
-`--admission-control` 在 1.10 中已废弃,由 `--enable-admission-plugins` 取代。
-{{< /note >}}
-
diff --git a/content/zh/docs/reference/access-authn-authz/authentication.md b/content/zh-cn/docs/reference/access-authn-authz/authentication.md
similarity index 100%
rename from content/zh/docs/reference/access-authn-authz/authentication.md
rename to content/zh-cn/docs/reference/access-authn-authz/authentication.md
diff --git a/content/zh/docs/reference/access-authn-authz/authorization.md b/content/zh-cn/docs/reference/access-authn-authz/authorization.md
similarity index 100%
rename from content/zh/docs/reference/access-authn-authz/authorization.md
rename to content/zh-cn/docs/reference/access-authn-authz/authorization.md
diff --git a/content/zh/docs/reference/access-authn-authz/bootstrap-tokens.md b/content/zh-cn/docs/reference/access-authn-authz/bootstrap-tokens.md
similarity index 94%
rename from content/zh/docs/reference/access-authn-authz/bootstrap-tokens.md
rename to content/zh-cn/docs/reference/access-authn-authz/bootstrap-tokens.md
index 0960a96716..455d97c543 100644
--- a/content/zh/docs/reference/access-authn-authz/bootstrap-tokens.md
+++ b/content/zh-cn/docs/reference/access-authn-authz/bootstrap-tokens.md
@@ -21,14 +21,14 @@ creating new clusters or joining new nodes to an existing cluster. It was built
to support [kubeadm](/docs/reference/setup-tools/kubeadm/), but can be used in other contexts
for users that wish to start clusters without `kubeadm`. It is also built to
work, via RBAC policy, with the
-[Kubelet TLS Bootstrapping](/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/) system.
+[Kubelet TLS Bootstrapping](/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/) system.
-->
启动引导令牌是一种简单的持有者令牌(Bearer Token),这种令牌是在新建集群
或者在现有集群中添加新节点时使用的。
它被设计成能够支持 [`kubeadm`](/zh/docs/reference/setup-tools/kubeadm/),
但是也可以被用在其他的案例中以便用户在不使用 `kubeadm` 的情况下启动集群。
它也被设计成可以通过 RBAC 策略,结合
-[Kubelet TLS 启动引导](/zh/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/)
+[Kubelet TLS 启动引导](/zh/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/)
系统进行工作。
@@ -108,12 +108,16 @@ controller on the controller manager.
过期的令牌可以通过启用控制器管理器中的 `tokencleaner` 控制器来删除。
+```
+--controllers=*,tokencleaner
+```
+
@@ -121,7 +125,7 @@ Here is what the secret looks like.
每个合法的令牌背后对应着 `kube-system` 名字空间中的某个 Secret 对象。
你可以从
-[这里](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/cluster-lifecycle/bootstrap-discovery.md)
+[这里](https://github.com/kubernetes/design-proposals-archive/blob/main/cluster-lifecycle/bootstrap-discovery.md)
找到完整设计文档。
这是 Secret 看起来的样子。
@@ -142,10 +146,11 @@ stringData:
# 令牌 ID 和秘密信息,必需。
token-id: 07401b
- token-secret: base64(f395accd246ae52d)
+ token-secret: f395accd246ae52d
# 可选的过期时间字段
- expiration: "2017-03-10T03:22:11Z"
+ expiration: 2017-03-10T03:22:11Z
+
# 允许的用法
usage-bootstrap-authentication: "true"
usage-bootstrap-signing: "true"
@@ -259,7 +264,7 @@ data:
```
diff --git a/content/zh/docs/reference/access-authn-authz/certificate-signing-requests.md b/content/zh-cn/docs/reference/access-authn-authz/certificate-signing-requests.md
similarity index 100%
rename from content/zh/docs/reference/access-authn-authz/certificate-signing-requests.md
rename to content/zh-cn/docs/reference/access-authn-authz/certificate-signing-requests.md
diff --git a/content/zh/docs/reference/access-authn-authz/extensible-admission-controllers.md b/content/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers.md
similarity index 100%
rename from content/zh/docs/reference/access-authn-authz/extensible-admission-controllers.md
rename to content/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers.md
diff --git a/content/zh/docs/reference/command-line-tools-reference/kubelet-authentication-authorization.md b/content/zh-cn/docs/reference/access-authn-authz/kubelet-authn-authz.md
similarity index 100%
rename from content/zh/docs/reference/command-line-tools-reference/kubelet-authentication-authorization.md
rename to content/zh-cn/docs/reference/access-authn-authz/kubelet-authn-authz.md
diff --git a/content/zh/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping.md b/content/zh-cn/docs/reference/access-authn-authz/kubelet-tls-bootstrapping.md
similarity index 100%
rename from content/zh/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping.md
rename to content/zh-cn/docs/reference/access-authn-authz/kubelet-tls-bootstrapping.md
diff --git a/content/zh/docs/reference/access-authn-authz/node.md b/content/zh-cn/docs/reference/access-authn-authz/node.md
similarity index 97%
rename from content/zh/docs/reference/access-authn-authz/node.md
rename to content/zh-cn/docs/reference/access-authn-authz/node.md
index 72f8545fe6..2a9753860d 100644
--- a/content/zh/docs/reference/access-authn-authz/node.md
+++ b/content/zh-cn/docs/reference/access-authn-authz/node.md
@@ -90,12 +90,12 @@ have the minimal set of permissions required to operate correctly.
-->
为了获得节点鉴权器的授权,kubelet 必须使用一个凭证以表示它在 `system:nodes` 组中,用户名为 `system:node:`。
-上述的组名和用户名格式要与 [kubelet TLS 启动引导](/zh/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/)过程中为每个 kubelet 创建的标识相匹配。
+上述的组名和用户名格式要与 [kubelet TLS 启动引导](/zh/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/)过程中为每个 kubelet 创建的标识相匹配。
要启用节点授权器,请使用 `--authorization-mode = Node` 启动 apiserver。
diff --git a/content/zh/docs/reference/access-authn-authz/psp-to-pod-security-standards.md b/content/zh-cn/docs/reference/access-authn-authz/psp-to-pod-security-standards.md
similarity index 99%
rename from content/zh/docs/reference/access-authn-authz/psp-to-pod-security-standards.md
rename to content/zh-cn/docs/reference/access-authn-authz/psp-to-pod-security-standards.md
index 97f6663629..40ae2452f8 100644
--- a/content/zh/docs/reference/access-authn-authz/psp-to-pod-security-standards.md
+++ b/content/zh-cn/docs/reference/access-authn-authz/psp-to-pod-security-standards.md
@@ -30,7 +30,7 @@ For each applicable parameter, the allowed values for the
[Baseline](/docs/concepts/security/pod-security-standards/#baseline) and
[Restricted](/docs/concepts/security/pod-security-standards/#restricted) profiles are listed.
Anything outside the allowed values for those profiles would fall under the
-[Privileged](/docs/concepts/security/pod-security-standards/#priveleged) profile. "No opinion"
+[Privileged](/docs/concepts/security/pod-security-standards/#privileged) profile. "No opinion"
means all values are allowed under all Pod Security Standards.
-->
对于每个可应用的参数,表格中给出了
@@ -38,7 +38,7 @@ means all values are allowed under all Pod Security Standards.
[Restricted](/zh/docs/concepts/security/pod-security-standards/#restricted)
配置下可接受的取值。
对这两种配置而言不可接受的取值均归入
-[Privileged](/zh/docs/concepts/security/pod-security-standards/#priveleged)
+[Privileged](/zh/docs/concepts/security/pod-security-standards/#privileged)
配置下。“无意见”意味着对所有 Pod 安全性标准而言所有取值都可接受。
@@ -25,7 +27,7 @@ network resources based on the roles of individual users within your organizatio
RBAC 鉴权机制使用 `rbac.authorization.k8s.io`
@@ -34,12 +36,17 @@ RBAC 鉴权机制使用 `rbac.authorization.k8s.io`
要启用 RBAC,在启动 {{< glossary_tooltip text="API 服务器" term_id="kube-apiserver" >}}
时将 `--authorization-mode` 参数设置为一个逗号分隔的列表并确保其中包含 `RBAC`。
+
```shell
kube-apiserver --authorization-mode=Example,RBAC --<其他选项> --<其他选项>
```
@@ -123,11 +130,24 @@ ClusterRole 有若干用法。你可以用它来:
Here's an example Role in the "default" namespace that can be used to grant read access to
{{< glossary_tooltip text="pods" term_id="pod" >}}:
-->
-#### Role 示例
+#### Role 示例 {#role-example}
下面是一个位于 "default" 名字空间的 Role 的示例,可用来授予对
{{< glossary_tooltip text="pods" term_id="pod" >}} 的读访问权限:
+
```yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
@@ -144,16 +164,16 @@ rules:
#### ClusterRole example
A ClusterRole can be used to grant the same permissions as a Role.
-Because they are cluster-scoped, you can also use them to grant access to:
+Because ClusterRoles are cluster-scoped, you can also use them to grant access to:
* cluster-scoped resources (like {{< glossary_tooltip text="nodes" term_id="node" >}})
* non-resource endpoints (like `/healthz`)
* namespaced resources (like Pods), across all namespaces
For example: you can use a ClusterRole to allow a particular user to run
- `kubectl get pods -all-namespaces`
+ `kubectl get pods --all-namespaces`
-->
-### ClusterRole 示例
+### ClusterRole 示例 {#clusterrole-example}
ClusterRole 可以和 Role 相同完成授权。
因为 ClusterRole 属于集群范围,所以它也可以为以下资源授予访问权限:
@@ -173,6 +193,22 @@ or across all namespaces (depending on how it is [bound](#rolebinding-and-cluste
{{< glossary_tooltip text="Secret" term_id="secret" >}} 授予读访问权限,
或者跨名字空间的访问权限(取决于该角色是如何[绑定](#rolebinding-and-clusterrolebinding)的):
+
```yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
@@ -181,7 +217,7 @@ metadata:
name: secret-reader
rules:
- apiGroups: [""]
- # 在 HTTP 层面,用来访问 Secret 对象的资源的名称为 "secrets"
+ # 在 HTTP 层面,用来访问 Secret 资源的名称为 "secrets"
resources: ["secrets"]
verbs: ["get", "watch", "list"]
```
@@ -236,9 +272,31 @@ This allows "jane" to read pods in the "default" namespace.
下面的例子中的 RoleBinding 将 "pod-reader" Role 授予在 "default" 名字空间中的用户 "jane"。
这样,用户 "jane" 就具有了读取 "default" 名字空间中 pods 的权限。
+
```yaml
apiVersion: rbac.authorization.k8s.io/v1
# 此角色绑定允许 "jane" 读取 "default" 名字空间中的 Pods
+# 你需要在该命名空间中有一个名为 “pod-reader” 的 Role
kind: RoleBinding
metadata:
name: read-pods
@@ -251,7 +309,7 @@ subjects:
roleRef:
# "roleRef" 指定与某 Role 或 ClusterRole 的绑定关系
kind: Role # 此字段必须是 Role 或 ClusterRole
- name: pod-reader # 此字段必须与你要绑定的 Role 或 ClusterRole 的名称匹配
+ name: pod-reader # 此字段必须与你要绑定的 Role 或 ClusterRole 的名称匹配
apiGroup: rbac.authorization.k8s.io
```
@@ -273,6 +331,28 @@ RoleBinding 所在名字空间的资源。这种引用使得你可以跨整个
区分大小写)只能访问 "development" 名字空间中的 Secrets 对象,因为 RoleBinding
所在的名字空间(由其 metadata 决定)是 "development"。
+
```yaml
apiVersion: rbac.authorization.k8s.io/v1
# 此角色绑定使得用户 "dave" 能够读取 "development" 名字空间中的 Secrets
@@ -306,6 +386,23 @@ secrets in any namespace.
下面的 ClusterRoleBinding 允许 "manager" 组内的所有用户访问任何名字空间中的
Secrets。
+
```yaml
apiVersion: rbac.authorization.k8s.io/v1
# 此集群角色绑定允许 “manager” 组中的任何人访问任何名字空间中的 secrets
@@ -337,20 +434,24 @@ There are two reasons for this restriction:
这种限制有两个主要原因:
+1. 将 `roleRef` 设置为不可以改变,这使得可以为用户授予对现有绑定对象的 `update` 权限,
+ 这样可以让他们管理主体列表,同时不能更改被授予这些主体的角色。
+
1. 针对不同角色的绑定是完全不一样的绑定。要求通过删除/重建绑定来更改 `roleRef`,
这样可以确保要赋予绑定的所有主体会被授予新的角色(而不是在允许或者不小心修改
了 `roleRef` 的情况下导致所有现有主体未经验证即被授予新角色对应的权限)。
-1. 将 `roleRef` 设置为不可以改变,这使得可以为用户授予对现有绑定对象的 `update` 权限,
- 这样可以让他们管理主体列表,同时不能更改被授予这些主体的角色。
+### 对资源的引用 {#referring-to-resources}
+
-### 对资源的引用 {#referring-to-resources}
-
在 Kubernetes API 中,大多数资源都是使用对象名称的字符串表示来呈现与访问的。
例如,对于 Pod 应使用 "pods"。
RBAC 使用对应 API 端点的 URL 中呈现的名字来引用资源。
@@ -415,6 +517,7 @@ Here is an example that restricts its subject to only `get` or `update` a
下面的例子中限制可以 "get" 和 "update" 一个名为 `my-configmap` 的
{{< glossary_tooltip term_id="ConfigMap" >}}:
+
+```yaml
+apiVersion: rbac.authorization.k8s.io/v1
+kind: Role
+metadata:
+ namespace: default
+ name: configmap-updater
+rules:
+- apiGroups: [""]
+ # 在 HTTP 层面,用来访问 ConfigMap 资源的名称为 "configmaps"
resources: ["configmaps"]
resourceNames: ["my-configmap"]
verbs: ["update", "get"]
@@ -465,6 +584,19 @@ Here is an example aggregated ClusterRole:
下面是一个聚合 ClusterRole 的示例:
+
```yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
@@ -488,6 +620,22 @@ ClusterRole labeled `rbac.example.com/aggregate-to-monitoring: true`.
下面的例子中,通过创建一个标签同样为 `rbac.example.com/aggregate-to-monitoring: true`
的 ClusterRole,新的规则可被添加到 "monitoring" ClusterRole 中。
+
```yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
@@ -513,7 +661,7 @@ For example: the following ClusterRoles let the "admin" and "edit" default roles
named CronTab, whereas the "view" role can perform only read actions on CronTab resources.
You can assume that CronTab objects are named `"crontabs"` in URLs as seen by the API server.
-->
-默认的[面向用户的角色](#default-roles-and-role-bindings) 使用 ClusterRole 聚合。
+默认的[面向用户的角色](#default-roles-and-role-bindings)使用 ClusterRole 聚合。
这使得作为集群管理员的你可以为扩展默认规则,包括为定制资源设置规则,
比如通过 CustomResourceDefinitions 或聚合 API 服务器提供的定制资源。
@@ -521,6 +669,34 @@ You can assume that CronTab objects are named `"crontabs"` in URLs as seen by th
"view" 角色对 CronTab 资源拥有读操作权限。
你可以假定 CronTab 对象在 API 服务器所看到的 URL 中被命名为 `"crontabs"`。
+
```yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
@@ -549,7 +725,7 @@ rules:
```
+```yaml
+rules:
+- apiGroups: [""]
+ # 在 HTTP 层面,用来访问 Pod 资源的名称为 "pods"
resources: ["pods"]
verbs: ["get", "list", "watch"]
```
@@ -576,12 +763,25 @@ rules:
Allow reading/writing Deployments (at the HTTP level: objects with `"deployments"`
in the resource part of their URL) in the `"apps"` API groups:
-->
-允许读/写在 `"apps"` API 组中的 Deployment(在 HTTP 层面,对应
-URL 中资源部分为 "deployments"):
+允许在 `"apps"` API 组中读/写 Deployment(在 HTTP 层面,对应 URL
+中资源部分为 `"deployments"`):
+
+```yaml
+rules:
+- apiGroups: ["apps"]
+ #
+ # 在 HTTP 层面,用来访问 Deployment 资源的名称为 "deployments"
resources: ["deployments"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
```
@@ -590,15 +790,33 @@ rules:
Allow reading Pods in the core API group, as well as reading or writing Job
resources in the `"batch"` API group:
-->
-允许读取核心 API 组中的 "pods" 和读/写 `"batch"` API 组中的
-"jobs":
+允许读取核心 API 组中的 Pod 和读/写 `"batch"` API 组中的 Job 资源:
+
+```yaml
+rules:
+- apiGroups: [""]
+ # 在 HTTP 层面,用来访问 Pod 资源的名称为 "pods"
+ resources: ["pods"]
+ verbs: ["get", "list", "watch"]
+- apiGroups: ["batch"]
+ # 在 HTTP 层面,用来访问 Job 资源的名称为 "jobs"
resources: ["jobs"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
```
@@ -610,9 +828,22 @@ RoleBinding to limit to a single ConfigMap in a single namespace):
允许读取名称为 "my-config" 的 ConfigMap(需要通过 RoleBinding 绑定以
限制为某名字空间中特定的 ConfigMap):
+
+```yaml
+rules:
+- apiGroups: [""]
+ # 在 HTTP 层面,用来访问 ConfigMap 资源的名称为 "configmaps"
resources: ["configmaps"]
resourceNames: ["my-config"]
verbs: ["get"]
@@ -623,12 +854,24 @@ Allow reading the resource `"nodes"` in the core group (because a
Node is cluster-scoped, this must be in a ClusterRole bound with a
ClusterRoleBinding to be effective):
-->
-允许读取在核心组中的 "nodes" 资源(因为 `Node` 是集群作用域的,所以需要
+允许读取在核心组中的 `"nodes"` 资源(因为 `Node` 是集群作用域的,所以需要
ClusterRole 绑定到 ClusterRoleBinding 才生效):
+
+```yaml
+rules:
+- apiGroups: [""]
+ # 在 HTTP 层面,用来访问 Node 资源的名称为 "nodes"
resources: ["nodes"]
verbs: ["get", "list", "watch"]
```
@@ -641,14 +884,21 @@ to be effective):
允许针对非资源端点 `/healthz` 和其子路径上发起 GET 和 POST 请求
(必须在 ClusterRole 绑定 ClusterRoleBinding 才生效):
+
+```yaml
+rules:
+- nonResourceURLs: ["/healthz", "/healthz/*"] # nonResourceURL 中的 '*' 是一个全局通配符
+ verbs: ["get", "post"]
```
### 对主体的引用 {#referring-to-subjects}
-RoleBinding 或者 ClusterRoleBinding 可绑定角色到某 *主体(Subject)*上。
+RoleBinding 或者 ClusterRoleBinding 可绑定角色到某 **主体(Subject)** 上。
主体可以是组,用户或者
{{< glossary_tooltip text="服务账户" term_id="service-account" >}}。
@@ -692,8 +942,8 @@ In Kubernetes, Authenticator modules provide group information.
Groups, like users, are represented as strings, and that string has no format requirements,
other than that the prefix `system:` is reserved.
-[Service Accounts](/docs/tasks/configure-pod-container/configure-service-account/) have usernames with the `system:serviceaccount:` prefix and belong
-to groups with the `system:serviceaccounts:` prefix.
+[ServiceAccounts](/docs/tasks/configure-pod-container/configure-service-account/) have names prefixed
+with `system:serviceaccount:`, and belong to groups that have names prefixed with `system:serviceaccounts:`.
-->
在 Kubernetes 中,鉴权模块提供用户组信息。
与用户名一样,用户组名也用字符串来表示,而且对该字符串没有格式要求,
@@ -713,7 +963,7 @@ to groups with the `system:serviceaccounts:` prefix.
{{< /note >}}
-## 默认 Roles 和 Role Bindings
+## 默认 Roles 和 Role Bindings {#default-roles-and-role-bindings}
API 服务器创建一组默认的 ClusterRole 和 ClusterRoleBinding 对象。
这其中许多是以 `system:` 为前缀的,用以标识对应资源是直接由集群控制面管理的。
@@ -844,7 +1094,7 @@ Modifications to these resources can result in non-functional clusters.
-->
在修改名称包含 `system:` 前缀的 ClusterRole 和 ClusterRoleBinding
时要格外小心。
-对这些资源的更改可能导致集群无法继续工作。
+对这些资源的更改可能导致集群无法正常运作。
{{< /caution >}}
### API 发现角色 {#discovery-roles}
无论是经过身份验证的还是未经过身份验证的用户,默认的角色绑定都授权他们读取被认为
-是可安全地公开访问的 API( 包括 CustomResourceDefinitions)。
+是可安全地公开访问的 API(包括 CustomResourceDefinitions)。
如果要禁用匿名的未经过身份验证的用户访问,请在 API 服务器配置中中添加
`--anonymous-auth=false` 的配置选项。
@@ -900,19 +1150,17 @@ If you edit that ClusterRole, your changes will be overwritten on API server res
via [auto-reconciliation](#auto-reconciliation). To avoid that overwriting,
either do not manually edit the role, or disable auto-reconciliation.
-->
-如果你编辑该 ClusterRole,你所作的变更会被 API 服务器在重启时自动覆盖,这是通过
-[自动协商](#auto-reconciliation)机制完成的。要避免这类覆盖操作,
+如果你编辑该 ClusterRole,你所作的变更会被 API 服务器在重启时自动覆盖,
+这是通过[自动协商](#auto-reconciliation)机制完成的。要避免这类覆盖操作,
要么不要手动编辑这些角色,要么禁止自动协商机制。
{{< /note >}}
-
-Kubernetes RBAC API 发现角色
-
-
+Kubernetes RBAC API 发现角色
+
system:authenticated 组
-
-允许用户以只读的方式去访问他们自己的基本信息。在 1.14 版本之前,这个角色在默认情况下也绑定在 system:unauthenticated 上。
+允许用户以只读的方式去访问他们自己的基本信息。在 v1.14 版本之前,这个角色在默认情况下也绑定在 system:unauthenticated 上。
system:discovery
-
system:authenticated 组
-
允许以只读方式访问 API 发现端点,这些端点用来发现和协商 API 级别。
-在 1.14 版本之前,这个角色在默认情况下绑定在 system:unauthenticated 上。
+在 v1.14 版本之前,这个角色在默认情况下绑定在 system:unauthenticated 上。
system:public-info-viewer
-
system:authenticated 和 system:unauthenticated 组
-
-允许对集群的非敏感信息进行只读访问,它是在 1.14 版本中引入的。
+允许对集群的非敏感信息进行只读访问,它是在 v1.14 版本中引入的。
@@ -1003,7 +1251,7 @@ metadata:
```
-
+
system:masters 组
-
允许超级用户在平台上的任何资源上执行所有操作。
当在 ClusterRoleBinding 中使用时,可以授权对集群中以及所有名字空间中的全部资源进行完全控制。
-当在 RoleBinding 中使用时,可以授权控制 RoleBinding 所在名字空间中的所有资源,包括名字空间本身。
+当在 RoleBinding 中使用时,可以授权控制角色绑定所在名字空间中的所有资源,包括名字空间本身。
admin
-
无
-
无
-
无
-
@@ -1102,7 +1350,7 @@ It does not allow viewing roles or rolebindings.
This role does not allow viewing Secrets, since reading
the contents of Secrets enables access to ServiceAccount credentials
in the namespace, which would allow API access as any ServiceAccount
-in the namespace (a form of privilege escalation).
+in the namespace (a form of privilege escalation).
-->
此角色不允许查看 Secrets,因为读取 Secret 的内容意味着可以访问名字空间中
ServiceAccount 的凭据信息,进而允许利用名字空间中任何 ServiceAccount 的
@@ -1118,7 +1366,7 @@ ServiceAccount 的凭据信息,进而允许利用名字空间中任何 Service
### 核心组件角色 {#core-component-roles}
-
+
system:kube-scheduler 用户
-
允许访问 {{< glossary_tooltip term_id="kube-scheduler" text="scheduler" >}}
@@ -1148,8 +1396,8 @@ Allows access to the resources required by the {{< glossary_tooltip term_id="kub
system:volume-scheduler
-
system:kube-scheduler 用户
@@ -1161,23 +1409,23 @@ Allows access to the volume resources required by the kube-scheduler component.
system:kube-controller-manager
-
system:kube-controller-manager 用户
-
允许访问{{< glossary_tooltip term_id="kube-controller-manager" text="控制器管理器" >}}
组件所需要的资源。
-各个控制回路所需要的权限在控制器角色 详述。
+各个控制回路所需要的权限在控制器角色 详述。
system:node
-
无
@@ -1187,17 +1435,17 @@ Allows access to resources required by the kubelet, including read access to
-->
允许访问 kubelet 所需要的资源,包括对所有 Secret 的读操作和对所有 Pod 状态对象的写操作。
-
-你应该使用 Node 鉴权组件 和
-NodeRestriction 准入插件
-而不是 system:node 角色。同时基于 kubelet 上调度执行的 Pod 来授权
+你应该使用 Node 鉴权组件 和
+NodeRestriction 准入插件 而不是
+system:node 角色。同时基于 kubelet 上调度执行的 Pod 来授权
kubelet 对 API 的访问。
-
system:node 角色的意义仅是为了与从 v1.8 之前版本升级而来的集群兼容。
@@ -1220,13 +1468,13 @@ The system:node role only exists for compatibility with Kubernetes clus
### 其他组件角色 {#other-component-roles}
-
+
-
默认 ClusterRole
默认 ClusterRoleBinding
@@ -1236,12 +1484,12 @@ The system:node role only exists for compatibility with Kubernetes clus
system:auth-delegator
-
无
-
@@ -1251,8 +1499,8 @@ This is commonly used by add-on API servers for unified authentication and autho
system:heapster
-
无
@@ -1264,8 +1512,8 @@ Role for the Heapster compo
system:kube-aggregator
-
无
@@ -1273,52 +1521,50 @@ Role for the Heapster compo
system:kube-dns
-
-在 kube-system 名字空间中的 kube-dns 服务账户
+在 kube-system 名字空间中的 kube-dns 服务账户
-为 kube-dns 组件定义的角色。
-
+为 kube-dns 组件定义的角色。
system:kubelet-api-admin
-
无
-
允许 kubelet API 的完全访问权限。
-
+
system:node-bootstrapper
-
无
-
允许访问执行
-kubelet TLS 启动引导
+kubelet TLS 启动引导
所需要的资源。
system:node-problem-detector
-
无
-
为 node-problem-detector 组件定义的角色。
@@ -1326,30 +1572,30 @@ Role for the node-
system:persistent-volume-provisioner
-
无
-
允许访问大部分
-动态卷驱动
-
-所需要的资源。
+动态卷驱动
+所需要的资源。
+
system:monitoring
-
system:monitoring 组
@@ -1368,10 +1614,10 @@ Allows read access to control-plane monitoring endpoints
The Kubernetes {{< glossary_tooltip term_id="kube-controller-manager" text="controller manager" >}} runs
{{< glossary_tooltip term_id="controller" text="controllers" >}} that are built in to the Kubernetes
control plane.
-When invoked with `-use-service-account-credentials`, kube-controller-manager starts each controller
+When invoked with `--use-service-account-credentials`, kube-controller-manager starts each controller
using a separate service account.
Corresponding roles exist for each built-in controller, prefixed with `system:controller:`.
-If the controller manager is not started with `-use-service-account-credentials`, it runs all control loops
+If the controller manager is not started with `--use-service-account-credentials`, it runs all control loops
using its own credential, which must be granted all the relevant roles.
These roles include:
-->
@@ -1379,12 +1625,12 @@ These roles include:
Kubernetes {{< glossary_tooltip term_id="kube-controller-manager" text="控制器管理器" >}}
运行内建于 Kubernetes 控制面的{{< glossary_tooltip term_id="controller" text="控制器" >}}。
-当使用 `--use-service-account-credentials` 参数启动时, kube-controller-manager
+当使用 `--use-service-account-credentials` 参数启动时,kube-controller-manager
使用单独的服务账户来启动每个控制器。
每个内置控制器都有相应的、前缀为 `system:controller:` 的角色。
如果控制管理器启动时未设置 `--use-service-account-credentials`,
它使用自己的身份凭据来运行所有的控制器,该身份必须被授予所有相关的角色。
-这些角色包括:
+这些角色包括:
* `system:controller:attachdetach-controller`
* `system:controller:certificate-controller`
@@ -1415,12 +1661,12 @@ Kubernetes {{< glossary_tooltip term_id="kube-controller-manager" text="控制
* `system:controller:ttl-controller`
-## 初始化与预防权限提升
+## 初始化与预防权限提升 {#privilege-escalation-prevention-and-bootstrapping}
RBAC API 会阻止用户通过编辑角色或者角色绑定来提升权限。
由于这一点是在 API 级别实现的,所以在 RBAC 鉴权组件未启用的状态下依然可以正常工作。
@@ -1434,7 +1680,7 @@ You can only create/update a role if at least one of the following things is tru
(cluster-wide for a ClusterRole, within the same namespace or cluster-wide for a Role).
2. You are granted explicit permission to perform the `escalate` verb on the `roles` or `clusterroles` resource in the `rbac.authorization.k8s.io` API group.
-->
-### 对角色创建或更新的限制
+### 对角色创建或更新的限制 {#restrictions-on-role-creation-or-update}
只有在符合下列条件之一的情况下,你才能创建/更新角色:
@@ -1470,7 +1716,7 @@ You can only create/update a role binding if you already have all the permission
For example, if `user-1` does not have the ability to list Secrets cluster-wide, they cannot create a ClusterRoleBinding
to a role that grants that permission. To allow a user to create/update role bindings:
-->
-### 对角色绑定创建或更新的限制
+### 对角色绑定创建或更新的限制 {#restrictions-on-role-binding-creation-or-update}
只有你已经具有了所引用的角色中包含的全部权限时,或者你被授权在所引用的角色上执行 `bind`
动词时,你才可以创建或更新角色绑定。这里的权限与角色绑定的作用域相同。
@@ -1495,6 +1741,37 @@ For example, this ClusterRole and RoleBinding would allow `user-1` to grant othe
例如,下面的 ClusterRole 和 RoleBinding 将允许用户 `user-1` 把名字空间 `user-1-namespace`
中的 `admin`、`edit` 和 `view` 角色赋予其他用户:
+
```yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
@@ -1529,33 +1806,32 @@ subjects:
When bootstrapping the first roles and role bindings, it is necessary for the initial user to grant permissions they do not yet have.
To bootstrap initial roles and role bindings:
-* Use a credential with the `system:masters` group, which is bound to the `cluster-admin` super-user role by the default bindings.
-* If your API server runs with the insecure port enabled (`-insecure-port`), you can also make API calls via that port, which does not enforce authentication or authorization.
+* Use a credential with the "system:masters" group, which is bound to the "cluster-admin" super-user role by the default bindings.
+* If your API server runs with the insecure port enabled (`--insecure-port`), you can also make API calls via that port, which does not enforce authentication or authorization.
-->
当启动引导第一个角色和角色绑定时,需要为初始用户授予他们尚未拥有的权限。
对初始角色和角色绑定进行初始化时需要:
* 使用用户组为 `system:masters` 的凭据,该用户组由默认绑定关联到 `cluster-admin`
这个超级用户角色。
-* 如果你的 API 服务器启动时启用了不安全端口(使用 `--insecure-port`), 你也可以通过
- 该端口调用 API ,这样的操作会绕过身份验证或鉴权。
+* 如果你的 API 服务器启动时启用了不安全端口(使用 `--insecure-port`),你也可以通过
+ 该端口调用 API,这样的操作会绕过身份验证或鉴权。
+## 一些命令行工具 {#command-line-utilities}
### `kubectl create role`
-Creates a `Role` object defining permissions within a single namespace. Examples:
+
-## 一些命令行工具
-
-### `kubectl create role`
-
创建 Role 对象,定义在某一名字空间中的权限。例如:
-* 创建名称为 "pod-reader" 的 Role 对象,允许用户对 Pods 执行 `get`、`watch` 和 `list` 操作:
+* 创建名称为 “pod-reader” 的 Role 对象,允许用户对 Pods 执行 `get`、`watch` 和 `list` 操作:
```shell
kubectl create role pod-reader --verb=get --verb=list --verb=watch --resource=pods
@@ -1564,16 +1840,16 @@ Creates a `Role` object defining permissions within a single namespace. Examples
-* 创建名称为 "pod-reader" 的 Role 对象并指定 `resourceNames`:
+* 创建名称为 “pod-reader” 的 Role 对象并指定 `resourceNames`:
```shell
kubectl create role pod-reader --verb=get --resource=pods --resource-name=readablepod --resource-name=anotherpod
```
-* 创建名为 "foo" 的 Role 对象并指定 `apiGroups`:
+* 创建名为 “foo” 的 Role 对象并指定 `apiGroups`:
```shell
kubectl create role foo --verb=get,list,watch --resource=replicasets.apps
@@ -1582,7 +1858,7 @@ Creates a `Role` object defining permissions within a single namespace. Examples
-* 创建名为 "foo" 的 Role 对象并指定子资源权限:
+* 创建名为 “foo” 的 Role 对象并指定子资源权限:
```shell
kubectl create role foo --verb=get,list,watch --resource=pods,pods/status
@@ -1591,7 +1867,7 @@ Creates a `Role` object defining permissions within a single namespace. Examples
-* 创建名为 "my-component-lease-holder" 的 Role 对象,使其具有对特定名称的
+* 创建名为 “my-component-lease-holder” 的 Role 对象,使其具有对特定名称的
资源执行 get/update 的权限:
```shell
@@ -1607,7 +1883,7 @@ Creates a ClusterRole. Examples:
-->
创建 ClusterRole 对象。例如:
-* 创建名称为 "pod-reader" 的 ClusterRole`对象,允许用户对 Pods 对象执行 `get`、
+* 创建名称为 “pod-reader” 的 ClusterRole 对象,允许用户对 Pods 对象执行 `get`、
`watch` 和 `list` 操作:
```shell
@@ -1617,7 +1893,7 @@ Creates a ClusterRole. Examples:
-* 创建名为 "pod-reader" 的 ClusterRole 对象并指定 `resourceNames`:
+* 创建名为 “pod-reader” 的 ClusterRole 对象并指定 `resourceNames`:
```shell
kubectl create clusterrole pod-reader --verb=get --resource=pods --resource-name=readablepod --resource-name=anotherpod
@@ -1626,7 +1902,7 @@ Creates a ClusterRole. Examples:
-* 创建名为 "foo" 的 ClusterRole 对象并指定 `apiGroups`:
+* 创建名为 “foo” 的 ClusterRole 对象并指定 `apiGroups`:
```shell
kubectl create clusterrole foo --verb=get,list,watch --resource=replicasets.apps
@@ -1635,7 +1911,7 @@ Creates a ClusterRole. Examples:
-* 创建名为 "foo" 的 ClusterRole 对象并指定子资源:
+* 创建名为 “foo” 的 ClusterRole 对象并指定子资源:
```shell
kubectl create clusterrole foo --verb=get,list,watch --resource=pods,pods/status
@@ -1644,7 +1920,7 @@ Creates a ClusterRole. Examples:
-* 创建名为 "foo" 的 ClusterRole 对象并指定 `nonResourceURL`:
+* 创建名为 “foo” 的 ClusterRole 对象并指定 `nonResourceURL`:
```shell
kubectl create clusterrole "foo" --verb=get --non-resource-url=/logs/*
@@ -1653,7 +1929,7 @@ Creates a ClusterRole. Examples:
-* 创建名为 "monitoring" 的 ClusterRole 对象并指定 `aggregationRule`:
+* 创建名为 “monitoring” 的 ClusterRole 对象并指定 `aggregationRule`:
```shell
kubectl create clusterrole monitoring --aggregation-rule="rbac.example.com/aggregate-to-monitoring=true"
@@ -1668,7 +1944,7 @@ Grants a Role or ClusterRole within a specific namespace. Examples:
-->
在特定的名字空间中对 `Role` 或 `ClusterRole` 授权。例如:
-* 在名字空间 "acme" 中,将名为 `admin` 的 ClusterRole 中的权限授予名称 "bob" 的用户:
+* 在名字空间 “acme” 中,将名为 `admin` 的 ClusterRole 中的权限授予名称 “bob” 的用户:
```shell
kubectl create rolebinding bob-admin-binding --clusterrole=admin --user=bob --namespace=acme
@@ -1677,7 +1953,7 @@ Grants a Role or ClusterRole within a specific namespace. Examples:
-* 在名字空间 "acme" 中,将名为 `view` 的 ClusterRole 中的权限授予名字空间 "acme"
+* 在名字空间 “acme” 中,将名为 `view` 的 ClusterRole 中的权限授予名字空间 “acme”
中名为 `myapp` 的服务账户:
```shell
@@ -1687,8 +1963,8 @@ Grants a Role or ClusterRole within a specific namespace. Examples:
-* 在名字空间 "acme" 中,将名为 `view` 的 ClusterRole 对象中的权限授予名字空间
- "myappnamespace" 中名称为 `myapp` 的服务账户:
+* 在名字空间 “acme” 中,将名为 `view` 的 ClusterRole 对象中的权限授予名字空间
+ “myappnamespace” 中名称为 `myapp` 的服务账户:
```shell
kubectl create rolebinding myappnamespace-myapp-view-binding --clusterrole=view --serviceaccount=myappnamespace:myapp --namespace=acme
@@ -1704,7 +1980,7 @@ Grants a ClusterRole across the entire cluster (all namespaces). Examples:
在整个集群(所有名字空间)中用 ClusterRole 授权。例如:
* 在整个集群范围,将名为 `cluster-admin` 的 ClusterRole 中定义的权限授予名为
- "root" 用户:
+ “root” 用户:
```shell
kubectl create clusterrolebinding root-cluster-admin-binding --clusterrole=cluster-admin --user=root
@@ -1714,7 +1990,7 @@ Grants a ClusterRole across the entire cluster (all namespaces). Examples:
* Across the entire cluster, grant the permissions in the "system:node-proxier" ClusterRole to a user named "system:kube-proxy":
-->
* 在整个集群范围内,将名为 `system:node-proxier` 的 ClusterRole 的权限授予名为
- "system:kube-proxy" 的用户:
+ “system:kube-proxy” 的用户:
```shell
kubectl create clusterrolebinding kube-proxy-binding --clusterrole=system:node-proxier --user=system:kube-proxy
@@ -1723,8 +1999,8 @@ Grants a ClusterRole across the entire cluster (all namespaces). Examples:
-* 在整个集群范围内,将名为 `view` 的 ClusterRole 中定义的权限授予 "acme" 名字空间中
- 名为 "myapp" 的服务账户:
+* 在整个集群范围内,将名为 `view` 的 ClusterRole 中定义的权限授予 “acme” 名字空间中
+ 名为 “myapp” 的服务账户:
```shell
kubectl create clusterrolebinding myapp-view-binding --clusterrole=view --serviceaccount=acme:myapp
@@ -1762,7 +2038,7 @@ Examples:
* 测试应用 RBAC 对象的清单文件,显示将要进行的更改:
```shell
- kubectl auth reconcile -f my-rbac-rules.yaml --dry-run
+ kubectl auth reconcile -f my-rbac-rules.yaml --dry-run=client
```
-* 应用 RBAC 对象的清单文件, 删除角色中的额外权限和绑定中的其他主体:
+* 应用 RBAC 对象的清单文件,删除角色中的额外权限和绑定中的其他主体:
```shell
kubectl auth reconcile -f my-rbac-rules.yaml --remove-extra-subjects --remove-extra-permissions
```
-查看 CLI 帮助获取详细的用法。
-
-
## 服务账户权限 {#service-account-permissions}
@@ -1805,9 +2077,9 @@ Broader grants can give unnecessary (and potentially escalating) API access to s
但是不会对 `kube-system` 名字空间之外的服务账户授予权限。
(除了授予所有已认证用户的发现权限)
-这使得你可以根据需要向特定服务账户授予特定权限。
+这使得你可以根据需要向特定 ServiceAccount 授予特定权限。
细粒度的角色绑定可带来更好的安全性,但需要更多精力管理。
-粗粒度的授权可能导致服务账户被授予不必要的 API 访问权限(甚至导致潜在的权限提升),
+粗粒度的授权可能导致 ServiceAccount 被授予不必要的 API 访问权限(甚至导致潜在的权限提升),
但更易于管理。
这要求应用在其 Pod 规约中指定 `serviceAccountName`,
- 并额外创建服务账户(包括通过 API、应用程序清单、`kubectl create serviceaccount` 等)。
+ 并额外创建服务账户(包括通过 API、应用程序清单、`kubectl create serviceaccount` 等)。
- 例如,在名字空间 "my-namespace" 中授予服务账户 "my-sa" 只读权限:
+ 例如,在名字空间 “my-namespace” 中授予服务账户 “my-sa” 只读权限:
```shell
kubectl create rolebinding my-sa-view \
@@ -1840,7 +2112,7 @@ In order from most secure to least secure, the approaches are:
-2. 将角色授予某名字空间中的 "default" 服务账户
+2. 将角色授予某名字空间中的 “default” 服务账户
- 如果某应用没有指定 `serviceAccountName`,那么它将使用 "default" 服务账户。
+ 如果某应用没有指定 `serviceAccountName`,那么它将使用 “default” 服务账户。
{{< note >}}
"default" 服务账户所具有的权限会被授予给名字空间中所有未指定
@@ -1874,20 +2146,20 @@ In order from most secure to least secure, the approaches are:
To allow those add-ons to run with super-user access, grant cluster-admin
permissions to the "default" service account in the `kube-system` namespace.
- {{< note >}}
+ {{< caution >}}
Enabling this means the `kube-system` namespace contains Secrets
- that grant super-user access to the API.
- {{< /note >}}
+ that grant super-user access to your cluster's API.
+ {{< /caution >}}
-->
- 许多[插件组件](/zh/docs/concepts/cluster-administration/addons/) 在 `kube-system`
- 名字空间以 "default" 服务账户运行。
+ 许多[插件组件](/zh/docs/concepts/cluster-administration/addons/)在 `kube-system`
+ 名字空间以 “default” 服务账户运行。
要允许这些插件组件以超级用户权限运行,需要将集群的 `cluster-admin` 权限授予
- `kube-system` 名字空间中的 "default" 服务账户。
+ `kube-system` 名字空间中的 “default” 服务账户。
- {{< note >}}
- 启用这一配置意味着在 `kube-system` 名字空间中包含以超级用户账号来访问 API
+ {{< caution >}}
+ 启用这一配置意味着在 `kube-system` 名字空间中包含以超级用户账号来访问集群 API
的 Secrets。
- {{< /note >}}
+ {{< /caution >}}
```shell
kubectl create clusterrolebinding add-on-cluster-admin \
@@ -1907,7 +2179,7 @@ In order from most secure to least secure, the approaches are:
如果你想要名字空间中所有应用都具有某角色,无论它们使用的什么服务账户,
可以将角色授予该名字空间的服务账户组。
- 例如,在名字空间 "my-namespace" 中的只读权限授予该名字空间中的所有服务账户:
+ 例如,在名字空间 “my-namespace” 中的只读权限授予该名字空间中的所有服务账户:
```shell
kubectl create rolebinding serviceaccounts-view \
@@ -1949,7 +2221,7 @@ In order from most secure to least secure, the approaches are:
-->
5. 授予超级用户访问权限给集群范围内的所有服务帐户(强烈不鼓励)
- 如果你不关心如何区分权限,你可以将超级用户访问权限授予所有服务账户。
+ 如果你不在乎如何区分权限,你可以将超级用户访问权限授予所有服务账户。
{{< warning >}}
这样做会允许所有应用都对你的集群拥有完全的访问权限,并将允许所有能够读取
@@ -1978,19 +2250,16 @@ guidance for restricting this access in existing clusters.
If you want new clusters to retain this level of access in the aggregated roles,
you can create the following ClusterRole:
-
-{{< codenew file="access/endpoints-aggregated.yaml" >}}
-->
## Endpoints 写权限 {#write-access-for-endpoints}
在 Kubernetes v1.22 之前版本创建的集群里,
-"edit" 和 "admin" 聚合角色包含对 Endpoints 的写权限。
+“edit” 和 “admin” 聚合角色包含对 Endpoints 的写权限。
作为 [CVE-2021-25740](https://github.com/kubernetes/kubernetes/issues/103675) 的缓解措施,
此访问权限不包含在 Kubernetes 1.22 以及更高版本集群的聚合角色里。
升级到 Kubernetes v1.22 版本的现有集群不会包括此变化。
-[CVE 公告](https://github.com/kubernetes/kubernetes/issues/103675)
-包含了在现有集群里限制此访问权限的指引。
+[CVE 公告](https://github.com/kubernetes/kubernetes/issues/103675)包含了在现有集群里限制此访问权限的指引。
如果你希望在新集群的聚合角色里保留此访问权限,你可以创建下面的 ClusterRole:
@@ -2010,7 +2279,7 @@ and controllers, but grant *no permissions* to service accounts outside the `kub
While far more secure, this can be disruptive to existing workloads expecting to automatically receive API permissions.
Here are two approaches for managing this transition:
-->
-## 从 ABAC 升级
+## 从 ABAC 升级 {#upgrading-from-abac}
原来运行较老版本 Kubernetes 的集群通常会使用限制宽松的 ABAC 策略,
包括授予所有服务帐户全权访问 API 的能力。
@@ -2023,19 +2292,19 @@ Here are two approaches for managing this transition:
这里有两种方法来完成这种转换:
### 并行鉴权 {#parallel-authorizers}
-同时运行 RBAC 和 ABAC 鉴权模式, 并指定包含
+同时运行 RBAC 和 ABAC 鉴权模式,并指定包含
[现有的 ABAC 策略](/zh/docs/reference/access-authn-authz/abac/#policy-file-format)
的策略文件:
```shell
---authorization-mode=RBAC,ABAC --authorization-policy-file=mypolicy.json
+--authorization-mode=...,RBAC,ABAC --authorization-policy-file=mypolicy.json
```
-如果 API 服务器启动时,RBAC 组件的日志级别为 5 或更高(`--vmodule=rbac*=5` 或 `--v=5`),
-你可以在 API 服务器的日志中看到 RBAC 的细节 (前缀 `RBAC:`)
+如果 kube-apiserver 启动时,RBAC 组件的日志级别为 5 或更高(`--vmodule=rbac*=5` 或 `--v=5`),
+你可以在 API 服务器的日志中看到 RBAC 拒绝的细节(前缀 `RBAC`)
你可以使用这些信息来确定需要将哪些角色授予哪些用户、组或服务帐户。
-一旦你[将角色授予服务账户](#service-account-permissions) ,工作负载运行时
-在服务器日志中没有出现 RBAC 拒绝消息,就可以删除 ABAC 鉴权器。
+一旦你[将角色授予服务账户](#service-account-permissions)且工作负载运行时,
+服务器日志中没有出现 RBAC 拒绝消息,就可以删除 ABAC 鉴权器。
### 宽松的 RBAC 权限 {#permissive-rbac-permissions}
-你可以使用 RBAC 角色绑定在多个场合使用宽松的策略。
+你可以使用 RBAC 角色绑定复制宽松的 ABAC 策略。
{{< warning >}}
在你完成到 RBAC 的迁移后,应该调整集群的访问控制,确保相关的策略满足你的信息安全需求。
-
diff --git a/content/zh/docs/reference/access-authn-authz/service-accounts-admin.md b/content/zh-cn/docs/reference/access-authn-authz/service-accounts-admin.md
similarity index 100%
rename from content/zh/docs/reference/access-authn-authz/service-accounts-admin.md
rename to content/zh-cn/docs/reference/access-authn-authz/service-accounts-admin.md
diff --git a/content/zh/docs/reference/access-authn-authz/webhook.md b/content/zh-cn/docs/reference/access-authn-authz/webhook.md
similarity index 83%
rename from content/zh/docs/reference/access-authn-authz/webhook.md
rename to content/zh-cn/docs/reference/access-authn-authz/webhook.md
index 0ef1e6a18d..29032a7353 100644
--- a/content/zh/docs/reference/access-authn-authz/webhook.md
+++ b/content/zh-cn/docs/reference/access-authn-authz/webhook.md
@@ -1,15 +1,9 @@
---
-reviewers:
-- erictune
-- lavalamp
-- deads2k
-- liggitt
title: Webhook 模式
content_type: concept
weight: 95
---
@@ -38,7 +31,7 @@ service when determining user privileges.
-## 配置文件格式
+## 配置文件格式 {#configuration-file-format}
-配置文件的格式使用 [kubeconfig](/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)。在文件中,"users" 代表着 API 服务器的 webhook,而 "cluster" 代表着远程服务。
+配置文件的格式使用 [kubeconfig](/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)。
+在该文件中,“users” 代表着 API 服务器的 webhook,而 “cluster” 代表着远程服务。
-## 请求载荷
+## 请求载荷 {#request-payloads}
-在做认证决策时,API 服务器会 POST 一个 JSON 序列化的 `authorization.k8s.io/v1beta1` `SubjectAccessReview` 对象来描述这个动作。这个对象包含了描述用户请求的字段,同时也包含了需要被访问资源或请求特征的具体信息。
+在做认证决策时,API 服务器会 POST 一个 JSON 序列化的 `authorization.k8s.io/v1beta1` `SubjectAccessReview`
+对象来描述这个动作。这个对象包含了描述用户请求的字段,同时也包含了需要被访问资源或请求特征的具体信息。
-需要注意的是 webhook API 对象与其他 Kubernetes API 对象一样都同样都服从[版本兼容规则](/zh/docs/concepts/overview/kubernetes-api/)。实施人员应该了解 beta 对象的更宽松的兼容性承诺,同时确认请求的 "apiVersion" 字段能被正确地反序列化。此外,API 服务器还必须启用 `authorization.k8s.io/v1beta1` API 扩展组 (`--runtime-config=authorization.k8s.io/v1beta1=true`)。
+需要注意的是 webhook API 对象与其他 Kubernetes API 对象一样都同样都遵从[版本兼容规则](/zh/docs/concepts/overview/kubernetes-api/)。
+实施人员应该了解 beta 对象的更宽松的兼容性承诺,同时确认请求的 "apiVersion" 字段能被正确地反序列化。
+此外,API 服务器还必须启用 `authorization.k8s.io/v1beta1` API 扩展组 (`--runtime-config=authorization.k8s.io/v1beta1=true`)。
期待远程服务填充请求的 `status` 字段并响应允许或禁止访问。响应主体的 `spec` 字段被忽略,可以省略。允许的响应将返回:
+
```json
{
"apiVersion": "authorization.k8s.io/v1beta1",
@@ -195,7 +193,8 @@ authorizers are configured, they are given a chance to allow the request.
If there are no other authorizers, or none of them allow the request, the
request is forbidden. The webhook would return:
-->
-在大多数情况下,第一种方法是首选方法,它指示授权 webhook 不允许或对请求"无意见",但是,如果配置了其他授权者,则可以给他们机会允许请求。如果没有其他授权者,或者没有一个授权者,则该请求被禁止。webhook 将返回:
+在大多数情况下,第一种方法是首选方法,它指示授权 webhook 不允许或对请求 “无意见”。
+但是,如果配置了其他授权者,则可以给他们机会允许请求。如果没有其他授权者,或者没有一个授权者,则该请求被禁止。webhook 将返回:
```json
{
@@ -214,7 +213,7 @@ configured authorizers. This should only be used by webhooks that have
detailed knowledge of the full authorizer configuration of the cluster.
The webhook would return:
-->
-第二种方法立即拒绝其他配置的授权者进行短路评估。仅应由对集群的完整授权者配置有详细了解的 webhook 使用。webhook 将返回:
+第二种方法立即拒绝其他配置的授权者进行短路评估。仅应由对集群的完整授权者配置有详细了解的 webhook 使用。webhook 将返回:
```json
{
@@ -252,16 +251,16 @@ Access to non-resource paths are sent as:
```
-非资源类的路径包括:`/api`, `/apis`, `/metrics`, `/resetMetrics`,
-`/logs`, `/debug`, `/healthz`, `/swagger-ui/`, `/swaggerapi/`, `/ui`, 和
-`/version`。客户端需要访问 `/api`, `/api/*`, `/apis`, `/apis/*`, 和 `/version` 以便
+非资源类的路径包括:`/api`、`/apis`、`/metrics`、`/logs`、`/debug`、
+`/healthz`、`/livez`、`/openapi/v2`、`/readyz`、和 `/version`。
+客户端需要访问 `/api`、`/api/*`、`/apis`、`/apis/*` 和 `/version` 以便
能发现服务器上有什么资源和版本。对于其他非资源类的路径访问在没有 REST API 访问限制的情况下拒绝。
- `CSIVolumeFSGroupPolicy`:允许 CSIDrivers 使用 `fsGroupPolicy` 字段.
该字段能控制由 CSIDriver 创建的卷在挂载这些卷时是否支持卷所有权和权限修改。
@@ -1003,10 +1044,13 @@ Each feature gate is designed for enabling/disabling a specific feature:
- `ConfigurableFSGroupPolicy`:在 Pod 中挂载卷时,允许用户为 fsGroup
配置卷访问权限和属主变更策略。请参见
[为 Pod 配置卷访问权限和属主变更策略](/zh/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods)。
+- `ContextualLogging`:当你启用这个特性门控,支持日志上下文记录的 Kubernetes
+ 组件会为日志输出添加额外的详细内容。
- `ControllerManagerLeaderMigration`:为 `kube-controller-manager` 和 `cloud-controller-manager`
开启领导者迁移功能。
- `CronJobControllerV2`:使用 {{< glossary_tooltip text="CronJob" term_id="cronjob" >}}
控制器的一种替代实现。否则,系统会选择同一控制器的 v1 版本。
+- `CronJobTimeZone`:允许在 [CronJobs](/zh/docs/concepts/workloads/controllers/cron-jobs/) 中使用 `timeZone` 可选字段。
-- `DynamicKubeletConfig`:启用 kubelet 的动态配置。请参阅
- [重新配置 kubelet](/zh/docs/tasks/administer-cluster/reconfigure-kubelet/)。
+- `DynamicKubeletConfig`:启用 kubelet 的动态配置。
+ 除偏差策略场景外,不再支持该功能。该特性门控在 kubelet 1.24 版本中已被移除。
+ 请参阅[重新配置 kubelet](/zh/docs/tasks/administer-cluster/reconfigure-kubelet/)。
- `DynamicProvisioningScheduling`:扩展默认调度器以了解卷拓扑并处理 PV 配置。
此特性已在 v1.12 中完全被 `VolumeScheduling` 特性取代。
- `DynamicVolumeProvisioning`:启用持久化卷到 Pod
@@ -1221,6 +1267,9 @@ Each feature gate is designed for enabling/disabling a specific feature:
when shutting down a node gracefully.
- `GRPCContainerProbe`: Enables the gRPC probe method for {Liveness,Readiness,Startup}Probe. See [Configure Liveness, Readiness and Startup Probes](/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-grpc-liveness-probe).
- `HonorPVReclaimPolicy`: Honor persistent volume reclaim policy when it is `Delete` irrespective of PV-PVC deletion ordering.
+For more details, check the
+ [PersistentVolume deletion protection finalizer](/docs/concepts/storage/persistent-volumes/#persistentvolume-deletion-protection-finalizer)
+ documentation.
-->
- `GracefulNodeShutdownBasedOnPodPriority`:允许 kubelet 在体面终止节点时检查
Pod 的优先级。
@@ -1228,6 +1277,7 @@ Each feature gate is designed for enabling/disabling a specific feature:
参阅[配置活跃态、就绪态和启动探针](/zh/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-grpc-liveness-probe)。
- `HonorPVReclaimPolicy`:无论 PV 和 PVC 的删除顺序如何,当持久卷申领的策略为 `Delete`
时,确保这种策略得到处理。
+ 更多详细信息,请参阅 [PersistentVolume 删除保护 finalizer](/zh/docs/concepts/storage/persistent-volumes/#persistentvolume-deletion-protection-finalizer)文档。
- `KubeletPodResources`:启用 kubelet 上 Pod 资源 GRPC 端点。更多详细信息,
请参见[支持设备监控](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/compute-device-assignment.md)。
@@ -1370,6 +1422,8 @@ Each feature gate is designed for enabling/disabling a specific feature:
- `LegacyNodeRoleBehavior`:禁用此门控时,服务负载均衡器中和节点干扰中的原先行为会忽略
`node-role.kubernetes.io/master` 标签,使用 `NodeDisruptionExclusion` 和
`ServiceNodeExclusion` 对应特性所提供的标签。
+- `LegacyServiceAccountTokenNoAutoGeneration`:停止基于 Secret 的自动生成
+ [服务账号令牌](/zh/docs/reference/access-authn-authz/authentication/#service-account-tokens).
- `LogarithmicScaleDown`:启用 Pod 的半随机(semi-random)选择,控制器将根据 Pod
时间戳的对数桶按比例缩小去驱逐 Pod。
-- `MemoryManager`: 允许基于 NUMA 拓扑为容器设置内存亲和性。
-- `MemoryQoS`: 使用 cgroup v2 内存控制器在 pod / 容器上启用内存保护和使用限制。
+- `MaxUnavailableStatefulSet`:启用为 StatefulSet
+ 的[滚动更新策略](/zh/docs/concepts/workloads/controllers/statefulset/#rolling-updates)设置
+ `maxUnavailable` 字段。该字段指定更新过程中不可用 Pod 个数的上限。
+- `MemoryManager`:允许基于 NUMA 拓扑为容器设置内存亲和性。
+- `MemoryQoS`:使用 cgroup v2 内存控制器在 pod / 容器上启用内存保护和使用限制。
+- `MinDomainsInPodTopologySpread`:启用 Pod 的 `minDomains`
+ [拓扑分布约束](/zh/docs/concepts/workloads/pods/pod-topology-spread-constraints/).
- `MixedProtocolLBService`:允许在同一 `LoadBalancer` 类型的 Service 实例中使用不同的协议。
- `MountContainers`:允许使用主机上的工具容器作为卷挂载程序。
+- `NodeOutOfServiceVolumeDetach`:当使用 `node.kubernetes.io/out-of-service`
+ 污点将节点标记为停止服务时,节点上不能容忍这个污点的 Pod 将被强制删除,
+ 并且该在节点上被终止的 Pod 将立即进行卷分离操作。
- `NodeSwap`: 启用 kubelet 为节点上的 Kubernetes 工作负载分配交换内存的能力。
必须将 `KubeletConfiguration.failSwapOn` 设置为 false 的情况下才能使用。
更多详细信息,请参见[交换内存](/zh/docs/concepts/architecture/nodes/#swap-memory)。
@@ -1524,8 +1600,10 @@ Each feature gate is designed for enabling/disabling a specific feature:
- `RemainingItemCount`: Allow the API servers to show a count of remaining
items in the response to a
[chunking list request](/docs/reference/using-api/api-concepts/#retrieving-large-results-sets-in-chunks).
-- `RemoveSelfLink`: Deprecates and removes `selfLink` from ObjectMeta and
- ListMeta.
+- `RemoveSelfLink`: Sets the `.metadata.selfLink` field to blank (empty string) for all
+ objects and collections. This field has been deprecated since the Kubernetes v1.16
+ release. When this feature is enabled, the `.metadata.selfLink` field remains part of
+ the Kubernetes API, but is always unset.
- `RequestManagement`: Enables managing request concurrency with prioritization and fairness
at each API server. Deprecated by `APIPriorityAndFairness` since 1.17.
-->
@@ -1535,7 +1613,9 @@ Each feature gate is designed for enabling/disabling a specific feature:
- `RemainingItemCount`:允许 API 服务器在
[分块列表请求](/zh/docs/reference/using-api/api-concepts/#retrieving-large-results-sets-in-chunks)
的响应中显示剩余条目的个数。
-- `RemoveSelfLink`:将 ObjectMeta 和 ListMeta 中的 `selfLink` 字段废弃并删除。
+- `RemoveSelfLink`:将所有对象和集合的 `.metadata.selfLink` 字段设置为空(空字符串)。
+ 该字段自 Kubernetes v1.16 版本以来已被弃用。
+ 启用此功能后,`.metadata.selfLink` 字段仍然是 Kubernetes API 的一部分,但始终未设置。
- `RequestManagement`:允许在每个 API 服务器上通过优先级和公平性管理请求并发性。
自 1.17 以来已被 `APIPriorityAndFairness` 替代。
- `RotateKubeletClientCertificate`:在 kubelet 上启用客户端 TLS 证书的轮换。
更多详细信息,请参见
- [kubelet 配置](/zh/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/#kubelet-configuration)。
+ [kubelet 配置](/zh/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/#kubelet-configuration)。
- `RotateKubeletServerCertificate`:在 kubelet 上启用服务器 TLS 证书的轮换。
更多详细信息,请参见
- [kubelet 配置](/zh/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/#kubelet-configuration)。
+ [kubelet 配置](/zh/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/#kubelet-configuration)。
- `RunAsGroup`:启用对容器初始化过程中设置的主要组 ID 的控制。
- `ServiceLoadBalancerClass`: 为服务启用 `loadBalancerClass` 字段。
有关更多信息,请参见[指定负载均衡器实现类](/zh/docs/concepts/services-networking/service/#load-balancer-class)。
@@ -1636,6 +1722,9 @@ Each feature gate is designed for enabling/disabling a specific feature:
标签,则可以排除该节点。
- `ServiceTopology`:启用服务拓扑可以让一个服务基于集群的节点拓扑进行流量路由。
有关更多详细信息,请参见[服务拓扑](/zh/docs/concepts/services-networking/service-topology/)。
+- `ServiceIPStaticSubrange`:启用服务 ClusterIP 分配策略,从而细分 ClusterIP 范围。
+ 动态分配的 ClusterIP 地址将优先从较高范围分配,以低冲突风险允许用户从较低范围分配静态 ClusterIP。
+ 更多详细信息请参阅[避免冲突](/zh/docs/concepts/services-networking/service/#avoiding-collisions)
* Kubernetes 的[弃用策略](/zh/docs/reference/using-api/deprecation-policy/)
介绍了项目针对已移除特性和组件的处理方法。
-
+* 从 Kubernetes 1.24 开始,默认不启用新的 beta API。
+ 启用 beta 功能时,还需要启用所有关联的 API 资源。
+ 例如:要启用一个特定资源,如 `storage.k8s.io/v1beta1/csistoragecapacities`,
+ 请设置 `--runtime-config=storage.k8s.io/v1beta1/csistoragecapacities`。
+ 有关命令行标志的更多详细信息,请参阅 [API 版本控制](/zh/docs/reference/using-api/#api-versioning)。
diff --git a/content/zh/docs/reference/command-line-tools-reference/kube-apiserver.md b/content/zh-cn/docs/reference/command-line-tools-reference/kube-apiserver.md
similarity index 99%
rename from content/zh/docs/reference/command-line-tools-reference/kube-apiserver.md
rename to content/zh-cn/docs/reference/command-line-tools-reference/kube-apiserver.md
index ec1b496b42..26bef87ba7 100644
--- a/content/zh/docs/reference/command-line-tools-reference/kube-apiserver.md
+++ b/content/zh-cn/docs/reference/command-line-tools-reference/kube-apiserver.md
@@ -84,7 +84,7 @@ the host's default interface will be used.
The map from metric-label to value allow-list of this label. The key's format is <MetricName>,<LabelName>. The value's format is <allowed_value>,<allowed_value>...e.g. metric1,label1='v1,v2,v3', metric1,label2='v1,v2,v3' metric2,label1='v1,v2,v3'.
-->
允许使用的指标标签到指标值的映射列表。键的格式为 <MetricName>,<LabelName>.
-值的格式为 <allowed_value>,<allowed_value>...。
+值的格式为 <allowed_value>,<allowed_value>...。
例如:metric1,label1='v1,v2,v3', metric1,label2='v1,v2,v3' metric2,label1='v1,v2,v3'。
@@ -97,7 +97,7 @@ The map from metric-label to value allow-list of this label. The key's format is
-如果为 true, 将允许特权容器。[默认值=false]
+如果为 true,将允许特权容器。[默认值=false]
@@ -131,8 +131,8 @@ of these audiences. If the --service-account-issuer flag is configured
and this flag is not, this field defaults to a single element list
containing the issuer URL.
-->
-API 的标识符。
-服务帐户令牌验证者将验证针对 API 使用的令牌是否已绑定到这些受众中的至少一个。
+API 的标识符。
+服务帐户令牌验证者将验证针对 API 使用的令牌是否已绑定到这些受众中的至少一个。
如果配置了 --service-account-issuer 标志,但未配置此标志,
则此字段默认为包含发布者 URL 的单个元素列表。
@@ -799,7 +799,7 @@ CORS 允许的来源清单,以逗号分隔。
-对污点 NotReady:NoExecute 的容忍时长(以秒计)。
+对污点 NotReady:NoExecute 的容忍时长(以秒计)。
默认情况下这一容忍度会被添加到尚未具有此容忍度的每个 pod 中。
@@ -833,7 +833,7 @@ that do not have a default watch size set.
---delete-collection-workers int 默认值: 1
+--delete-collection-workers int 默认值:1
@@ -1363,10 +1363,10 @@ Max is .02 (1/50 requests); .001 (1/1000) is a recommended starting point.
-->
为防止 HTTP/2 客户端卡在单个 API 服务器上,可启用随机关闭连接(GOAWAY)。
客户端的其他运行中请求将不会受到影响,并且客户端将重新连接,
-可能会在再次通过负载平衡器后登陆到其他 API 服务器上。
-此参数设置将发送 GOAWAY 的请求的比例。
-具有单个 API 服务器或不使用负载平衡器的群集不应启用此功能。
-最小值为0(关闭),最大值为 .02(1/50 请求); 建议使用 .001(1/1000)。
+可能会在再次通过负载平衡器后登陆到其他 API 服务器上。
+此参数设置将发送 GOAWAY 的请求的比例。
+具有单个 API 服务器或不使用负载平衡器的集群不应启用此功能。
+最小值为0(关闭),最大值为 .02(1/50 请求);建议使用 .001(1/1000)。
@@ -1847,7 +1847,7 @@ open before timing it out. This is the default request timeout for
requests but may be overridden by flags such as --min-request-timeout
for specific types of requests.
-->
-可选字段,指示处理程序在超时之前必须保持打开请求的持续时间。
+可选字段,指示处理程序在超时之前必须保持打开请求的持续时间。
这是请求的默认请求超时,但对于特定类型的请求,可能会被
--min-request-timeout等标志覆盖。
@@ -2004,9 +2004,9 @@ and all are used to determine which issuers are accepted.
颁发者将在已办法令牌的 "iss" 声明中检查此标识符。
此值为字符串或 URI。
如果根据 OpenID Discovery 1.0 规范检查此选项不是有效的 URI,则即使特性门控设置为 true,
-ServiceAccountIssuerDiscovery 功能也将保持禁用状态。
-强烈建议该值符合 OpenID 规范:https://openid.net/specs/openid-connect-discovery-1_0.html。
-实践中,这意味着 service-account-issuer 取值必须是 HTTPS URL。
+ServiceAccountIssuerDiscovery 功能也将保持禁用状态。
+强烈建议该值符合 OpenID 规范: https://openid.net/specs/openid-connect-discovery-1_0.html 。
+实践中,这意味着 service-account-issuer 取值必须是 HTTPS URL。
还强烈建议此 URL 能够在 {service-account-issuer}/.well-known/openid-configuration
处提供 OpenID 发现文档。
当此值被多次指定时,第一次的值用于生成令牌,所有的值用于确定接受哪些发行人。
@@ -2209,7 +2209,7 @@ List of directives for HSTS, comma separated. If this list is empty, then HSTS d
-->
为 HSTS 所设置的指令列表,用逗号分隔。
如果此列表为空,则不会添加 HSTS 指令。
-例如: 'max-age=31536000,includeSubDomains,preload'
+例如:'max-age=31536000,includeSubDomains,preload'
@@ -2280,7 +2280,7 @@ File containing the default x509 private key matching --tls-cert-file.
---tls-sni-cert-key string 默认值: []
+--tls-sni-cert-key string 默认值:[]
diff --git a/content/zh/docs/reference/command-line-tools-reference/kube-controller-manager.md b/content/zh-cn/docs/reference/command-line-tools-reference/kube-controller-manager.md
similarity index 100%
rename from content/zh/docs/reference/command-line-tools-reference/kube-controller-manager.md
rename to content/zh-cn/docs/reference/command-line-tools-reference/kube-controller-manager.md
diff --git a/content/zh/docs/reference/command-line-tools-reference/kube-proxy.md b/content/zh-cn/docs/reference/command-line-tools-reference/kube-proxy.md
similarity index 88%
rename from content/zh/docs/reference/command-line-tools-reference/kube-proxy.md
rename to content/zh-cn/docs/reference/command-line-tools-reference/kube-proxy.md
index 2cb541d830..3484f8c4da 100644
--- a/content/zh/docs/reference/command-line-tools-reference/kube-proxy.md
+++ b/content/zh-cn/docs/reference/command-line-tools-reference/kube-proxy.md
@@ -54,31 +54,42 @@ kube-proxy [flags]
---azure-container-registry-config string
+--add_dir_header
-包含 Azure 容器仓库配置信息的文件的路径。
+如果为 true,将文件目录添加到日志消息的头部
---bind-address 0.0.0.0 默认值:0.0.0.0
+--alsologtostderr
+
+
+
+
+设置为 true 表示将日志输出到文件的同时输出到 stderr
+
+
+
+
+
+--bind-address string 默认值:0.0.0.0
-代理服务器要使用的 IP 地址(设置为 '0.0.0.0' 表示要使用所有 IPv4 接口;
-设置为 '::' 表示使用所有 IPv6 接口)。
-如果配置文件由 --config 指定,则忽略此参数。
-
-
+代理服务器的 IP 地址(所有 IPv4 接口设置为 “0.0.0.0”,所有 IPv6 接口设置为 “::”)。
+如果配置文件由 --config 指定,则忽略此参数。
+
@@ -89,20 +100,17 @@ The IP address for the proxy server to serve on (set to '0.0.0.0' for all IPv4 i
-若此标志为 true,kube-proxy 会将无法绑定端口的失败操作视为致命错误并退出。
+如果为 true,kube-proxy 会将无法绑定端口的失败操作视为致命错误并退出。
---boot-id-file string 默认值:"/proc/sys/kernel/random/boot_id"
+--boot_id_file string 默认值:"/proc/sys/kernel/random/boot_id"
-
-用来检查 Boot-ID 的文件名,用逗号隔开。
-第一个存在的文件会被使用。
+
+逗号分隔的文件列表,用于检查 boot-id。使用第一个存在的文件。
@@ -119,30 +127,6 @@ If true cleanup iptables and ipvs rules and exit.
-
---cloud-provider-gce-l7lb-src-cidrs cidrs 默认值:130.211.0.0/22,35.191.0.0/16
-
-
-
-
-此值表示,在 GCE 防火墙中打开 CIDRs 用于 L7 LB 流量代理 & 健康检查。
-
-
-
-
---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
-
-
-
-
-此值表示,在 GCE 防火墙中打开 CIDRs 用于 L4 LB 流量代理 & 健康检查。
-
-
-
--cluster-cidr string
@@ -242,32 +226,6 @@ Idle timeout for established TCP connections (0 to leave as-is)
-
---default-not-ready-toleration-seconds int 默认值:300
-
-
-
-
-对污点 NotReady:NoExecute 的容忍时长(以秒计)。
-默认情况下这一容忍度会被添加到尚未具有此容忍度的每个 pod 中。
-
-
-
-
---default-unreachable-toleration-seconds int 默认值:300
-
-
-
-
-对污点 Unreachable:NoExecute 的容忍时长(以秒计)
-默认情况下这一容忍度会被添加到尚未具有此容忍度的每个 pod 中。
-
-
-
--detect-local-mode LocalMode
@@ -283,13 +241,13 @@ Mode to use to detect local traffic. This parameter is ignored if a config file
---feature-gates <逗号分隔的 'key=True|False' 对’>
+--feature-gates <逗号分隔的 'key=True|False' 对>
-一组键=值(key=value)对,描述了 alpha/experimental 的特征。可选项有:
+一组键=值(key=value)对,描述了 alpha/experimental 的特征。可选项有:
APIListChunking=true|false (BETA - 默认值=true)
APIPriorityAndFairness=true|false (BETA - 默认值=true)
APIResponseCompression=true|false (BETA - 默认值=true)
@@ -415,7 +372,6 @@ CSIMigrationPortworx=true|false (ALPHA - 默认值=false)
CSIMigrationRBD=true|false (ALPHA - 默认值=false)
CSIMigrationvSphere=true|false (BETA - 默认值=false)
CSIVolumeHealth=true|false (ALPHA - 默认值=false)
-ContextualLogging=true|false (ALPHA - 默认值=false)
CronJobTimeZone=true|false (ALPHA - 默认值=false)
CustomCPUCFSQuotaPeriod=true|false (ALPHA - 默认值=false)
CustomResourceValidationExpressions=true|false (ALPHA - 默认值=false)
@@ -739,18 +695,60 @@ Path to kubeconfig file with authorization information (the master location is s
---machine-id-file string 默认值:"/etc/machine-id,/var/lib/dbus/machine-id"
+--log_backtrace_at <“file:N” 格式的字符串> 默认值:0
-用来检查 Machine-ID 的文件列表,用逗号分隔。
-使用找到的第一个文件。
+当日志命中 file:N,触发一次堆栈追踪
+
+--log_dir string
+
+
+
+
+如果非空,则在此目录中写入日志文件
+
+
+
+
+--log_file string
+
+
+
+
+如果非空,使用此日志文件
+
+
+
+
+--log_file_max_size uint 默认值:1800
+
+
+
+
+定义日志文件可以增长到的最大大小。单位是兆字节。
+如果值为 0,则最大文件大小不受限制。
+
+
+
+
+--logtostderr 默认值:true
+
+
+
+
+
+日志输出到 stderr 而不是文件。
+
+
+
+
--machine_id_file string 默认值:"/etc/machine-id,/var/lib/dbus/machine-id"
@@ -823,6 +821,16 @@ A string slice of values which specify the addresses to use for NodePorts. Value
+
+--one_output
+
+
+
+
+如果为 true,则仅将日志写入本地的严重性级别(而不是写入每个较低的严重性级别)
+
+
+
--oom-score-adj int32 默认值:-999
@@ -928,6 +936,36 @@ The previous version for which you want to show hidden metrics. Only the previou
+
+--skip_headers
+
+
+
+
+如果为 true,则避免在日志消息中使用头部前缀
+
+
+
+
+--skip_log_headers
+
+
+
+
+如果为 true,则在打开日志文件时避免使用头部
+
+
+
+
+--stderrthreshold int 默认值:2
+
+
+
+
+设置严重程度达到或超过此阈值的日志输出到标准错误输出。
+
+
+
--udp-timeout duration 默认值:250ms
@@ -942,6 +980,16 @@ How long an idle UDP connection will be kept open (e.g. '250ms', '2s'). Must be
+
+-v, --v int
+
+
+
+
+设置日志级别详细程度的数值。
+
+
+
--version version[=true]
@@ -955,6 +1003,16 @@ Print version information and quit
+
+--vmodule <逗号分割的 “pattern=N” 设置>
+
+
+
+
+以逗号分割的 pattern=N 设置的列表,用于文件过滤日志
+
+
+
--write-config-to string
diff --git a/content/zh/docs/reference/command-line-tools-reference/kube-scheduler.md b/content/zh-cn/docs/reference/command-line-tools-reference/kube-scheduler.md
similarity index 81%
rename from content/zh/docs/reference/command-line-tools-reference/kube-scheduler.md
rename to content/zh-cn/docs/reference/command-line-tools-reference/kube-scheduler.md
index 0da24c1f84..28fb4f2a61 100644
--- a/content/zh/docs/reference/command-line-tools-reference/kube-scheduler.md
+++ b/content/zh-cn/docs/reference/command-line-tools-reference/kube-scheduler.md
@@ -2,7 +2,6 @@
title: kube-scheduler
content_type: tool-reference
weight: 30
-auto_generated: true
---
Kubernetes 调度器是一个控制面进程,负责将 Pods 指派到节点上。
调度器基于约束和可用资源为调度队列中每个 Pod 确定其可合法放置的节点。
调度器之后对所有合法的节点进行排序,将 Pod 绑定到一个合适的节点。
在同一个集群中可以使用多个不同的调度器;kube-scheduler 是其参考实现。
-参阅[调度](zh/docs/concepts/scheduling-eviction/)
-以获得关于调度和 kube-scheduler 组件的更多信息。
+参阅[调度](/zh/docs/concepts/scheduling-eviction/)以获得关于调度和
+kube-scheduler 组件的更多信息。
```
kube-scheduler [flags]
@@ -47,14 +46,14 @@ kube-scheduler [flags]
--allow-metric-labels stringToString
-默认值: []
+默认值:[]
-这个键值映射表设置 度量标签 所允许设置的值。
+这个键值映射表设置度量标签所允许设置的值。
其中键的格式是 <MetricName>,<LabelName>。
值的格式是 <allowed_value>,<allowed_value>。
例如:metric1,label1='v1,v2,v3', metric1,label2='v1,v2,v3' metric2,label1='v1,v2,v3'。
@@ -120,7 +119,7 @@ If true, failures to look up missing authentication configuration from the clust
-在授权过程中跳过的 HTTP 路径列表,即在不联系 'core' kubernetes 服务器的情况下被授权的 HTTP 路径。
+在授权过程中跳过的 HTTP 路径列表,即在不联系 “core” kubernetes 服务器的情况下被授权的 HTTP 路径。
@@ -146,7 +145,7 @@ Kubernetes 核心服务器的 kubeconfig 文件。这是可选的。
-缓存来自 Webhook 授权者的 'authorized' 响应的持续时间。
+缓存来自 Webhook 授权者的 “authorized” 响应的持续时间。
@@ -158,7 +157,7 @@ The duration to cache 'authorized' responses from the webhook authorizer.
-缓存来自 Webhook 授权者的 'unauthorized' 响应的持续时间。
+缓存来自 Webhook 授权者的 “unauthorized” 响应的持续时间。
@@ -184,7 +183,7 @@ The IP address on which to listen for the --secure-port port. The associated int
-->
监听 --secure-port 端口的 IP 地址。
集群的其余部分以及 CLI/ Web 客户端必须可以访问关联的接口。
-如果为空,将使用所有接口(0.0.0.0 表示使用所有 IPv4 接口,"::" 表示使用所有 IPv6 接口)。
+如果为空,将使用所有接口(0.0.0.0 表示使用所有 IPv4 接口,“::” 表示使用所有 IPv6 接口)。
如果为空或未指定地址 (0.0.0.0 或 ::),所有接口将被使用。
@@ -228,7 +227,7 @@ The path to the configuration file.
---contention-profiling 默认值: true
+--contention-profiling 默认值:true
@@ -363,123 +362,106 @@ WinOverlay=true|false (BETA - default=true)
WindowsHostProcessContainers=true|false (BETA - default=true)
-->
一组 key=value 对,描述了 alpha/experimental 特征开关。选项包括:
-A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
-APIListChunking=true|false (BETA - 默认值=true)
-APIPriorityAndFairness=true|false (BETA - 默认值=true)
-APIResponseCompression=true|false (BETA - 默认值=true)
-APIServerIdentity=true|false (ALPHA - 默认值=false)
-APIServerTracing=true|false (ALPHA - 默认值=false)
-AllAlpha=true|false (ALPHA - 默认值=false)
-AllBeta=true|false (BETA - 默认值=false)
-AnyVolumeDataSource=true|false (BETA - 默认值=true)
-AppArmor=true|false (BETA - 默认值=true)
-CPUManager=true|false (BETA - 默认值=true)
-CPUManagerPolicyAlphaOptions=true|false (ALPHA - 默认值=false)
-CPUManagerPolicyBetaOptions=true|false (BETA - 默认值=true)
-CPUManagerPolicyOptions=true|false (BETA - 默认值=true)
-CSIInlineVolume=true|false (BETA - 默认值=true)
-CSIMigration=true|false (BETA - 默认值=true)
-CSIMigrationAWS=true|false (BETA - 默认值=false)
-CSIMigrationAzureFile=true|false (BETA - 默认值=false)
-CSIMigrationGCE=true|false (BETA - 默认值=true)
-CSIMigrationPortworx=true|false (ALPHA - 默认值=false)
-CSIMigrationRBD=true|false (ALPHA - 默认值=false)
-CSIMigrationvSphere=true|false (BETA - 默认值=false)
-CSIVolumeHealth=true|false (ALPHA - 默认值=false)
-ContextualLogging=true|false (ALPHA - 默认值=false)
-CronJobTimeZone=true|false (ALPHA - 默认值=false)
-CustomCPUCFSQuotaPeriod=true|false (ALPHA - 默认值=false)
-CustomResourceValidationExpressions=true|false (ALPHA - 默认值=false)
-DaemonSetUpdateSurge=true|false (BETA - 默认值=true)
-DelegateFSGroupToCSIDriver=true|false (BETA - 默认值=true)
-DevicePlugins=true|false (BETA - 默认值=true)
-DisableAcceleratorUsageMetrics=true|false (BETA - 默认值=true)
-DisableCloudProviders=true|false (ALPHA - 默认值=false)
-DisableKubeletCloudCredentialProviders=true|false (ALPHA - 默认值=false)
-DownwardAPIHugePages=true|false (BETA - 默认值=true)
-EndpointSliceTerminatingCondition=true|false (BETA - 默认值=true)
-EphemeralContainers=true|false (BETA - 默认值=true)
-ExpandedDNSConfig=true|false (ALPHA - 默认值=false)
-ExperimentalHostUserNamespace默认值ing=true|false (BETA - 默认值=false)
-GRPCContainerProbe=true|false (BETA - 默认值=true)
-GracefulNodeShutdown=true|false (BETA - 默认值=true)
-GracefulNodeShutdownBasedOnPodPriority=true|false (BETA - 默认值=true)
-HPAContainerMetrics=true|false (ALPHA - 默认值=false)
-HPAScaleToZero=true|false (ALPHA - 默认值=false)
-HonorPVReclaimPolicy=true|false (ALPHA - 默认值=false)
-IdentifyPodOS=true|false (BETA - 默认值=true)
-InTreePluginAWSUnregister=true|false (ALPHA - 默认值=false)
-InTreePluginAzureDiskUnregister=true|false (ALPHA - 默认值=false)
-InTreePluginAzureFileUnregister=true|false (ALPHA - 默认值=false)
-InTreePluginGCEUnregister=true|false (ALPHA - 默认值=false)
-InTreePluginOpenStackUnregister=true|false (ALPHA - 默认值=false)
-InTreePluginPortworxUnregister=true|false (ALPHA - 默认值=false)
-InTreePluginRBDUnregister=true|false (ALPHA - 默认值=false)
-InTreePluginvSphereUnregister=true|false (ALPHA - 默认值=false)
-obMutableNodeSchedulingDirectives=true|false (BETA - 默认值=true)
-JobReadyPods=true|false (BETA - 默认值=true)
-JobTrackingWithFinalizers=true|false (BETA - 默认值=false)
-KubeletCredentialProviders=true|false (BETA - 默认值=true)
-KubeletInUserNamespace=true|false (ALPHA - 默认值=false)
-KubeletPodResources=true|false (BETA - 默认值=true)
-KubeletPodResourcesGetAllocatable=true|false (BETA - 默认值=true)
-LegacyServiceAccountTokenNoAutoGeneration=true|false (BETA - 默认值=true)
-LocalStorageCapacityIsolation=true|false (BETA - 默认值=true)
-LocalStorageCapacityIsolationFSQuotaMonitoring=true|false (ALPHA - 默认值=false)
-LogarithmicScaleDown=true|false (BETA - 默认值=true)
-MaxUnavailableStatefulSet=true|false (ALPHA - 默认值=false)
-MemoryManager=true|false (BETA - 默认值=true)
-MemoryQoS=true|false (ALPHA - 默认值=false)
-MinDomainsInPodTopologySpread=true|false (ALPHA - 默认值=false)
-MixedProtocolLBService=true|false (BETA - 默认值=true)
-NetworkPolicyEndPort=true|false (BETA - 默认值=true)
-NetworkPolicyStatus=true|false (ALPHA - 默认值=false)
-NodeOutOfServiceVolumeDetach=true|false (ALPHA - 默认值=false)
-NodeSwap=true|false (ALPHA - 默认值=false)
-OpenAPIEnums=true|false (BETA - 默认值=true)
-OpenAPIV3=true|false (BETA - 默认值=true)
-PodAndContainerStatsFromCRI=true|false (ALPHA - 默认值=false)
-PodDeletionCost=true|false (BETA - 默认值=true)
-PodSecurity=true|false (BETA - 默认值=true)
-ProbeTerminationGracePeriod=true|false (BETA - 默认值=false)
-ProcMountType=true|false (ALPHA - 默认值=false)
-ProxyTerminatingEndpoints=true|false (ALPHA - 默认值=false)
-QOSReserved=true|false (ALPHA - 默认值=false)
-ReadWriteOncePod=true|false (ALPHA - 默认值=false)
-RecoverVolumeExpansionFailure=true|false (ALPHA - 默认值=false)
-RemainingItemCount=true|false (BETA - 默认值=true)
-RotateKubeletServerCertificate=true|false (BETA - 默认值=true)
-Seccomp默认值=true|false (ALPHA - 默认值=false)
-ServerSideFieldValidation=true|false (ALPHA - 默认值=false)
-ServiceIPStaticSubrange=true|false (ALPHA - 默认值=false)
-ServiceInternalTrafficPolicy=true|false (BETA - 默认值=true)
-SizeMemoryBackedVolumes=true|false (BETA - 默认值=true)
-StatefulSetAutoDeletePVC=true|false (ALPHA - 默认值=false)
-StatefulSetMinReadySeconds=true|false (BETA - 默认值=true)
-StorageVersionAPI=true|false (ALPHA - 默认值=false)
-StorageVersionHash=true|false (BETA - 默认值=true)
-TopologyAwareHints=true|false (BETA - 默认值=true)
-TopologyManager=true|false (BETA - 默认值=true)
-VolumeCapacityPriority=true|false (ALPHA - 默认值=false)
-WinDSR=true|false (ALPHA - 默认值=false)
-WinOverlay=true|false (BETA - 默认值=true)
-WindowsHostProcessContainers=true|false (BETA - 默认值=true)
-
-
-
-
---hard-pod-affinity-symmetric-weight int32 默认值:1
-
-
-
-
-已弃用: RequiredDuringScheduling 亲和性是不对称的,但是存在与每个
-RequiredDuringScheduling 关联性规则相对应的隐式 PreferredDuringScheduling 关联性规则。
---hard-pod-affinity-symmetric-weight 代表隐式 PreferredDuringScheduling
-关联性规则的权重。权重必须在 0-100 范围内。
-如果 --config 指定了一个配置文件,那么这个参数将被忽略。
+APIListChunking=true|false (BETA - 默认值为 true)
+APIPriorityAndFairness=true|false (BETA - 默认值为 true)
+APIResponseCompression=true|false (BETA - 默认值为 true)
+APIServerIdentity=true|false (ALPHA - 默认值为 false)
+APIServerTracing=true|false (ALPHA - 默认值为 false)
+AllAlpha=true|false (ALPHA - 默认值为 false)
+AllBeta=true|false (BETA - 默认值为 false)
+AnyVolumeDataSource=true|false (BETA - 默认值为 true)
+AppArmor=true|false (BETA - 默认值为 true)
+CPUManager=true|false (BETA - 默认值为 true)
+CPUManagerPolicyAlphaOptions=true|false (ALPHA - 默认值为 false)
+CPUManagerPolicyBetaOptions=true|false (BETA - 默认值为 true)
+CPUManagerPolicyOptions=true|false (BETA - 默认值为 true)
+CSIInlineVolume=true|false (BETA - 默认值为 true)
+CSIMigration=true|false (BETA - 默认值为 true)
+CSIMigrationAWS=true|false (BETA - 默认值为 false)
+CSIMigrationAzureFile=true|false (BETA - 默认值为 false)
+CSIMigrationGCE=true|false (BETA - 默认值为 true)
+CSIMigrationPortworx=true|false (ALPHA - 默认值为 false)
+CSIMigrationRBD=true|false (ALPHA - 默认值为 false)
+CSIMigrationvSphere=true|false (BETA - 默认值为 false)
+CSIVolumeHealth=true|false (ALPHA - 默认值为 false)
+ContextualLogging=true|false (ALPHA - 默认值为 false)
+CronJobTimeZone=true|false (ALPHA - 默认值为 false)
+CustomCPUCFSQuotaPeriod=true|false (ALPHA - 默认值为 false)
+CustomResourceValidationExpressions=true|false (ALPHA - 默认值为 false)
+DaemonSetUpdateSurge=true|false (BETA - 默认值为 true)
+DelegateFSGroupToCSIDriver=true|false (BETA - 默认值为 true)
+DevicePlugins=true|false (BETA - 默认值为 true)
+DisableAcceleratorUsageMetrics=true|false (BETA - 默认值为 true)
+DisableCloudProviders=true|false (ALPHA - 默认值为 false)
+DisableKubeletCloudCredentialProviders=true|false (ALPHA - 默认值为 false)
+DownwardAPIHugePages=true|false (BETA - 默认值为 true)
+EndpointSliceTerminatingCondition=true|false (BETA - 默认值为 true)
+EphemeralContainers=true|false (BETA - 默认值为 true)
+ExpandedDNSConfig=true|false (ALPHA - 默认值为 false)
+ExperimentalHostUserNamespaceDefaulting=true|false (BETA - 默认值为 false)
+GRPCContainerProbe=true|false (BETA - 默认值为 true)
+GracefulNodeShutdown=true|false (BETA - 默认值为 true)
+GracefulNodeShutdownBasedOnPodPriority=true|false (BETA - 默认值为 true)
+HPAContainerMetrics=true|false (ALPHA - 默认值为 false)
+HPAScaleToZero=true|false (ALPHA - 默认值为 false)
+HonorPVReclaimPolicy=true|false (ALPHA - 默认值为 false)
+IdentifyPodOS=true|false (BETA - 默认值为 true)
+InTreePluginAWSUnregister=true|false (ALPHA - 默认值为 false)
+InTreePluginAzureDiskUnregister=true|false (ALPHA - 默认值为 false)
+InTreePluginAzureFileUnregister=true|false (ALPHA - 默认值为 false)
+InTreePluginGCEUnregister=true|false (ALPHA - 默认值为 false)
+InTreePluginOpenStackUnregister=true|false (ALPHA - 默认值为 false)
+InTreePluginPortworxUnregister=true|false (ALPHA - 默认值为 false)
+InTreePluginRBDUnregister=true|false (ALPHA - 默认值为 false)
+InTreePluginvSphereUnregister=true|false (ALPHA - 默认值为 false)
+obMutableNodeSchedulingDirectives=true|false (BETA - 默认值为 true)
+JobReadyPods=true|false (BETA - 默认值为 true)
+JobTrackingWithFinalizers=true|false (BETA - 默认值为 false)
+KubeletCredentialProviders=true|false (BETA - 默认值为 true)
+KubeletInUserNamespace=true|false (ALPHA - 默认值为 false)
+KubeletPodResources=true|false (BETA - 默认值为 true)
+KubeletPodResourcesGetAllocatable=true|false (BETA - 默认值为 true)
+LegacyServiceAccountTokenNoAutoGeneration=true|false (BETA - 默认值为 true)
+LocalStorageCapacityIsolation=true|false (BETA - 默认值为 true)
+LocalStorageCapacityIsolationFSQuotaMonitoring=true|false (ALPHA - 默认值为 false)
+LogarithmicScaleDown=true|false (BETA - 默认值为 true)
+MaxUnavailableStatefulSet=true|false (ALPHA - 默认值为 false)
+MemoryManager=true|false (BETA - 默认值为 true)
+MemoryQoS=true|false (ALPHA - 默认值为 false)
+MinDomainsInPodTopologySpread=true|false (ALPHA - 默认值为 false)
+MixedProtocolLBService=true|false (BETA - 默认值为 true)
+NetworkPolicyEndPort=true|false (BETA - 默认值为 true)
+NetworkPolicyStatus=true|false (ALPHA - 默认值为 false)
+NodeOutOfServiceVolumeDetach=true|false (ALPHA - 默认值为 false)
+NodeSwap=true|false (ALPHA - 默认值为 false)
+OpenAPIEnums=true|false (BETA - 默认值为 true)
+OpenAPIV3=true|false (BETA - 默认值为 true)
+PodAndContainerStatsFromCRI=true|false (ALPHA - 默认值为 false)
+PodDeletionCost=true|false (BETA - 默认值为 true)
+PodSecurity=true|false (BETA - 默认值为 true)
+ProbeTerminationGracePeriod=true|false (BETA - 默认值为 false)
+ProcMountType=true|false (ALPHA - 默认值为 false)
+ProxyTerminatingEndpoints=true|false (ALPHA - 默认值为 false)
+QOSReserved=true|false (ALPHA - 默认值为 false)
+ReadWriteOncePod=true|false (ALPHA - 默认值为 false)
+RecoverVolumeExpansionFailure=true|false (ALPHA - 默认值为 false)
+RemainingItemCount=true|false (BETA - 默认值为 true)
+RotateKubeletServerCertificate=true|false (BETA - 默认值为 true)
+SeccompDefault=true|false (ALPHA - 默认值为 false)
+ServerSideFieldValidation=true|false (ALPHA - 默认值为 false)
+ServiceIPStaticSubrange=true|false (ALPHA - 默认值为 false)
+ServiceInternalTrafficPolicy=true|false (BETA - 默认值为 true)
+SizeMemoryBackedVolumes=true|false (BETA - 默认值为 true)
+StatefulSetAutoDeletePVC=true|false (ALPHA - 默认值为 false)
+StatefulSetMinReadySeconds=true|false (BETA - 默认值为 true)
+StorageVersionAPI=true|false (ALPHA - 默认值为 false)
+StorageVersionHash=true|false (BETA - 默认值为 true)
+TopologyAwareHints=true|false (BETA - 默认值为 true)
+TopologyManager=true|false (BETA - 默认值为 true)
+VolumeCapacityPriority=true|false (ALPHA - 默认值为 false)
+WinDSR=true|false (ALPHA - 默认值为 false)
+WinOverlay=true|false (BETA - 默认值为 true)
+WindowsHostProcessContainers=true|false (BETA - 默认值为 true)
@@ -534,7 +516,7 @@ DEPRECATED: content type of requests sent to apiserver. This parameter is ignore
---kube-api-qps float32 默认值:50
+--kube-api-qps float 默认值:50
@@ -745,7 +727,7 @@ If true, SO_REUSEADDR will be used when binding the port. This allows binding to
如果为 true,在绑定端口时将使用 SO_REUSEADDR。
这将允许同时绑定诸如 0.0.0.0 这类通配符 IP和特定 IP,
并且它避免等待内核释放处于 TIME_WAIT 状态的套接字。
-默认值: false
+默认值:false
@@ -758,7 +740,7 @@ If true, SO_REUSEADDR will be used when binding the port. This allows binding to
If true, SO_REUSEPORT will be used when binding the port, which allows more than one instance to bind on the same address and port. [default=false]
-->
如果此标志为 true,在绑定端口时会使用 SO_REUSEPORT,从而允许不止一个
-实例绑定到同一地址和端口。
+实例绑定到同一地址和端口。
默认值:false
@@ -781,7 +763,7 @@ unschedulablePods 移动到 backoffQ 或 activeQ。
---profiling 默认值: true
+--profiling 默认值:true
@@ -824,7 +806,7 @@ Root certificate bundle to use to verify client certificates on incoming request
--requestheader-extra-headers-prefix strings
-默认值: "x-remote-extra-"
+默认值:"x-remote-extra-"
@@ -837,7 +819,7 @@ List of request header prefixes to inspect. X-Remote-Extra- is suggested.
--requestheader-group-headers strings
-默认值: "x-remote-group"
+默认值:"x-remote-group"
@@ -850,7 +832,7 @@ List of request headers to inspect for groups. X-Remote-Group is suggested.
--requestheader-username-headers strings
-默认值: "x-remote-user"
+默认值:"x-remote-user"
@@ -897,7 +879,7 @@ The previous version for which you want to show hidden metrics. Only the previou
-包含默认的 HTTPS x509 证书的文件。(CA证书(如果有)在服务器证书之后并置)。
+包含默认的 HTTPS x509 证书的文件。(如果有 CA 证书,在服务器证书之后并置)。
如果启用了 HTTPS 服务,并且未提供 --tls-cert-file 和
--tls-private-key-file,则会为公共地址生成一个自签名证书和密钥,
并将其保存到 --cert-dir 指定的目录中。
@@ -962,7 +944,7 @@ A pair of x509 certificate and private key file paths, optionally suffixed with
如果未提供域名匹配模式,则提取证书名称。
非通配符匹配优先于通配符匹配,显式域名匹配优先于提取而来的名称。
若有多个密钥/证书对,可多次使用 --tls-sni-cert-key。
-例子: "example.crt,example.key" 或者 "foo.crt,foo.key:*.foo.com,foo.com"。
+例如: "example.crt,example.key" 或者 "foo.crt,foo.key:*.foo.com,foo.com"。
@@ -998,7 +980,7 @@ Print version information and quit
-以逗号分隔的 ‘模式=N’ 设置列表,用于文件过滤的日志记录(仅适用于文本日志格式)。
+以逗号分隔的 “pattern=N” 设置列表,用于文件过滤的日志记录(仅适用于文本日志格式)。
@@ -1010,7 +992,7 @@ comma-separated list of pattern=N settings for file-filtered logging (only works
-如果已设置,将配置值写入此文件并退出。
+如果设置此参数,将配置值写入此文件并退出。
@@ -1019,5 +1001,3 @@ If set, write the configuration values to this file and exit.
-
-
diff --git a/content/zh/docs/reference/command-line-tools-reference/kubelet.md b/content/zh-cn/docs/reference/command-line-tools-reference/kubelet.md
similarity index 66%
rename from content/zh/docs/reference/command-line-tools-reference/kubelet.md
rename to content/zh-cn/docs/reference/command-line-tools-reference/kubelet.md
index 7d127e479f..a82f0e1f53 100644
--- a/content/zh/docs/reference/command-line-tools-reference/kubelet.md
+++ b/content/zh-cn/docs/reference/command-line-tools-reference/kubelet.md
@@ -8,15 +8,19 @@ weight: 28
kubelet 是在每个 Node 节点上运行的主要 “节点代理”。它可以使用以下之一向 apiserver 注册:
主机名(hostname);覆盖主机名的参数;某云驱动的特定逻辑。
kubelet 是基于 PodSpec 来工作的。每个 PodSpec 是一个描述 Pod 的 YAML 或 JSON 对象。
kubelet 接受通过各种机制(主要是通过 apiserver)提供的一组 PodSpec,并确保这些
@@ -24,27 +28,32 @@ PodSpec 中描述的容器处于运行状态且运行状况良好。
kubelet 不管理不是由 Kubernetes 创建的容器。
除了来自 apiserver 的 PodSpec 之外,还可以通过以下三种方式将容器清单(manifest)提供给 kubelet。
-文件(File):利用命令行参数传递路径。kubelet 周期性地监视此路径下的文件是否有更新。
-监视周期默认为 20s,且可通过参数进行配置。
+- 文件(File):利用命令行参数传递路径。kubelet 周期性地监视此路径下的文件是否有更新。
+ 监视周期默认为 20s,且可通过参数进行配置。
-HTTP 端点(HTTP endpoint):利用命令行参数指定 HTTP 端点。
-此端点的监视周期默认为 20 秒,也可以使用参数进行配置。
+- HTTP 端点(HTTP endpoint):利用命令行参数指定 HTTP 端点。
+ 此端点的监视周期默认为 20 秒,也可以使用参数进行配置。
-HTTP 服务器(HTTP server):kubelet 还可以侦听 HTTP 并响应简单的 API
-(目前没有完整规范)来提交新的清单。
+- HTTP 服务器(HTTP server):kubelet 还可以侦听 HTTP 并响应简单的 API
+ (目前没有完整规范)来提交新的清单。
```
kubelet [flags]
@@ -65,9 +74,10 @@ kubelet [flags]
设置为 true 表示将文件目录添加到日志消息的头部
+(已弃用:将在未来的版本中删除,进一步了解 。)
@@ -77,11 +87,12 @@ If true, adds the file directory to the header
kubelet 用来提供服务的 IP 地址(设置为0.0.0.0 表示使用所有 IPv4 接口,
-设置为 :: 表示使用所有 IPv6 接口)。已弃用:应在 --config 所给的
-配置文件中进行设置。(进一步了解 )
+设置为 :: 表示使用所有 IPv6 接口)。
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -91,11 +102,11 @@ kubelet 用来提供服务的 IP 地址(设置为0.0.0.0 表示
-用逗号分隔的字符串序列设置允许使用的非安全的 sysctls 或 sysctl 模式(以 * 结尾) 。
-使用此参数时风险自担。已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+用逗号分隔的字符串序列设置允许使用的非安全的 sysctls 或 sysctl 模式(以 * 结尾)。
+使用此参数时风险自担。(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -105,9 +116,10 @@ Comma-separated whitelist of unsafe sysctls or unsafe sysctl patterns (ending in
设置为 true 表示将日志输出到文件的同时输出到 stderr
+(已弃用:将在未来的版本中删除,进一步了解 。)
@@ -117,12 +129,12 @@ log to standard error as well as files
设置为 true 表示 kubelet 服务器可以接受匿名请求。未被任何认证组件拒绝的请求将被视为匿名请求。
匿名请求的用户名为 system:anonymous,用户组为 system:unauthenticated。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -132,11 +144,11 @@ Enables anonymous requests to the Kubelet server. Requests that are not rejected
使用 TokenReview API 对持有者令牌进行身份认证。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -146,11 +158,11 @@ Use the TokenReview API to determine authentication for bearer tokens. (DEPRECAT
对 Webhook 令牌认证组件所返回的响应的缓存时间。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -160,13 +172,13 @@ The duration to cache responses from the webhook token authenticator. (default 2
kubelet 服务器的鉴权模式。可选值包括:AlwaysAllow、Webhook。Webhook 模式使用 SubjectAccessReview API 鉴权。
当 --config 参数未被设置时,默认值为 AlwaysAllow,当使用了
--config 时,默认值为 Webhook。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -176,11 +188,11 @@ kubelet 服务器的鉴权模式。可选值包括:AlwaysAllow、
对 Webhook 认证组件所返回的 “Authorized(已授权)” 应答的缓存时间。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -190,12 +202,12 @@ The duration to cache 'authorized' responses from the webhook authorizer. (DEPRE
对 Webhook 认证组件所返回的 “Unauthorized(未授权)” 应答的缓存时间。
--config 时,默认值为 Webhook。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -246,12 +258,12 @@ TLS 证书所在的目录。如果设置了 --tls-cert-file 和
kubelet 用来操作本机 cgroup 时使用的驱动程序。支持的选项包括 cgroupfs
和 systemd。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -261,12 +273,12 @@ kubelet 用来操作本机 cgroup 时使用的驱动程序。支持的选项包
可选的选项,为 Pod 设置根 cgroup。容器运行时会尽可能使用此配置。
默认值 "" 意味着将使用容器运行时的默认设置。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -276,24 +288,11 @@ Optional root cgroup to use for pods. This is handled by the container runtime o
启用创建 QoS cgroup 层次结构。此值为 true 时 kubelet 为 QoS 和 Pod 创建顶级的 cgroup。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
-
-
-
-
---chaos-chance float
-
-
-
-
-如果此值大于 0.0,则引入随机客户端错误和延迟。用于测试。
-已启用:将在未来版本中移除。
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -303,12 +302,12 @@ If > 0.0, introduce random client errors and latency. Intended for testing. (
如果设置了此参数,则使用对应文件中机构之一检查请求中所携带的客户端证书。
若客户端证书通过身份认证,则其对应身份为其证书中所设置的 CommonName。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -345,15 +344,15 @@ The provider for cloud services. Set to empty string for running with no cloud p
DNS 服务器的 IP 地址,以逗号分隔。此标志值用于 Pod 中设置了 “dnsPolicy=ClusterFirst”
时为容器提供 DNS 服务。注意:列表中出现的所有 DNS 服务器必须包含相同的记录组,
否则集群中的名称解析可能无法正常工作。至于名称解析过程中会牵涉到哪些 DNS 服务器,
这一点无法保证。
--config 时,默认值为 Webhook。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -363,13 +362,13 @@ DNS 服务器的 IP 地址,以逗号分隔。此标志值用于 Pod 中设置
集群的域名。如果设置了此值,kubelet 除了将主机的搜索域配置到所有容器之外,还会为其
配置所搜这里指定的域名。
--config 时,默认值为 Webhook。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -379,11 +378,12 @@ Domain for this cluster. If set, kubelet will configure all containers to search
-<警告:alpha 特性> 此值为以逗号分隔的完整路径列表。
+此值为以逗号分隔的完整路径列表。
kubelet 将在所指定路径中搜索 CNI 插件的可执行文件。
仅当容器运行环境设置为 docker 时,此特定于 docker 的参数才有效。
+(已弃用:将会随着 dockershim 一起删除。)
@@ -393,10 +393,11 @@ kubelet 将在所指定路径中搜索 CNI 插件的可执行文件。
-<警告:alpha 特性> 此值为一个目录的全路径名。CNI 将在其中缓存文件。
+此值为一个目录的全路径名。CNI 将在其中缓存文件。
仅当容器运行环境设置为 docker 时,此特定于 docker 的参数才有效。
+(已弃用:将会随着 dockershim 一起删除。)
@@ -406,10 +407,11 @@ kubelet 将在所指定路径中搜索 CNI 插件的可执行文件。
<警告:alpha 特性> 此值为某目录的全路径名。kubelet 将在其中搜索 CNI 配置文件。
仅当容器运行环境设置为 docker 时,此特定于 docker 的参数才有效。
+(已弃用:将会随着 dockershim 一起删除。)
@@ -433,12 +435,12 @@ kubelet 将从此标志所指的文件中加载其初始配置。此路径可以
设置容器的日志文件个数上限。此值必须不小于 2。
此标志只能与 --container-runtime=remote 标志一起使用。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -448,12 +450,12 @@ Set the maximum number of container log files that can be present for a containe
设置容器日志文件在轮换生成新文件时之前的最大值(例如,10Mi)。
此标志只能与 --container-runtime=remote 标志一起使用。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -490,11 +492,11 @@ Windows 系统上的 npipe 和 TCP 端点。例如:
当启用了性能分析时,启用锁竞争分析。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -504,11 +506,11 @@ Enable lock contention profiling, if profiling is enabled (DEPRECATED: This para
为设置了 CPU 限制的容器启用 CPU CFS 配额保障。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -518,11 +520,11 @@ Enable CPU CFS quota enforcement for containers that specify CPU limits (DEPRECA
-设置 CPU CFS 配额周期 cpu.cfs_period_us。默认使用 Linux 内核所设置的默认值 。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+设置 CPU CFS 配额周期 cpu.cfs_period_us。默认使用 Linux 内核所设置的默认值。
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -532,11 +534,11 @@ Sets CPU CFS quota period value, cpu.cfs_period_us, defaults to Lin
要使用的 CPU 管理器策略。可选值包括:none 和 static。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -546,12 +548,12 @@ CPU Manager policy to use. Possible values: 'none', 'static'. Default: 'none' (d
<警告:alpha 特性> 设置 CPU 管理器的调和时间。例如:10s 或者 1m。
如果未设置,默认使用节点状态更新频率。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -561,10 +563,11 @@ CPU Manager policy to use. Possible values: 'none', 'static'. Default: 'none' (d
使用这里的端点与 docker 端点通信。
仅当容器运行环境设置为 docker 时,此特定于 docker 的参数才有效。
+(已弃用:将会随着 dockershim 一起删除。)
@@ -594,9 +597,11 @@ kubelet 使用此目录来保存所下载的配置,跟踪配置运行状况。
启用 Attach/Detach 控制器来挂接和摘除调度到该节点的卷,同时禁用 kubelet 执行挂接和摘除操作。
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -606,11 +611,11 @@ Enables the Attach/Detach controller to manage attachment/detachment of volumes
启用服务器上用于日志收集和在本地运行容器和命令的端点。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -620,11 +625,11 @@ Enables server endpoints for log collection and local running of containers and
启用 kubelet 服务器。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -634,16 +639,16 @@ Enable the Kubelet's server. (DEPRECATED: This parameter should be set via the c
用逗号分隔的列表,包含由 kubelet 强制执行的节点可分配资源级别。
可选配置为:none、pods、system-reserved 和 kube-reserved。
在设置 system-reserved 和 kube-reserved 这两个值时,同时要求设置
--system-reserved-cgroup 和 --kube-reserved-cgroup 这两个参数。
如果设置为 none,则不需要设置其他参数。
-参考相关文档 。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+参考相关文档 。
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -653,12 +658,12 @@ A comma separated list of levels of node allocatable enforcement to be enforced
事件记录的个数的突发峰值上限,在遵从 --event-qps 阈值约束的前提下
临时允许事件记录达到此数目。仅在 --event-qps 大于 0 时使用。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -668,11 +673,11 @@ Maximum size of a bursty event records, temporarily allows event records to burs
设置大于 0 的值表示限制每秒可生成的事件数量。设置为 0 表示不限制。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -682,13 +687,13 @@ If > 0, limit event creations per second to this value. If
触发 Pod 驱逐操作的一组硬性门限(例如:memory.available<1Gi
-(内存可用值小于 1 G))设置。在 Linux 节点上,默认值还包括
+(内存可用值小于 1G)设置。在 Linux 节点上,默认值还包括
nodefs.inodesFree<5%。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -698,12 +703,12 @@ A set of eviction thresholds (e.g. memory.available<1Gi) that if me
响应满足软性驱逐阈值(Soft Eviction Threshold)而终止 Pod 时使用的最长宽限期(以秒为单位)。
如果设置为负数,则遵循 Pod 的指定值。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -713,12 +718,12 @@ Maximum allowed grace period (in seconds) to use when terminating pods in respon
当某资源压力过大时,kubelet 将执行 Pod 驱逐操作。
此参数设置软性驱逐操作需要回收的资源的最小数量(例如:imagefs.available=2Gi)。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -728,11 +733,11 @@ A set of minimum reclaims (e.g. imagefs.available=2Gi) that describ
kubelet 在驱逐压力状况解除之前的最长等待时间。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -742,12 +747,12 @@ kubelet 在驱逐压力状况解除之前的最长等待时间。
设置一组驱逐阈值(例如:memory.available<1.5Gi)。
如果在相应的宽限期内达到该阈值,则会触发 Pod 驱逐操作。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -757,12 +762,12 @@ A set of eviction thresholds (e.g. memory.available>1.5Gi) that if
设置一组驱逐宽限期(例如,memory.available=1m30s),对应于触发软性 Pod
驱逐操作之前软性驱逐阈值所需持续的时间长短。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -793,18 +798,6 @@ When set to true, Hard eviction thresholds will be ignored while ca
-
---experimental-bootstrap-kubeconfig string
-
-
-
-
-已弃用:应使用 --bootstrap-kubeconfig 标志
-
-
-
--experimental-check-node-capabilities-before-mount
@@ -825,13 +818,13 @@ When set to true, Hard eviction thresholds will be ignored while ca
设置为 true 表示 kubelet 将会集成内核的 memcg 通知机制而不是使用轮询机制来
判断是否达到了内存驱逐阈值。
此标志将在 1.24 或更高版本移除。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -841,13 +834,13 @@ If enabled, the kubelet will integrate with the kernel memcg notification to det
[试验性功能] 启用此标志之后,kubelet 会避免将标记为敏感的字段(密码、密钥、令牌等)
写入日志中。运行时的日志清理可能会带来相当的计算开销,因此不应该在
产品环境中启用。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -869,11 +862,11 @@ If enabled, the kubelet will integrate with the kernel memcg notification to det
设置为 true 表示如果主机启用了交换分区,kubelet 将直接失败。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -970,7 +963,7 @@ WinDSR=true|false (ALPHA - default=false)
WinOverlay=true|false (BETA - default=true)
WindowsHostProcessContainers=true|false (BETA - default=true)
csiMigrationRBD=true|false (ALPHA - default=false)
-(DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+(DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
-->
用于 alpha 实验性特性的特性开关组,每个开关以 key=value 形式表示。当前可用开关包括:
APIListChunking=true|false (BETA - 默认值为 true)
@@ -1072,11 +1065,11 @@ csiMigrationRBD=true|false (ALPHA - 默认值为 false)
检查配置文件中新数据的时间间隔。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1086,13 +1079,13 @@ Duration between checking config files for new data. (DEPRECATED: This parameter
设置 kubelet 执行发夹模式(hairpin)网络地址转译的方式。
该模式允许后端端点对其自身服务的访问能够再次经由负载均衡转发回自身。
可选项包括 promiscuous-bridge、hairpin-veth 和 none。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1102,12 +1095,12 @@ How should the kubelet setup hairpin NAT. This allows endpoints of a Service to
用于运行 healthz 服务器的 IP 地址(设置为 0.0.0.0 表示使用所有 IPv4 接口,
设置为 :: 表示使用所有 IPv6 接口。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1117,11 +1110,11 @@ The IP address for the healthz server to serve on (set to 0.0.0.0 f
本地 healthz 端点使用的端口(设置为 0 表示禁用)。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1151,29 +1144,17 @@ If non-empty, will use this string as identification instead of the actual hostn
-
---housekeeping-interval duration 默认值:10s
-
-
-
-
-清理容器操作的时间间隔。
-
-
-
--http-check-frequency duration 默认值:20s
HTTP 服务以获取新数据的时间间隔。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1206,12 +1187,12 @@ The path to the credential provider plugin config file.
镜像垃圾回收上限。磁盘使用空间达到该百分比时,镜像垃圾回收将持续工作。
值必须在 [0,100] 范围内。要禁用镜像垃圾回收,请设置为 100。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1221,12 +1202,12 @@ The percent of disk usage after which image garbage collection is always run. Va
镜像垃圾回收下限。磁盘使用空间在达到该百分比之前,镜像垃圾回收操作不会运行。
值必须在 [0,100] 范围内,并且不得大于 --image-gc-high-threshold的值。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1236,10 +1217,11 @@ The percent of disk usage before which image garbage collection is never run. Lo
如果在该参数值所设置的期限之前没有拉取镜像的进展,镜像拉取操作将被取消。
仅当容器运行环境设置为 docker 时,此特定于 docker 的参数才有效。
+(已弃用:将会随着 dockershim 一起删除。)
@@ -1263,11 +1245,11 @@ If no pulling progress is made before this deadline, the image pulling will be c
标记数据包将被丢弃的 fwmark 位设置。必须在 [0,31] 范围内。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1277,12 +1259,12 @@ The bit of the fwmark space to mark packets for dropping. Must be w
标记数据包将进行 SNAT 的 fwmark 空间位设置。必须在 [0,31] 范围内。
请将此参数与 kube-proxy 中的相应参数匹配。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1305,12 +1287,12 @@ Keep terminated pod volumes mounted to the node after the pod terminates. Can be
若启用,则 kubelet 将与内核中的 memcg 通知机制集成,不再使用轮询的方式来判定
是否 Pod 达到内存驱逐阈值。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1320,11 +1302,11 @@ If enabled, the kubelet will integrate with the kernel memcg notification to det
每秒发送到 apiserver 的突发请求数量上限。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1334,11 +1316,11 @@ Burst to use while talking with kubernetes apiserver. (DEPRECATED: This paramete
发送到 apiserver 的请求的内容类型。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1348,13 +1330,13 @@ Content type of requests sent to apiserver. (default "application/vnd.kubernetes
与 apiserver 通信的每秒查询个数(QPS)。
-此值必须 >= 0。如果为 0, 则使用默认 QPS(5)。
+此值必须 >= 0。如果为 0,则使用默认 QPS(5)。
不包含事件和节点心跳 api,它们的速率限制是由一组不同的标志所控制。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1364,14 +1346,14 @@ QPS to use while talking with kubernetes API server. The number must be >= 0.
-kubernetes 系统预留的资源配置,以一组 资源名称=资源数量 格式表示。
+kubernetes 系统预留的资源配置,以一组 <资源名称>=<资源数量> 格式表示。
(例如:cpu=200m,memory=500Mi,ephemeral-storage=1Gi,pid='100')。
当前支持 cpu、memory 和用于根文件系统的 ephemeral-storage。
-请参阅相关文档 获取更多信息。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+请参阅这里 获取更多信息。
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1381,12 +1363,12 @@ kubernetes 系统预留的资源配置,以一组 资源名称=资源数
给出某个顶层 cgroup 绝对名称,该 cgroup 用于管理通过标志 --kube-reserved
为 kubernetes 组件所预留的计算资源。例如:"/kube-reserved"。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1409,11 +1391,11 @@ kubeconfig 配置文件的路径,指定如何连接到 API 服务器。
用于创建和运行 kubelet 的 cgroup 的绝对名称。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1435,11 +1417,11 @@ Optional absolute name of cgroups to create and run the Kubelet in. (DEPRECATED:
形式为 <file>:<N>。
当日志逻辑执行到命中 <file> 的第 <N> 行时,转储调用堆栈。
-(已弃用:将在未来的版本中删除,进一步了解 )
+(已弃用:将在未来的版本中删除,进一步了解 。)
@@ -1449,10 +1431,10 @@ When logging hits line : , emit a stack trace. (DEPRECATED:
如果此值为非空,则在所指定的目录中写入日志文件。
-(已弃用:将在未来的版本中删除,进一步了解 )
+(已弃用:将在未来的版本中删除,进一步了解 。)
@@ -1462,9 +1444,10 @@ If non-empty, write log files in this directory. (DEPRECATED: will be removed in
如果此值非空,使用所给字符串作为日志文件名。
+(已弃用:将在未来的版本中删除,进一步了解 。)
@@ -1474,10 +1457,10 @@ If non-empty, use this log file
设置日志文件的最大值。单位为兆字节(M)。如果值为 0,则表示文件大小无限制。
-(已弃用:将在未来的版本中删除,进一步了解 )
+(已弃用:将在未来的版本中删除,进一步了解 。)
@@ -1499,12 +1482,12 @@ Maximum number of seconds between log flushes
[实验性特性]在具有拆分输出流的 JSON 格式中,可以将信息消息缓冲一段时间以提高性能。
零字节的默认值禁用缓冲。大小可以指定为字节数(512)、1000 的倍数(1K)、1024 的倍数(2Ki) 或这些(3M、4G、5Mi、6Gi)的幂。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1514,12 +1497,12 @@ Maximum number of seconds between log flushes
-[实验性特性]以 JSON 格式,将错误消息写入 stderr,将 info 消息写入 stdout。
+[实验性特性]以 JSON 格式,将错误消息写入 stderr,将 info 消息写入 stdout。
默认是将单个流写入标准输出。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1529,16 +1512,16 @@ Maximum number of seconds between log flushes
设置日志文件格式。可以设置的格式有:"text"、"json"。
-非默认的格式不会使用以下标志的配置:--add-dir-header, --alsologtostderr,
---log-backtrace-at, --log-dir, --log-file,
---log-file-max-size, --logtostderr, --skip-headers,
---skip-log-headers, --stderrthreshold, --log-flush-frequency。
+非默认的格式不会使用以下标志的配置:--add-dir-header、--alsologtostderr、
+--log-backtrace-at、--log-dir、--log-file,
+--log-file-max-size、--logtostderr、--skip-headers、
+--skip-log-headers、--stderrthreshold、--log-flush-frequency。
非默认选项的其它值都应视为 Alpha 特性,将来出现更改时不会额外警告。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1548,11 +1531,11 @@ Sets the log format. Permitted formats: text, json.
日志输出到 stderr 而不是文件。
(已弃用:将会在未来的版本删除,
-进一步了解 )
+进一步了解 。)
@@ -1562,11 +1545,11 @@ log to standard error instead of files. (DEPRECATED: will be removed in a future
设置为 true 表示 kubelet 将确保 iptables 规则在主机上存在。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1576,11 +1559,11 @@ If true, kubelet will ensure iptables utility rules are present on
用于访问要运行的其他 Pod 规范的 URL。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1590,15 +1573,16 @@ URL for accessing additional Pod specifications to run (DEPRECATED: This paramet
取值为由 HTTP 头部组成的逗号分隔列表,在访问 --manifest-url 所给出的 URL 时使用。
名称相同的多个头部将按所列的顺序添加。该参数可以多次使用。例如:
--manifest-url-header 'a:hello,b:again,c:world' --manifest-url-header 'b:beautiful'。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
+
--master-service-namespace string 默认值:default
@@ -1618,11 +1602,11 @@ kubelet 向 Pod 注入 Kubernetes 主控服务信息时使用的命名空间。
kubelet 进程可以打开的最大文件数量。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1632,11 +1616,11 @@ kubelet 进程可以打开的最大文件数量。
此 kubelet 能运行的 Pod 最大数量。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1650,8 +1634,8 @@ Maximum number of old instances of containers to retain globally. Each container
-->
设置全局可保留的已停止容器实例个数上限。
每个实例会占用一些磁盘空间。要禁用,请设置为负数。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+已弃用:改用 --eviction-hard 或 --eviction-soft。
+此标志将在未来的版本中删除。
@@ -1661,11 +1645,11 @@ Maximum number of old instances of containers to retain globally. Each container
每个已停止容器可以保留的的最大实例数量。每个容器占用一些磁盘空间。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+已弃用:改用 --eviction-hard 或 --eviction-soft。
+此标志将在未来的版本中删除。
@@ -1675,11 +1659,11 @@ Maximum number of old instances to retain per container. Each container takes up
-内存管理器策略使用。可选值:'None', 'Static'。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+内存管理器策略使用。可选值:'None'、'Static'。
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1689,10 +1673,10 @@ Memory Manager policy to use. Possible values: 'None', 'Stati
已结束的容器在被垃圾回收清理之前的最少存活时间。
-例如:300ms、10s 或者 2h45m。
+例如:'300ms'、'10s' 或者 '2h45m'。
已弃用:请改用 --eviction-hard 或者 --eviction-soft。
此标志将在未来的版本中删除。
@@ -1704,12 +1688,12 @@ Minimum age for a finished container before it is garbage collected. Examples:
-不再使用的镜像在被垃圾回收清理之前的最少存活时间。
-例如:300ms、10s 或者 2h45m。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+已结束的容器在被垃圾回收清理之前的最少存活时间。
+例如:'300ms'、'10s' 或者 '2h45m'。
+已弃用:这个参数应该通过 Kubelet 的 --config 标志指定的配置文件来设置。
+(进一步了解 )
@@ -1719,10 +1703,11 @@ Minimum age for an unused image before it is garbage collected. Examples:
-<警告:alpha 特性> 设置 kubelet/Pod 生命周期中各种事件调用的网络插件的名称。
+设置 kubelet/Pod 生命周期中各种事件调用的网络插件的名称。
仅当容器运行环境设置为 docker 时,此特定于 docker 的参数才有效。
+(已弃用:将会随着 dockershim 一起删除。)
@@ -1782,11 +1767,11 @@ IP address (or comma-separated dual-stack IP addresses) of the node. If unset, k
在 node.status.images 中可以报告的最大镜像数量。如果指定为 -1,则不设上限。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1796,12 +1781,12 @@ The maximum number of images to report in node.status.images. If
指定 kubelet 向主控节点汇报节点状态的时间间隔。注意:更改此常量时请务必谨慎,
它必须与节点控制器中的 nodeMonitorGracePeriod 一起使用。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1815,8 +1800,7 @@ Traffic to IPs outside this range will use IP masquerade. Set to '0.0.0.0/0' to
-->
kubelet 向该 IP 段之外的 IP 地址发送的流量将使用 IP 伪装技术。
设置为 0.0.0.0/0 则不使用伪装。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:将在未来的版本中删除。)
@@ -1826,12 +1810,12 @@ kubelet 向该 IP 段之外的 IP 地址发送的流量将使用 IP 伪装技术
如果设置此标志为 true,则仅将日志写入其原来的严重性级别中,
而不是同时将其写入更低严重性级别中。
-已弃用:将在未来的版本中删除,
-(进一步了解 )
+已弃用:将在未来的版本中删除。
+(进一步了解 。)
@@ -1841,11 +1825,11 @@ If true, only write logs to their native severity level (vs also writing to each
kubelet 进程的 oom-score-adj 参数值。有效范围为 [-1000,1000]。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1855,12 +1839,12 @@ kubelet 进程的 oom-score-adj 参数值。有效范围为 [-1000,1000]
用于给 Pod 分配 IP 地址的 CIDR 地址池,仅在独立运行模式下使用。
在集群模式下,CIDR 设置是从主服务器获取的。对于 IPv6,分配的 IP 的最大数量为 65536。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1885,12 +1869,12 @@ The CIDR to use for pod IP addresses, only used in standalone mode. In cluster m
设置包含要运行的静态 Pod 的文件的路径,或单个静态 Pod 文件的路径。以点(.)
开头的文件将被忽略。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1900,11 +1884,11 @@ Path to the directory containing static pod files to run, or the path to a singl
设置每个 Pod 中的最大进程数目。如果为 -1,则 kubelet 使用节点可分配的 PID 容量作为默认值。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1914,13 +1898,13 @@ Set the maximum number of processes per pod. If -1, the kubelet de
kubelet 在每个处理器核上可运行的 Pod 数量。此 kubelet 上的 Pod 总数不能超过
--max-pods 标志值。因此,如果此计算结果导致在 kubelet
上允许更多数量的 Pod,则使用 --max-pods 值。值为 0 表示不作限制。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1930,11 +1914,11 @@ kubelet 在每个处理器核上可运行的 Pod 数量。此 kubelet 上的 Pod
kubelet 服务监听的本机端口号。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1944,12 +1928,12 @@ kubelet 服务监听的本机端口号。
设置 kubelet 的默认内核调整行为。如果已设置该参数,当任何内核可调参数与
kubelet 默认值不同时,kubelet 都会出错。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1959,11 +1943,11 @@ kubelet 默认值不同时,kubelet 都会出错。
设置主机数据库(即,云驱动)中用来标识节点的唯一标识。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1973,13 +1957,13 @@ Unique identifier for identifying the node in a machine database, i.e cloud prov
<警告:alpha 特性> 设置在指定的 QoS 级别预留的 Pod 资源请求,以一组
"资源名称=百分比" 的形式进行设置,例如 memory=50%。
当前仅支持内存(memory)。要求启用 QOSReserved 特性门控。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -1989,11 +1973,11 @@ Unique identifier for identifying the node in a machine database, i.e cloud prov
kubelet 可以在没有身份验证/鉴权的情况下提供只读服务的端口(设置为 0 表示禁用)。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2016,12 +2000,12 @@ If true, when panics occur crash. Intended for testing. (DEPRECATED: will be rem
向 API 服务器注册节点,如果未提供 --kubeconfig,此标志无关紧要,
因为 Kubelet 没有 API 服务器可注册。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2044,11 +2028,12 @@ Register the node as schedulable. Won't have any effect if --register-node
设置本节点的污点标记,格式为 <key>=<value>:<effect>,
以逗号分隔。当 --register-node 为 false 时此标志无效。
-已弃用:将在未来版本中移除。
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2058,12 +2043,12 @@ Register the node with the given list of taints (comma separated =
设置突发性镜像拉取的个数上限,在不超过 --registration-qps 设置值的前提下
暂时允许此参数所给的镜像拉取个数。仅在 --registry-qps 大于 0 时使用。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2073,11 +2058,11 @@ Maximum size of a bursty pulls, temporarily allows pulls to burst to this number
如此值大于 0,可用来限制镜像仓库的 QPS 上限。设置为 0,表示不受限制。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2087,13 +2072,13 @@ If > 0, limit registry pull QPS to this value. If 0, unlimited.
用逗号分隔的一组 CPU 或 CPU 范围列表,给出为系统和 Kubernetes 保留使用的 CPU。
此列表所给出的设置优先于通过 --system-reserved 和
--kube-reskube-reserved 所保留的 CPU 个数配置。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2103,13 +2088,13 @@ A comma-separated list of CPUs or CPU ranges that are reserved for system and ku
-以逗号分隔的 NUMA 节点内存预留列表。(例如 --reserved-memory 0:memory=1Gi,hugepages-1M=2Gi --reserved-memory 1:memory=2Gi)。
+以逗号分隔的 NUMA 节点内存预留列表。(例如 --reserved-memory 0:memory=1Gi,hugepages-1M=2Gi --reserved-memory 1:memory=2Gi)。
每种内存类型的总和应该等于--kube-reserved、--system-reserved和--eviction-threshold之和 代码>。
了解更多详细信息。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2119,11 +2104,11 @@ A comma-separated list of memory reservations for NUMA nodes. (e.g. --rese
名字解析服务的配置文件名,用作容器 DNS 解析配置的基础。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2145,12 +2130,12 @@ Directory path for managing kubelet files (volume mounts, etc).
<警告:Beta 特性> 设置当客户端证书即将过期时 kubelet 自动从
kube-apiserver 请求新的证书进行轮换。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2160,13 +2145,13 @@ Directory path for managing kubelet files (volume mounts, etc).
当 kubelet 的服务证书即将过期时自动从 kube-apiserver 请求新的证书进行轮换。
要求启用 RotateKubeletServerCertificate 特性门控,以及对提交的
CertificateSigningRequest 对象进行批复(Approve)操作。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2176,12 +2161,12 @@ Auto-request and rotate the kubelet serving certificates by requesting new certi
-设置为 true 表示从本地清单或远程 URL 创建完 Pod 后立即退出 kubelet 进程。
+设置为 true 表示从本地清单或远程 URL 创建完 Pod 后立即退出 kubelet 进程。
与 --enable-server 标志互斥。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2203,26 +2188,25 @@ Optional absolute name of cgroups to create and run the runtime in.
设置除了长时间运行的请求(包括 pull、logs、exec
和 attach 等操作)之外的其他运行时请求的超时时间。
到达超时时间时,请求会被取消,抛出一个错误并会等待重试。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
---seccomp-profile-root string 默认值:/var/lib/kubelet/seccomp
+--seccomp-default RuntimeDefault
-
-<警告:alpha 特性> seccomp 配置文件目录。
-已弃用:将在 1.23 或更高版本中移除,以使用 <root-dir>/seccomp 目录。
+<警告:alpha 特性> 启用 RuntimeDefault 作为所有工作负载的默认 seccomp 配置文件。SeccompDefault 特性门控必须启用以允许此标志,默认情况下禁用。
@@ -2232,12 +2216,12 @@ Timeout of all runtime requests except long running request - pull,
逐一拉取镜像。建议 *不要* 在 docker 守护进程版本低于 1.9 或启用了 Aufs 存储后端的节点上
更改默认值。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2247,10 +2231,10 @@ Pull images one at a time. We recommend *not* changing the default value on node
-设置为 true 时在日志消息中去掉标头前缀。
-(已弃用:将在未来的版本中删除,进一步了解 )
+设置为 true 时在日志消息中去掉标头前缀。
+(已弃用:将在未来的版本中删除,进一步了解 。)
@@ -2260,10 +2244,10 @@ If true, avoid header prefixes in the log messages. (DEPRECATED: will be removed
-设置为 true,打开日志文件时去掉标头。
-(已弃用:将在未来的版本中删除,进一步了解 )
+设置为 true,打开日志文件时去掉标头。
+(已弃用:将在未来的版本中删除,进一步了解 。)
@@ -2273,10 +2257,10 @@ If true, avoid headers when opening log files. (DEPRECATED: will be removed in a
设置严重程度达到或超过此阈值的日志输出到标准错误输出。
-(已弃用:将在未来的版本中删除,进一步了解 )
+(已弃用:将在未来的版本中删除,进一步了解 。)
@@ -2286,13 +2270,13 @@ logs at or above this threshold go to stderr. (DEPRECATED: will be removed in a
设置流连接在自动关闭之前可以空闲的最长时间。0 表示没有超时限制。
例如:5m。
注意:与 kubelet 服务器的所有连接最长持续时间为 4 小时。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2302,11 +2286,11 @@ Maximum time a streaming connection can be idle before the connection is automat
在运行中的容器与其配置之间执行同步操作的最长时间间隔。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2316,12 +2300,12 @@ Max period between synchronizing running containers and config. (DEPRECATED: Thi
此标志值为一个 cgroup 的绝对名称,用于所有尚未放置在根目录下某 cgroup 内的非内核进程。
空值表示不指定 cgroup。回滚该参数需要重启机器。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2331,15 +2315,15 @@ Optional absolute name of cgroups in which to place all non-kernel processes tha
系统预留的资源配置,以一组 资源名称=资源数量 的格式表示,
(例如:cpu=200m,memory=500Mi,ephemeral-storage=1Gi,pid='100')。
目前仅支持 cpu 和 memory 的设置。
更多细节可参考
-相关文档 。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+相关文档 。
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2349,13 +2333,13 @@ A set of = (e.g. cpu=200m,m
此标志给出一个顶层 cgroup 绝对名称,该 cgroup 用于管理非 kubernetes 组件,
这些组件的计算资源通过 --system-reserved 标志进行预留。
例如 "/system-reserved"。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2365,15 +2349,15 @@ Absolute name of the top level cgroup that is used to manage non-kubernetes comp
包含 x509 证书的文件路径,用于 HTTPS 认证。
如果有中间证书,则中间证书要串接在在服务器证书之后。
如果未提供 --tls-cert-file 和 --tls-private-key-file,
kubelet 会为公开地址生成自签名证书和密钥,并将其保存到通过
--cert-dir 指定的目录中。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2388,15 +2372,15 @@ Preferred values:
TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_GCM_SHA384
Insecure values:
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_RC4_128_SHA.
-(DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.)
+(DEPRECATED: This parameter should be set via the config file specified by the Kubelet's --config flag. See kubelet-config-file for more information.)
-->
服务器端加密算法列表,以逗号分隔。如果不设置,则使用 Go 语言加密包的默认算法列表。
首选算法:
TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_GCM_SHA384
不安全算法:
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_RC4_128_SHA。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2406,12 +2390,12 @@ TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, TLS_E
设置支持的最小 TLS 版本号,可选的版本号包括:VersionTLS10、
VersionTLS11、VersionTLS12 和 VersionTLS13。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2421,11 +2405,11 @@ Minimum TLS version supported. Possible values: VersionTLS10,
包含与 --tls-cert-file 对应的 x509 私钥文件路径。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2435,12 +2419,12 @@ File containing x509 private key matching --tls-cert-file. (DEPRECA
设置拓扑管理策略(Topology Manager policy)。可选值包括:none、
best-effort、restricted 和 single-numa-node。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2450,13 +2434,13 @@ Topology Manager policy to use. Possible values: none, best-e
拓扑提示信息使用范围。拓扑管理器从提示提供者(Hints Providers)处收集提示信息,
并将其应用到所定义的范围以确保 Pod 准入。
可选值包括:container(默认)、pod。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2502,11 +2486,11 @@ Comma-separated list of pattern=N settings for file-filtered loggin
用来搜索第三方存储卷插件的目录。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
@@ -2516,12 +2500,12 @@ The full path of the directory in which to search for additional third party vol
指定 kubelet 计算和缓存所有 Pod 和卷的磁盘用量总值的时间间隔。要禁用磁盘用量计算,
请设置为 0。
-已弃用:应在 --config 所给的配置文件中进行设置。
-(进一步了解 )
+(已弃用:应在 --config 所给的配置文件中进行设置。
+请参阅 kubelet-config-file 了解更多信息。)
diff --git a/content/zh/docs/reference/config-api/_index.md b/content/zh-cn/docs/reference/config-api/_index.md
similarity index 100%
rename from content/zh/docs/reference/config-api/_index.md
rename to content/zh-cn/docs/reference/config-api/_index.md
diff --git a/content/zh/docs/reference/config-api/apiserver-audit.v1.md b/content/zh-cn/docs/reference/config-api/apiserver-audit.v1.md
similarity index 100%
rename from content/zh/docs/reference/config-api/apiserver-audit.v1.md
rename to content/zh-cn/docs/reference/config-api/apiserver-audit.v1.md
diff --git a/content/zh/docs/reference/config-api/apiserver-config.v1.md b/content/zh-cn/docs/reference/config-api/apiserver-config.v1.md
similarity index 100%
rename from content/zh/docs/reference/config-api/apiserver-config.v1.md
rename to content/zh-cn/docs/reference/config-api/apiserver-config.v1.md
diff --git a/content/zh/docs/reference/config-api/apiserver-config.v1alpha1.md b/content/zh-cn/docs/reference/config-api/apiserver-config.v1alpha1.md
similarity index 100%
rename from content/zh/docs/reference/config-api/apiserver-config.v1alpha1.md
rename to content/zh-cn/docs/reference/config-api/apiserver-config.v1alpha1.md
diff --git a/content/zh/docs/reference/config-api/apiserver-encryption.v1.md b/content/zh-cn/docs/reference/config-api/apiserver-encryption.v1.md
similarity index 100%
rename from content/zh/docs/reference/config-api/apiserver-encryption.v1.md
rename to content/zh-cn/docs/reference/config-api/apiserver-encryption.v1.md
diff --git a/content/zh-cn/docs/reference/config-api/apiserver-eventratelimit.v1alpha1.md b/content/zh-cn/docs/reference/config-api/apiserver-eventratelimit.v1alpha1.md
new file mode 100644
index 0000000000..32503d37fb
--- /dev/null
+++ b/content/zh-cn/docs/reference/config-api/apiserver-eventratelimit.v1alpha1.md
@@ -0,0 +1,152 @@
+---
+title: Event Rate Limit Configuration (v1alpha1)
+content_type: tool-reference
+package: eventratelimit.admission.k8s.io/v1alpha1
+---
+
+
+## 资源类型 {#resource-types}
+
+- [Configuration](#eventratelimit-admission-k8s-io-v1alpha1-Configuration)
+
+## `Configuration` {#eventratelimit-admission-k8s-io-v1alpha1-Configuration}
+
+
+Configuration 为 EventRateLimit 准入控制器提供配置数据。
+
+
+字段 描述
+
+
+apiVersion stringeventratelimit.admission.k8s.io/v1alpha1
+kind stringConfiguration
+
+limits [Required]
+[]Limit
+
+
+
+ limits 是为所接收到的事件查询设置的限制。可以针对服务器端接收到的事件设置限制,
+按逐个名字空间、逐个用户、或逐个来源+对象组合的方式均可以。
+至少需要设置一种限制。
+
+
+
+
+
+## `Limit` {#eventratelimit-admission-k8s-io-v1alpha1-Limit}
+
+
+**出现在:**
+
+- [Configuration](#eventratelimit-admission-k8s-io-v1alpha1-Configuration)
+
+
+Limit 是为特定限制类型提供的配置数据。
+
+
+字段 描述
+
+
+type [必需]
+LimitType
+
+
+
+ type 是此配置所适用的限制的类型。
+
+
+qps [必需]
+int32
+
+
+
+ qps 是针对此类型的限制每秒钟所允许的事件查询次数。qps 和 burst
+字段一起用来确定是否特定的事件查询会被接受。qps 确定的是当超出查询数量的
+burst 值时可以接受的查询个数。
+
+
+burst [必需]
+int32
+
+
+
+ burst 是针对此类型限制的突发事件查询数量。qps 和 burst 字段一起使用可用来确定特定的事件查询是否被接受。
+burst 字段确定针对特定的事件桶(bucket)可以接受的规模上限。
+例如,如果 burst 是 10,qps 是 3,那么准入控制器会在接收 10 个查询之后阻塞所有查询。
+每秒钟可以额外允许 3 个查询。如果这一限额未被用尽,则剩余的限额会被顺延到下一秒钟,
+直到再次达到 10 个限额的上限。
+
+
+cacheSize
+int32
+
+
+
+ cacheSize 是此类型限制的 LRU 缓存的规模。如果某个事件桶(bucket)被从缓存中剔除,
+该事件桶所对应的限额也会被重置。如果后来再次收到针对某个已被剔除的事件桶的查询,
+则该事件桶会重新以干净的状态进入缓存,因而获得全量的突发查询配额。
+ 默认的缓存大小是 4096。
+ 如果 limitType 是 “server”,则 cacheSize 设置会被忽略。
+
+
+
+
+
+## `LimitType` {#eventratelimit-admission-k8s-io-v1alpha1-LimitType}
+
+
+(`string` 类型的别名)
+
+**出现在:**
+
+- [Limit](#eventratelimit-admission-k8s-io-v1alpha1-Limit)
+
+
+LimitType 是限制类型(例如:per-namespace)。
+
+
diff --git a/content/zh/docs/reference/config-api/apiserver-webhookadmission.v1.md b/content/zh-cn/docs/reference/config-api/apiserver-webhookadmission.v1.md
similarity index 100%
rename from content/zh/docs/reference/config-api/apiserver-webhookadmission.v1.md
rename to content/zh-cn/docs/reference/config-api/apiserver-webhookadmission.v1.md
diff --git a/content/zh/docs/reference/config-api/client-authentication.v1.md b/content/zh-cn/docs/reference/config-api/client-authentication.v1.md
similarity index 100%
rename from content/zh/docs/reference/config-api/client-authentication.v1.md
rename to content/zh-cn/docs/reference/config-api/client-authentication.v1.md
diff --git a/content/zh/docs/reference/config-api/client-authentication.v1beta1.md b/content/zh-cn/docs/reference/config-api/client-authentication.v1beta1.md
similarity index 100%
rename from content/zh/docs/reference/config-api/client-authentication.v1beta1.md
rename to content/zh-cn/docs/reference/config-api/client-authentication.v1beta1.md
diff --git a/content/zh/docs/reference/config-api/kube-proxy-config.v1alpha1.md b/content/zh-cn/docs/reference/config-api/kube-proxy-config.v1alpha1.md
similarity index 100%
rename from content/zh/docs/reference/config-api/kube-proxy-config.v1alpha1.md
rename to content/zh-cn/docs/reference/config-api/kube-proxy-config.v1alpha1.md
diff --git a/content/zh/docs/reference/config-api/kube-scheduler-config.v1beta2.md b/content/zh-cn/docs/reference/config-api/kube-scheduler-config.v1beta2.md
similarity index 100%
rename from content/zh/docs/reference/config-api/kube-scheduler-config.v1beta2.md
rename to content/zh-cn/docs/reference/config-api/kube-scheduler-config.v1beta2.md
diff --git a/content/zh/docs/reference/config-api/kube-scheduler-config.v1beta3.md b/content/zh-cn/docs/reference/config-api/kube-scheduler-config.v1beta3.md
similarity index 100%
rename from content/zh/docs/reference/config-api/kube-scheduler-config.v1beta3.md
rename to content/zh-cn/docs/reference/config-api/kube-scheduler-config.v1beta3.md
diff --git a/content/zh/docs/reference/config-api/kubeadm-config.v1beta2.md b/content/zh-cn/docs/reference/config-api/kubeadm-config.v1beta2.md
similarity index 98%
rename from content/zh/docs/reference/config-api/kubeadm-config.v1beta2.md
rename to content/zh-cn/docs/reference/config-api/kubeadm-config.v1beta2.md
index f34da9f473..bc37e362a7 100644
--- a/content/zh/docs/reference/config-api/kubeadm-config.v1beta2.md
+++ b/content/zh-cn/docs/reference/config-api/kubeadm-config.v1beta2.md
@@ -292,7 +292,7 @@ https://godoc.org/k8s.io/kubelet/config/v1beta1#KubeletConfiguration。
criSocket : "/var/run/dockershim.sock"
taints :
- key : "kubeadmNode"
- value : "master"
+ value : "someValue"
effect : "NoSchedule"
kubeletExtraArgs :
v : 4
@@ -1274,9 +1274,10 @@ cluster information.
tlsBootstrapToken 是 TLS 启动引导过程中使用的令牌。
如果设置了 bootstrapToken,则此字段默认值为 .bootstrapToken.token,
@@ -1783,29 +1784,28 @@ Defaults to the hostname of the node if not provided.
criSocket 用来读取容器运行时的信息。
-此信息会被以注解的方式添加到 Node API 对象至上,用于后续用途。
+此信息会被以注解的方式添加到 Node API 对象之上,用于后续用途。
taints [必需]
[]core/v1.Taint
-
+If this field is unset, i.e. nil, in the kubeadm init process it will be defaulted with
+a control-plane taint for control-plane nodes. If you don't want to taint your control-plane
+node, set this field to an empty list, i.e. taints: [], in the YAML file. This field is
+solely used for Node registration.
+-->
tains 设定 Node API 对象被注册时要附带的污点。
-若未设置此字段(即字段值为 null), 在 kubeadm init 期间,节点与控制面之间的通信。
-默认值为污点默认设置为 taints: ['node-role.kubernetes.io/master:""']。
-如果你不希望为控制面节点设置污点,可以在 YAML 中将此字段设置为空的列表,即
-taints: []。 此字段仅用在 Node 注册期间。
+若未设置此字段(即字段值为 null),在 kubeadm init 期间,默认为控制平面节点添加控制平面污点。
+如果你不想污染你的控制平面节点,可以将此字段设置为空列表(即 YAML 文件中的 taints: []),
+这个字段只用于节点注册。
kubeletExtraArgs [必需]
diff --git a/content/zh/docs/reference/config-api/kubeadm-config.v1beta3.md b/content/zh-cn/docs/reference/config-api/kubeadm-config.v1beta3.md
similarity index 99%
rename from content/zh/docs/reference/config-api/kubeadm-config.v1beta3.md
rename to content/zh-cn/docs/reference/config-api/kubeadm-config.v1beta3.md
index 2a53c835db..ef491a424e 100644
--- a/content/zh/docs/reference/config-api/kubeadm-config.v1beta3.md
+++ b/content/zh-cn/docs/reference/config-api/kubeadm-config.v1beta3.md
@@ -313,7 +313,7 @@ https://godoc.org/k8s.io/kubelet/config/v1beta1#KubeletConfiguration。
criSocket : "/var/run/dockershim.sock"
taints :
- key : "kubeadmNode"
- value : "master"
+ value : "someValue"
effect : "NoSchedule"
kubeletExtraArgs :
v : 4
@@ -1655,15 +1655,17 @@ This information will be annotated to the Node API object, for later re-use[]core/v1.Taint
-
+
tains 设定 Node API 对象被注册时要附带的污点。
-若未设置此字段(即字段值为 null), 在 kubeadm init 期间,节点与控制面之间的通信。默认值为污点默认设置为 taints: ["node-role.kubernetes.io/master:""]。
-如果你不希望为控制面节点设置污点,可以在 YAML 中将此字段设置为空的列表,即
-taints: []。 此字段仅用在 Node 注册期间。
+若未设置此字段(即字段值为 null),在 kubeadm init 期间,默认为控制平面节点添加控制平面污点。
+如果你不想污染你的控制平面节点,可以将此字段设置为空列表(即 YAML 文件中的 taints: []),
+这个字段只用于节点注册。
kubeletExtraArgs
diff --git a/content/zh/docs/reference/config-api/kubelet-config.v1alpha1.md b/content/zh-cn/docs/reference/config-api/kubelet-config.v1alpha1.md
similarity index 87%
rename from content/zh/docs/reference/config-api/kubelet-config.v1alpha1.md
rename to content/zh-cn/docs/reference/config-api/kubelet-config.v1alpha1.md
index ad7e4908f4..9a62ac5ec6 100644
--- a/content/zh/docs/reference/config-api/kubelet-config.v1alpha1.md
+++ b/content/zh-cn/docs/reference/config-api/kubelet-config.v1alpha1.md
@@ -26,8 +26,6 @@ auto_generated: true
-->
**出现在:**
-- [LoggingConfiguration](#LoggingConfiguration)
-
@@ -41,8 +39,8 @@ FormatOptions 包含为不同类型日志格式提供的选项。
JSONOptions
-
- [试验特性] json 中包含 "json" 日志格式的选项。
+
+ [试验特性] json 中包含 "json" 日志格式的选项。
@@ -58,9 +56,9 @@ FormatOptions 包含为不同类型日志格式提供的选项。
- [FormatOptions](#FormatOptions)
-JSONOptions 包含用于 "json" 日志格式的选项。
+JSONOptions 包含用于 "json" 日志格式的选项。
字段 描述
@@ -104,8 +102,6 @@ using split streams. The default is zero, which disables buffering.-->
-->
**出现在:**
-- [LoggingConfiguration](#LoggingConfiguration)
-
## 资源类型
+- [CredentialProviderConfig](#kubelet-config-k8s-io-v1beta1-CredentialProviderConfig)
- [KubeletConfiguration](#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
- [SerializedNodeConfigSource](#kubelet-config-k8s-io-v1beta1-SerializedNodeConfigSource)
+## `CredentialProviderConfig` {#kubelet-config-k8s-io-v1beta1-CredentialProviderConfig}
+
+
+CredentialProviderConfig 包含有关每个 exec 凭据提供者的配置信息。
+Kubelet 从磁盘上读取这些配置信息,并根据 CredentialProvider 类型启用各个提供者。
+
+
+字段 描述
+
+
+apiVersion stringkubelet.config.k8s.io/v1beta1
+kind stringCredentialProviderConfig
+
+
+providers [必需]
+[]CredentialProvider
+
+
+
+
+ providers 是一组凭据提供者插件,这些插件会被 kubelet 启用。
+ 多个提供者可以匹配到同一镜像上,这时,来自所有提供者的凭据信息都会返回给 kubelet。
+ 如果针对同一镜像调用了多个提供者,则结果会被组合起来。如果提供者返回的认证主键有重复,
+ 列表中先出现的提供者所返回的值将被使用。
+
+
+
+
+
+
## `KubeletConfiguration` {#kubelet-config-k8s-io-v1beta1-KubeletConfiguration}
enableServer 会启用 kubelet 的安全服务器。
注意:kubelet 的不安全端口由 readOnlyPort 选项控制。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能会影响到与 kubelet 服务器交互的组件。
默认值:true
@@ -57,77 +93,47 @@ Default: true-->
+Default: ""-->
staticPodPath 是指向要运行的本地(静态)Pod 的目录,
或者指向某个静态 Pod 文件的路径。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑新路径下所给的静态 Pod 集合可能与 kubelet
-启动时所看到的集合不同,而这一差别可能会扰乱节点状态。
- 默认值:""
+ 默认值:""
syncFrequency
-meta/v1.Duration
+meta/v1.Duration
+Default: "1m"-->
syncFrequency 是对运行中的容器和配置进行同步的最长周期。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑缩短这一同步周期可能会带来负面的性能影响,
-尤其当节点上 Pod 个数增加时。相反,增加此周期长度时可能会导致 ConfigMap、
-Secret 这类资源未被及时更新。
- 默认值:"1m"
+ 默认值:"1m"
fileCheckFrequency
-meta/v1.Duration
+meta/v1.Duration
+Default: "20s"-->
fileCheckFrequency 是对配置文件中新数据进行检查的时间间隔值。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑缩短此时长会导致 kubelet 更为频繁地重新加载其静态 Pod 配置,
-而这会带来负面的性能影响。
- 默认值:"20s"
+ 默认值:"20s"
httpCheckFrequency
-meta/v1.Duration
+meta/v1.Duration
httpCheckFrequency 是对 HTTP 服务器上新数据进行检查的时间间隔值。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑缩短此时长会导致 kubelet 更为频繁地轮询
-staticPodURL,而这会带来负面的性能影响。
- 默认值:"20s"
+ 默认值:"20s"
@@ -136,17 +142,10 @@ Default: "20s"
staticPodURL 是访问要运行的静态 Pod 的 URL 地址。
-
当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,新的 URL 上包含的静态 Pod 集合可能与 kubelet
-初始启动时看到的不同,而这种差异可能会扰乱节点状态。
- 默认值:""
+ 默认值:""
@@ -156,16 +155,10 @@ Default: ""
staticPodURLHeader是一个由字符串组成的映射表,其中包含的 HTTP
头部信息用于访问podURL。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,要考虑可能导致无法从staticPodURL
-读取最新的静态 Pod 集合。
默认值:nil
@@ -177,15 +170,10 @@ Default: nil
address 是 kubelet 提供服务所用的 IP 地址(设置为 0.0.0.0
使用所有网络接口提供服务)。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能干扰与 kubelet 服务器交互的组件。
默认值:"0.0.0.0"
@@ -197,15 +185,10 @@ Default: "0.0.0.0"
port 是 kubelet 用来提供服务所使用的端口号。
这一端口号必须介于 1 到 65535 之间,包含 1 和 65535。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能干扰与 kubelet 服务器交互的组件。
默认值:10250
@@ -218,16 +201,11 @@ Default: 10250
no authentication/authorization.
The port number must be between 1 and 65535, inclusive.
Setting this field to 0 disables the read-only service.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may disrupt components that interact with the Kubelet server.
Default: 0 (disabled)
-->
readOnlyPort 是 kubelet 用来提供服务所使用的只读端口号。
此端口上的服务不支持身份认证或鉴权。这一端口号必须介于 1 到 65535 之间,
包含 1 和 65535。将此字段设置为 0 会禁用只读服务。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能干扰与 kubelet 服务器交互的组件。
默认值:0(禁用)
@@ -241,17 +219,12 @@ if any, concatenated after server cert). If tlsCertFile and
tlsPrivateKeyFile are not provided, a self-signed certificate
and key are generated for the public address and saved to the directory
passed to the Kubelet's --cert-dir flag.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may disrupt components that interact with the Kubelet server.
Default:"quot;
-->
tlsCertFile是包含 HTTPS 所需要的 x509 证书的文件
(如果有 CA 证书,会串接到服务器证书之后)。如果tlsCertFile
和tlsPrivateKeyFile都没有设置,则系统会为节点的公开地址生成自签名的证书和私钥,
并将其保存到 kubelet --cert-dir参数所指定的目录下。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能干扰与 kubelet 服务器交互的组件。
默认值:""
@@ -261,15 +234,10 @@ Default:"quot;
tlsPrivateKeyFile是一个包含与tlsCertFile
证书匹配的 X509 私钥的文件。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能干扰与 kubelet 服务器交互的组件。
默认值:""
@@ -280,15 +248,10 @@ Default: ""
tlsCipherSuites是一个字符串列表,其中包含服务器所接受的加密包名称。
列表中的每个值来自于tls包中定义的常数(https://golang.org/pkg/crypto/tls/#pkg-constants)。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能干扰到与 kubelet 服务器交互的组件。
默认值:nil
@@ -299,15 +262,10 @@ Default: nil
tlsMinVersion给出所支持的最小 TLS 版本。
字段取值来自于tls包中的常数定义(https://golang.org/pkg/crypto/tls/#pkg-constants)。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能干扰到与 kubelet 服务器交互的组件。
默认值:""
@@ -319,17 +277,10 @@ Default: ""
rotateCertificates用来启用客户端证书轮换。kubelet 会调用
certificates.k8s.io API 来请求新的证书。需要有一个批复人批准证书签名请求。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑禁用此行为时可能导致 kubelet 无法在当前证书过期时向
-API 服务器执行身份认证。
默认值:false
@@ -343,20 +294,12 @@ signing a serving certificate, the Kubelet will request a certificate from
the 'certificates.k8s.io' API. This requires an approver to approve the
certificate signing requests (CSR). The RotateKubeletServerCertificate feature
must be enabled when setting this field.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-disabling it will stop the renewal of Kubelet server certificates, which can
-disrupt components that interact with the Kubelet server in the long term,
-due to certificate expiration.
Default: false
-->
serverTLSBootstrap用来启用服务器证书引导。系统不再使用自签名的服务证书,
kubelet 会调用certificates.k8s.io API 来请求证书。
需要有一个批复人来批准证书签名请求(CSR)。
设置此字段时,RotateKubeletServerCertificate特性必须被启用。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑禁用此特性会导致 kubelet 的服务器证书无法被续约,
-长期上这会干扰到与 kubelet 服务器交互的组件,因为证书会过期。
默认值:false
@@ -366,26 +309,21 @@ kubelet 会调用certificates.k8s.io API 来请求证书。
authorization设置发送给 kubelet 服务器的请求是如何进行身份认证的。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能干扰与 kubelet 服务器交互的组件。
默认值:
anonymous:
enabled: false
webhook:
enabled: true
- cacheTTL: "2m"
+ cacheTTL: "2m"
@@ -395,24 +333,19 @@ Defaults:
authorization设置发送给 kubelet 服务器的请求是如何进行鉴权的。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能会干扰到与 kubelet 服务器交互的组件。
默认值:
mode: Webhook
webhook:
- cacheAuthorizedTTL: "5m"
- cacheUnauthorizedTTL: "30s"
+ cacheAuthorizedTTL: "5m"
+ cacheUnauthorizedTTL: "30s"
@@ -424,16 +357,10 @@ Defaults:
registryPullQPS是每秒钟可以执行的镜像仓库拉取操作限值。
此值必须不能为负数。将其设置为 0 表示没有限值。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑这类更新可能会因为镜像拉取所产生的流量变化而导致集群可扩缩能力问题。
默认值:5
@@ -446,17 +373,11 @@ Default: 5
pulls to burst to this number, while still not exceeding registryPullQPS.
The value must not be a negative number.
Only used if registryPullQPS is greater than 0.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may impact scalability by changing the amount of traffic produced
-by image pulls.
Default: 10
-->
registryBurst是突发性镜像拉取的上限值,允许镜像拉取临时上升到所指定数量,
不过仍然不超过registryPullQPS所设置的约束。此值必须是非负值。
只有registryPullQPS参数值大于 0 时才会使用此设置。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能因为镜像拉取所造成的流量变化,导致集群可扩缩能力受影响。
默认值:10
@@ -467,16 +388,10 @@ Default: 10
eventRecordQPS设置每秒钟可创建的事件个数上限。如果此值为 0,
则表示没有限制。此值不能设置为负数。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能因为生成事件所造成的流量变化,导致集群可扩缩能力受影响。
默认值:5
@@ -485,21 +400,16 @@ Default: 5
int32
-
eventBurst是突发性事件创建的上限值,允许事件创建临时上升到所指定数量,
不过仍然不超过eventRecordQPS所设置的约束。此值必须是非负值,
-且只有eventRecordQPS大于 0 时才会使用此设置。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能因为事件创建所造成的流量变化,导致集群可扩缩能力受影响。
+且只有eventRecordQPS > 0 时才会使用此设置。
默认值:10
@@ -511,16 +421,11 @@ Default: 10
enableDebuggingHandlers启用服务器上用来访问日志、
在本地运行容器和命令的端点,包括exec、attach、
logs和portforward等功能。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑禁用此能力可能干扰到与 kubelet 服务器交互的组件。
默认值:true
@@ -529,16 +434,12 @@ Default: true
bool
-
enableContentionProfiling用于启用锁竞争性能分析,
仅用于enableDebuggingHandlers为true的场合。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑启用此分析可能隐含着一定的性能影响。
默认值:false
@@ -547,17 +448,13 @@ Default: false
int32
-
healthzPort是本地主机上提供healthz端点的端口
(设置值为 0 时表示禁止)。合法值介于 1 和 65535 之间。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能干扰到监控 kubelet 健康状况的组件。
默认值:10248
@@ -566,15 +463,11 @@ Default: 10248
string
-
healthzBindAddress是healthz服务器用来提供服务的 IP 地址。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能影响到监测 kubelet 健康状况的组件。
默认值:"127.0.0.1"
@@ -585,15 +478,10 @@ Default: "127.0.0.1"
oomScoreAdj 是为 kubelet 进程设置的oom-score-adj值。
所设置的取值要在 [-1000, 1000] 范围之内。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能影响到内存压力较大时节点的稳定性。
默认值:-999
@@ -605,14 +493,10 @@ Default: -999
clusterDomain是集群的 DNS 域名。如果设置了此字段,kubelet
会配置所有容器,使之在搜索主机的搜索域的同时也搜索这里指定的 DNS 域。
- DynamicKubeletConfig (已弃用,默认为关闭):
-不建议动态更新此字段,因为这一设置值要与整个集群中的其他组件保持一致。
默认值:""
@@ -624,43 +508,30 @@ Default: ""
clusterDNS是集群 DNS 服务器的 IP 地址的列表。
如果设置了,kubelet 将会配置所有容器使用这里的 IP 地址而不是宿主系统上的 DNS
服务器来完成 DNS 解析。
-
当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑变更仅会对更新后创建的 Pod 起作用。建议在更改此字段之前腾空节点。
默认值:nil
streamingConnectionIdleTimeout
-meta/v1.Duration
+meta/v1.Duration
streamingConnectionIdleTimeout设置流式连接在被自动关闭之前可以空闲的最长时间。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能影响到依赖于通过与 kubelet
-服务器间流式连接来接受非频繁更新事件的组件。
默认值:"4h"
nodeStatusUpdateFrequency
-meta/v1.Duration
+meta/v1.Duration
nodeStatusUpdateFrequency是 kubelet 计算节点状态的频率。
如果未启用节点租约特性,这一字段设置的也是 kubelet 向控制面投递节点状态的频率。
注意:如果节点租约特性未被启用,更改此参数设置时要非常小心,
所设置的参数值必须与节点控制器的nodeMonitorGracePeriod协同。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑变更可能影响节点的可扩缩性。还要注意节点控制器的
-nodeMonitorGracePeriod必须设置为N∗nodeStatusUpdateFrequency,
-其中N是节点控制器标记节点不健康之前执行重试的次数。
默认值:"10s"
nodeStatusReportFrequency
-meta/v1.Duration
+meta/v1.Duration
nodeLeaseDurationSeconds是 kubelet 会在其对应的 Lease 对象上设置的时长值。
@@ -735,27 +592,19 @@ Default: 40
如果租约过期,则节点可被视作不健康。根据 KEP-0009 约定,目前的租约每 10 秒钟续约一次。
在将来,租约的续约时间间隔可能会根据租约的时长来设置。
此字段的取值必须大于零。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑缩短租约期限可能降低节点对那些暂时导致 kubelet
-无法续约的问题的容忍度(例如,时延很短的网络问题)。
默认值:40
imageMinimumGCAge
-meta/v1.Duration
+meta/v1.Duration
imageMinimumGCAge是对未使用镜像进行垃圾搜集之前允许其存在的时长。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑这种变更可能触发垃圾收集或者延迟垃圾收集,
-并且可能影响节点上镜像的额外开销。
默认值:"2m"
@@ -769,19 +618,12 @@ image garbage collection is always run. The percent is calculated by
dividing this field value by 100, so this field must be between 0 and
100, inclusive. When specified, the value must be greater than
imageGCLowThresholdPercent.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may trigger or delay garbage collection, and may change the image overhead
-on the node.
Default: 85
-->
imageGCHighThresholdPercent所给的是镜像的磁盘用量百分数,
一旦镜像用量超过此阈值,则镜像垃圾收集会一直运行。百分比是用这里的值除以 100
得到的,所以此字段取值必须介于 0 和 100 之间,包括 0 和 100。如果设置了此字段,
则取值必须大于imageGCLowThresholdPercent取值。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑这种变更可能触发垃圾收集或者延迟垃圾收集,
-并且可能影响节点上镜像的额外开销。
默认值:85
@@ -795,37 +637,25 @@ image garbage collection is never run. Lowest disk usage to garbage
collect to. The percent is calculated by dividing this field value by 100,
so the field value must be between 0 and 100, inclusive. When specified, the
value must be less than imageGCHighThresholdPercent.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may trigger or delay garbage collection, and may change the image overhead
-on the node.
Default: 80
-->
imageGCLowThresholdPercent所给的是镜像的磁盘用量百分数,
镜像用量低于此阈值时不会执行镜像垃圾收集操作。垃圾收集操作也将此作为最低磁盘用量边界。
百分比是用这里的值除以 100 得到的,所以此字段取值必须介于 0 和 100 之间,包括 0 和 100。
如果设置了此字段,则取值必须小于imageGCHighThresholdPercent取值。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑这种变更可能触发垃圾收集或者延迟垃圾收集,
-并且可能影响节点上镜像的额外开销。
默认值:80
volumeStatsAggPeriod
-meta/v1.Duration
+meta/v1.Duration
volumeStatsAggPeriod是计算和缓存所有 Pod 磁盘用量的频率。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑缩短此周期长度可能产生性能影响。
默认值:"1m"
@@ -835,13 +665,9 @@ Default: "1m"
kubeletCgroups是用来隔离 kubelet 的控制组(CGroup)的绝对名称。
- DynamicKubeletConfig (已弃用):
-更新此字段时需要对整个节点执行重启。最安全的做法是确保此值与本地配置相同。
默认值:""
@@ -854,15 +680,11 @@ Default: ""
all non-kernel processes that are not already in a container. Empty
for no container. Rolling back the flag requires a reboot.
The cgroupRoot must be specified if this field is not empty.
-Dynamic Kubelet Config (deprecated): This field should not be updated without a full node
-reboot. It is safest to keep this value the same as the local config.
Default: "&qout;
-->
systemCgroups是用来放置那些未被容器化的、非内核的进程的控制组
(CGroup)的绝对名称。设置为空字符串表示没有这类容器。回滚此字段设置需要重启节点。
当此字段非空时,必须设置cgroupRoot字段。
- DynamicKubeletConfig (已弃用):
-更新此字段时需要对整个节点执行重启。最安全的做法是确保此值与本地配置相同。
默认值:""
@@ -873,15 +695,9 @@ Default: "&qout;
cgroupRoot是用来运行 Pod 的控制组 (CGroup)。
容器运行时会尽可能处理此字段的设置值。
- DynamicKubeletConfig (已弃用):
-更新此字段时需要对整个节点执行重启。最安全的做法是确保此值与本地配置相同。
- 默认值:""
@@ -892,15 +708,11 @@ Default: ""
cgroupsPerQOS用来启用基于 QoS 的控制组(CGroup)层次结构:
顶层的控制组用于不同 QoS 类,所有Burstable和BestEffort Pod
都会被放置到对应的顶级 QoS 控制组下。
- DynamicKubeletConfig (已弃用):
-更新此字段时需要对整个节点执行重启。最安全的做法是确保此值与本地配置相同。
默认值:true
@@ -911,14 +723,10 @@ Default: true
cgroupDriver是 kubelet 用来操控宿主系统上控制组 (CGroup)
的驱动程序(cgroupfs 或 systemd)。
- DynamicKubeletConfig (已弃用):
-更新此字段时需要对整个节点执行重启。最安全的做法是确保此值与本地配置相同。
默认值:"cgroupfs"
@@ -929,14 +737,10 @@ Default: "cgroupfs"
cpuManagerPolicy是要使用的策略名称。需要启用CPUManager
特性门控。
- DynamicKubeletConfig (已弃用):
-更新此字段时需要对整个节点执行重启。最安全的做法是确保此值与本地配置相同。
默认值:"None"
@@ -947,36 +751,26 @@ Default: "None"
cpuManagerPolicyOptions是一组key=value键值映射,
容许通过额外的选项来精细调整 CPU 管理器策略的行为。需要CPUManager和
CPUManagerPolicyOptions两个特性门控都被启用。
- DynamicKubeletConfig (已弃用):
-更新此字段时需要对整个节点执行重启。最安全的做法是确保此值与本地配置相同。
默认值:nil
cpuManagerReconcilePeriod
-meta/v1.Duration
+meta/v1.Duration
cpuManagerReconcilePeriod是 CPU 管理器的协调周期时长。
需要启用CPUManager特性门控。
- DynamicKubeletConfig (已弃用):
-
当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑缩短周期时长可能带来的性能影响。
默认值:"10s"
@@ -987,14 +781,10 @@ Default: "10s"
memoryManagerPolicy是内存管理器要使用的策略的名称。
要求启用MemoryManager特性门控。
- DynamicKubeletConfig (已弃用):
-更新此字段时需要对整个节点执行重启。最安全的做法是确保此值与本地配置相同。
默认值:"none"
@@ -1016,8 +806,6 @@ resources;
of CPU and device resources.
Policies other than "none" require the TopologyManager feature gate to be enabled.
-Dynamic Kubelet Config (deprecated): This field should not be updated without a full node
-reboot. It is safest to keep this value the same as the local config.
Default: "none"
-->
topologyManagerPolicy是要使用的拓扑管理器策略名称。合法值包括:
@@ -1028,8 +816,6 @@ Default: "none"
single-numa-node:kubelet 仅允许在 CPU 和设备资源上对齐到同一 NUMA 节点的 Pod。
如果策略不是 "none",则要求启用TopologyManager特性门控。
- DynamicKubeletConfig (已弃用):
-更新此字段时需要对整个节点执行重启。最安全的做法是确保此值与本地配置相同。
默认值:"none"
@@ -1068,34 +854,25 @@ the minimum percentage of a resource reserved for exclusive use by the
guaranteed QoS tier.
Currently supported resources: "memory"
Requires the QOSReserved feature gate to be enabled.
-Dynamic Kubelet Config (deprecated): This field should not be updated without a full node
-reboot. It is safest to keep this value the same as the local config.
Default: nil
-->
qosReserved是一组从资源名称到百分比值的映射,用来为Guaranteed
QoS 类型的负载预留供其独占使用的资源百分比。目前支持的资源为:"memory"。
需要启用QOSReserved特性门控。
- DynamicKubeletConfig (已弃用):
-更新此字段时需要对整个节点执行重启。最安全的做法是确保此值与本地配置相同。
默认值:nil
runtimeRequestTimeout
-meta/v1.Duration
+meta/v1.Duration
runtimeRequestTimeout用来设置除长期运行的请求(pull、
logs、exec和attach)之外所有运行时请求的超时时长。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能干扰与 kubelet 服务器交互的组件。
默认值:"2m"
@@ -1123,15 +900,10 @@ themselves if they should try to access their own Service. Values:
一般而言,用户必须设置--hairpin-mode=hairpin-veth才能实现发夹模式的网络地址转译
(NAT),因为混杂模式的网桥要求存在一个名为cbr0的容器网桥。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑取决于网络插件,可能需要重启节点。
默认值:"promiscuous-bridge"
@@ -1142,20 +914,9 @@ Default: "promiscuous-bridge"
maxPods是此 kubelet 上课运行的 Pod 个数上限。此值必须为非负整数。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑变更可能导致 kubelet 重启时 Pod 无法被准入,
-而且可能改变Node.status.capacity[v1.ResourcePods]中报告的数值,
-从而影响将来的调度决策。增大此个数值也可能会降低性能,因为会有更多的 Pod
-塞到同一节点运行。
默认值:110
@@ -1166,15 +927,10 @@ Default: 110
podCIDR是用来设置 Pod IP 地址的 CIDR 值,仅用于独立部署模式。
运行于集群模式时,这一数值会从控制面获得。
- DynamicKubeletConfig (已弃用):
-此字段应该总是设置为默认的空字符串值。并且仅用来设置独立运行的 kubelet,
-因为这种 kubelet 模式下无法利用动态 kubelet 配置能力。
默认值:""
@@ -1184,14 +940,9 @@ Default: ""
podPidsLimit是每个 Pod 中可使用的 PID 个数上限。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑减小此值可能会导致变更后无法创建容器进程。
默认值:-1
@@ -1202,17 +953,11 @@ Default: -1
resolvConf是一个域名解析配置文件,用作容器 DNS 解析配置的基础。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑变更仅会对更新完成后所创建的 Pod 起作用。
-建议在变更此字段之前先腾空节点。如果此值设置为空字符串,则会覆盖 DNS 解析的默认配置,
+
如果此值设置为空字符串,则会覆盖 DNS 解析的默认配置,
本质上相当于禁用了 DNS 查询。
默认值:"/etc/resolv.conf"
@@ -1238,37 +983,25 @@ Default: false
cpuCFSQuota允许为设置了 CPU 限制的容器实施 CPU CFS 配额约束。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑禁止此功能可能会降低节点稳定性。
默认值:true
cpuCFSQuotaPeriod
-meta/v1.Duration
+meta/v1.Duration
cpuCFSQuotaPeriod设置 CPU CFS 配额周期值,cpu.cfs_period_us。
此值需要介于 1 微秒和 1 秒之间,包含 1 微秒和 1 秒。
此功能要求启用CustomCPUCFSQuotaPeriod特性门控被启用。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑为容器所设置的限制值可能导致cpu.cfs_period_us
-设置发生变化。这一变化会在节点被重新配置时触发容器重启。
默认值:"100ms"
@@ -1280,16 +1013,11 @@ Default: "100ms"
nodeStatusMaxImages限制Node.status.images中报告的镜像数量。
此值必须大于 -2。
注意:如果设置为 -1,则不会对镜像数量做限制;如果设置为 0,则不会返回任何镜像。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑节点状态中可能报告不同的数值。
默认值:50
@@ -1300,14 +1028,9 @@ Default: 50
maxOpenFiles是 kubelet 进程可以打开的文件个数。此值必须不能为负数。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能影响到 kubelet 与节点文件系统间交互的能力。
默认值:1000000
@@ -1317,18 +1040,9 @@ Default: 1000000
contentType是向 API 服务器发送请求时使用的内容类型。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑这样做可能影响 kubelet 与 API 服务器通信的能力。
-如果 kubelet 因为此字段的变更而失去与 API 服务器间的连接,
-则之前所作的变更无法通过动态 kubelet 配置来实现回退。
默认值:"application/vnd.kubernetes.protobuf"
@@ -1338,15 +1052,9 @@ Default: "application/vnd.kubernetes.protobuf"
kubeAPIQPS设置与 Kubernetes API 服务器通信时要使用的 QPS(每秒查询数)。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑这可能因为 kubelet 与 API 服务器之间流量的变化而影响集群扩缩能力。
默认值:5
@@ -1357,16 +1065,10 @@ Default: 5
kubeAPIBurst设置与 Kubernetes API 服务器通信时突发的流量级别。
此字段取值不可以是负数。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑这可能因为 kubelet 与 API 服务器之间流量的变化而影响集群扩缩能力。
默认值:10
@@ -1379,16 +1081,11 @@ Default: 10
at a time. We recommend ∗not∗ changing the default value on nodes that
run docker daemon with version < 1.9 or an Aufs storage backend.
Issue #10959 has more details.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may impact the performance of image pulls.
Default: true
-->
serializeImagePulls被启用时会通知 kubelet 每次仅拉取一个镜像。
我们建议不要 在所运行的 docker 守护进程版本低于 1.9、使用 aufs
存储后端的节点上更改默认值。详细信息可参见 Issue #10959。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑这可能会影响镜像拉取的性能。
默认值:true
@@ -1400,26 +1097,21 @@ Default: true
evictionHard是一个映射,是从信号名称到定义硬性驱逐阈值的映射。
例如:{"memory.available": "300Mi"}。
如果希望显式地禁用,可以在任意资源上将其阈值设置为 0% 或 100%。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑这可能会触发或延迟 Pod 驱逐操作。
默认值:
- memory.available: "100Mi"
- nodefs.available: "10%"
- nodefs.inodesFree: "5%"
- imagefs.available: "15%"
+ memory.available: "100Mi"
+ nodefs.available: "10%"
+ nodefs.inodesFree: "5%"
+ imagefs.available: "15%"
@@ -1430,17 +1122,10 @@ Default:
evictionSoft是一个映射,是从信号名称到定义软性驱逐阈值的映射。
例如:{"memory.available": "300Mi"}。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑这可能会触发或延迟 Pod 驱逐操作,
-并且可能造成节点所报告的可分配资源数量发生变化。
默认值:nil
@@ -1451,34 +1136,24 @@ Default: nil
evictionSoftGracePeriod是一个映射,是从信号名称到每个软性驱逐信号的宽限期限。
例如:{"memory.available": "30s"}。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑这可能会触发或延迟 Pod 驱逐操作。
默认值:nil
evictionPressureTransitionPeriod
-meta/v1.Duration
+meta/v1.Duration
evictionPressureTransitionPeriod设置 kubelet
离开驱逐压力状况之前必须要等待的时长。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑减少此字段值可能会在节点过量分配时降低节点稳定性。
默认值:"5m"
@@ -1493,10 +1168,6 @@ effectively caps the Pod's terminationGracePeriodSeconds value during soft evict
Note: Due to issue #64530, the behavior has a bug where this value currently just
overrides the grace period during soft eviction, which can increase the grace
period from what is set on the Pod. This bug will be fixed in a future release.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-lowering it decreases the amount of time Pods will have to gracefully clean
-up before being killed during a soft eviction.
Default: 0
-->
evictionMaxPodGracePeriod是指达到软性逐出阈值而引起 Pod 终止时,
@@ -1505,9 +1176,6 @@ Pod 可以获得的terminationGracePeriodSeconds。
注意:由于 Issue #64530 的原因,系统中存在一个缺陷,即此处所设置的值会在软性逐出时覆盖
Pod 的宽限期设置,从而有可能增加 Pod 上原本设置的宽限期限时长。
这个缺陷会在未来版本中修复。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑缩短此宽限期限值会导致软性逐出期间 Pod
-在被杀死之前用来体面地完成清理工作可用的时间。
默认值:0
@@ -1520,16 +1188,11 @@ Pod 的宽限期设置,从而有可能增加 Pod 上原本设置的宽限期
which describe the minimum amount of a given resource the kubelet will reclaim when
performing a pod eviction while that resource is under pressure.
For example: {"imagefs.available": "2Gi"}.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may change how well eviction can manage resource pressure.
Default: nil
-->
evictionMinimumReclaim是一个映射,定义信号名称与最小回收量数值之间的关系。
最小回收量指的是资源压力较大而执行 Pod 驱逐操作时,kubelet 对给定资源的最小回收量。
例如:{"imagefs.available": "2Gi"}。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑这可能会改变驱逐操作应对资源压力的效果。
默认值:nil
@@ -1541,20 +1204,10 @@ Default: nil
podsPerCore设置的是每个核上 Pod 个数上限。此值不能超过maxPods。
所设值必须是非负整数。如果设置为 0,则意味着对 Pod 个数没有限制。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑变更可能导致 kubelet 重启时 Pod 无法被准入,
-还可能导致Node.status.capacity.pods所报告的数值发生变化,
-进而影响到将来的调度决策。增大此值也会降低性能,因为在同一个处理器核上需要运行更多的 Pod。
默认值:0
@@ -1566,24 +1219,15 @@ Default: 0
enableControllerAttachDetach用来允许 Attach/Detach
控制器管理调度到本节点的卷的挂接(attachment)和解除挂接(detachement),
并且禁止 kubelet 执行任何 attach/detach 操作。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑在运行中的节点上更改由哪个组件来负责卷管理时,
-这一变更可能导致节点在被更新前尚未腾空时卷无法被解除挂接。
-如果 kubelet 尚未更新volumes.kubernetes.io/controller-managed-attach-detach
-注解时 Pod 已经被调度到了该节点,节点上的卷也会无法解除挂接。
-一般而言,最安全的做法是将此字段设置为与本地配置相同的值。
+ 注意:kubelet 不支持挂接 CSI 卷和解除挂接,
+因此对于该用例,此选项必须为 true。
默认值:true
@@ -1595,18 +1239,11 @@ Default: true
protectKernelDefaults设置为true时,会令 kubelet
在发现内核参数与预期不符时出错退出。若此字段设置为false,则 kubelet
会尝试更改内核参数以满足其预期。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑启用此设置会在内核参数与 kubelet 预期不匹配时导致
-kubelet 进入崩溃循环(Crash-Loop)状态。
默认值:false
@@ -1619,18 +1256,12 @@ kubelet 进入崩溃循环(Crash-Loop)状态。
are present on host.
These rules will serve as utility rules for various components, e.g. kube-proxy.
The rules will be created based on iptablesMasqueradeBit and iptablesDropBit.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-disabling it will prevent the Kubelet from healing locally misconfigured iptables rules.
Default: true
-->
makeIPTablesUtilChains设置为true时,相当于允许 kubelet
确保一组 iptables 规则存在于宿主机上。这些规则会为不同的组件(例如 kube-proxy)
提供工具性质的规则。它们是基于iptablesMasqueradeBit和iptablesDropBit
来创建的。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑禁用此行为会导致 kubelet 无法在本地 iptables
-规则出错时实现自愈。
默认值:true
@@ -1643,18 +1274,11 @@ Default: true
Values must be within the range [0, 31]. Must be different from other mark bits.
Warning: Please match the value of the corresponding parameter in kube-proxy.
TODO: clean up IPTablesMasqueradeBit in kube-proxy.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it needs to be coordinated with other components, like kube-proxy, and the update
-will only be effective if MakeIPTablesUtilChains is enabled.
Default: 14
-->
iptablesMasqueradeBit是 iptables fwmark 空间中用来为 SNAT
作标记的位。此值必须介于[0, 31]区间,必须与其他标记位不同。
警告:请确保此值设置与 kube-proxy 中对应的参数设置取值相同。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑此处的变更要与其他组件(如 kube-proxy)相应的变更协调一致。
-只有当makeIPTablesUtilChains能力被启用时,这里的更新才会起作用。
默认值:14
@@ -1665,17 +1289,10 @@ Default: 14
iptablesDropBit是 iptables fwmark 空间中用来标记丢弃包的数据位。
此值必须介于[0, 31]区间,必须与其他标记位不同。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑此处的变更要与其他组件(如 kube-proxy)相应的变更协调一致。
-只有当makeIPTablesUtilChains能力被启用时,这里的更新才会起作用。
默认值:15
@@ -1686,22 +1303,12 @@ Default: 15
featureGates是一个从功能特性名称到布尔值的映射,用来启用或禁用实验性的功能。
此字段可逐条更改文件 "k8s.io/kubernetes/pkg/features/kube_features.go"
中所给的内置默认值。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑你所启用或禁止的功能特性的文档。
-尽管我们鼓励功能特性的开发人员使动态启用或禁用功能特性成为可能,
-某些变更可能要求重新启动节点,某些特性可能要求在从启用到禁用切换时作出精细的协调。
默认值:nil
@@ -1711,14 +1318,9 @@ Default: nil
failSwapOn通知 kubelet 在节点上启用交换分区时拒绝启动。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑缩短此周期长度可能产生性能影响。
默认值:true
@@ -1739,15 +1341,10 @@ Default: true
containerLogMaxSize是定义容器日志文件被轮转之前可以到达的最大尺寸。
例如:"5Mi" 或 "256Ki"。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能会触发日志轮转。
默认值:"10Mi"
@@ -1758,14 +1355,9 @@ Default: "10Mi"
containerLogMaxFiles设置每个容器可以存在的日志文件个数上限。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑降低此值可能导致日志文件被删除。
默认值:"5"
@@ -1803,20 +1395,11 @@ managers are running. Valid values include:
pairs that describe resources reserved for non-kubernetes components.
Currently only cpu and memory are supported.
See http://kubernetes.io/docs/user-guide/compute-resources for more detail.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may not be possible to increase the reserved resources, because this
-requires resizing cgroups. Always look for a NodeAllocatableEnforced event
-after updating this field to ensure that the update was successful.
Default: nil
-->
systemReserved是一组资源名称=资源数量对,
用来描述为非 Kubernetes 组件预留的资源(例如:'cpu=200m,memory=150G')。
目前仅支持 CPU 和内存。更多细节可参见 http://kubernetes.io/zh/docs/user-guide/compute-resources。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑增加预留资源也许是不可能的,因为需要改变控制组大小。
-在更改了此字段之后,应该总是关注NodeAllocatableEnforced事件,
-以确保更新是成功的。
默认值:Nil
@@ -1830,21 +1413,12 @@ that describe resources reserved for kubernetes system components.
Currently cpu, memory and local storage for root file system are supported.
See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
for more details.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-it may not be possible to increase the reserved resources, because this
-requires resizing cgroups. Always look for a NodeAllocatableEnforced event
-after updating this field to ensure that the update was successful.
Default: nil
-->
kubeReserved是一组资源名称=资源数量对,
用来描述为 Kubernetes 系统组件预留的资源(例如:'cpu=200m,memory=150G')。
目前支持 CPU、内存和根文件系统的本地存储。
更多细节可参见 https://kubernetes.io/zh/docs/concepts/configuration/manage-resources-containers/。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑增加预留资源也许是不可能的,因为需要改变控制组大小。
-在更改了此字段之后,应该总是关注NodeAllocatableEnforced事件,
-以确保更新是成功的。
默认值:Nil
@@ -1893,18 +1467,14 @@ Default: ""
systemReservedCgroup帮助 kubelet 识别用来为 OS 系统级守护进程实施
systemReserved计算资源预留时使用的顶级控制组(CGroup)。
-参考[Node Allocatable](https://git.k8s.io/community/contributors/design-proposals/node/node-allocatable.md)
+参考 Node Allocatable
以了解详细信息。
- DynamicKubeletConfig(已弃用):
-此字段更新时需要整个节点重启。最安全的做法是保持此值与本地配置相同。
默认值:""
@@ -1916,18 +1486,14 @@ Default: ""
kubeReservedCgroup 帮助 kubelet 识别用来为 Kubernetes 节点系统级守护进程实施
kubeReserved计算资源预留时使用的顶级控制组(CGroup)。
-参阅Node Allocatable
+参阅 Node Allocatable
了解进一步的信息。
- DynamicKubeletConfig(已弃用):
-此字段更新时需要整个节点重启。最安全的做法是保持此值与本地配置相同。
默认值:""
@@ -1945,13 +1511,6 @@ When kube-reserved is in the list, kubeReservedCgroup must be speci
This field is supported only when cgroupsPerQOS is set to true.
Refer to Node Allocatable
for more information.
-If DynamicKubeletConfig (deprecated; default off) is on, when
-dynamically updating this field, consider that
-removing enforcements may reduce the stability of the node. Alternatively, adding
-enforcements may reduce the stability of components which were using more than
-the reserved amount of resources; for example, enforcing kube-reserved may cause
-Kubelets to OOM if it uses more than the reserved resources, and enforcing system-reserved
-may cause system daemons to OOM if they use more than the reserved resources.
Default: ["pods"]
-->
此标志设置 kubelet 需要执行的各类节点可分配资源策略。此字段接受一组选项列表。
@@ -1963,11 +1522,6 @@ Default: ["pods"]
这个字段只有在cgroupsPerQOS被设置为true才被支持。
参阅Node Allocatable
了解进一步的信息。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑去掉此机制可能会降低节点稳定性。
-反之,添加此机制可能会降低原来使用资源超出预留量的组件的稳定性。
-例如,实施 kube-reserved 在 kubelet 使用资源超出预留量时可能导致 kubelet 发生 OOM,
-而实施 system-reserved 机制可能导致使用资源超出预留量的系统守护进程发生 OOM。
默认值:["pods"]
@@ -1996,14 +1550,9 @@ Default: []
volumePluginDir是用来搜索其他第三方卷插件的目录的路径。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑更改volumePluginDir可能干扰使用第三方卷插件的负载。
默认值:"/usr/libexec/kubernetes/kubelet-plugins/volume/exec/"
@@ -2014,15 +1563,10 @@ Default: "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/"
providerID字段被设置时,指定的是一个外部提供者(即云驱动)实例的唯一 ID,
该提供者可用来唯一性地标识特定节点。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑可能影响到 kubelet 与云驱动之间进行交互的能力。
默认值:""
@@ -2034,15 +1578,10 @@ Default: "quot;
kernelMemcgNotification字段如果被设置了,会告知 kubelet 集成内核的
memcg 通知机制来确定是否超出内存逐出阈值,而不是使用轮询机制来判定。
- 当 DynamicKubeletConfig (已弃用,默认为关闭)被启用时,
-如果动态更新了此字段,请考虑这样做可能影响到 kubelet 与内核的交互方式。
默认值:false
@@ -2078,7 +1617,7 @@ Default: true
shutdownGracePeriod
-meta/v1.Duration
+meta/v1.Duration
+list when the node is shutting down.
+For example, to allow critical pods 10s to shutdown, priority>=10000 pods 20s to
+shutdown, and all remaining pods 30s to shutdown.
+-->
shutdownGracePeriodByPodPriority设置基于 Pod
相关的优先级类值而确定的体面关闭时间。当 kubelet 收到关闭请求的时候,kubelet
会针对节点上运行的所有 Pod 发起关闭操作,这些关闭操作会根据 Pod 的优先级确定其宽限期限,
@@ -2140,6 +1683,15 @@ list when the node is shutting down.-->
priority: 0
shutdownGracePeriodSeconds: 30
+
在退出之前,kubelet 要等待的时间上限为节点上所有优先级类的
shutdownGracePeriodSeconds的最大值。
当所有 Pod 都退出或者到达其宽限期限时,kubelet 会释放关闭防护锁。
@@ -2314,6 +1866,202 @@ SerializedNodeConfigSource 允许对 `v1.NodeConfigSource` 执行序列化操作
+## `CredentialProvider` {#kubelet-config-k8s-io-v1beta1-CredentialProvider}
+
+
+**出现在:**
+
+- [CredentialProviderConfig](#kubelet-config-k8s-io-v1beta1-CredentialProviderConfig)
+
+
+CredentialProvider 代表的是要被 kubelet 调用的一个 exec 插件。
+这一插件只会在所拉取的镜像与该插件所处理的镜像匹配时才会被调用(参见 matchImages)。
+
+
+字段 描述
+
+
+name [必需]
+string
+
+
+
+
+ name 是凭据提供者的名称(必需)。此名称必须与 kubelet
+ 所看到的提供者可执行文件的名称匹配。可执行文件必须位于 kubelet 的
+ bin 目录(通过 --image-credential-provider-bin-dir 设置)下。
+
+
+
+matchImages [必需]
+[]string
+
+
+
+matchImages 是一个必须设置的字符串列表,用来匹配镜像以便确定是否要调用此提供者。
+如果字符串之一与 kubelet 所请求的镜像匹配,则此插件会被调用并给予提供凭证的机会。
+镜像应该包含镜像库域名和 URL 路径。
+
+matchImages 中的每个条目都是一个模式字符串,其中可以包含端口号和路径。
+域名部分可以包含统配符,但端口或路径部分不可以。通配符可以用作子域名,例如
+'*.k8s.io' 或 'k8s.*.io',以及顶级域名,如 'k8s.*'。
+对类似 'app*.k8s.io' 这类部分子域名的匹配也是支持的。
+每个通配符只能用来匹配一个子域名段,所以 '*.io' 不会匹配 '*.k8s.io'。
+
+镜像与 matchImages 之间存在匹配时,以下条件都要满足:
+
+
+ 二者均包含相同个数的域名部分,并且每个域名部分都对应匹配;
+ matchImages 条目中的 URL 路径部分必须是目标镜像的 URL 路径的前缀;
+ 如果 matchImages 条目中包含端口号,则端口号也必须与镜像端口号匹配。
+
+
+matchImages 的一些示例如下:
+
+123456789.dkr.ecr.us-east-1.amazonaws.com
+*.azurecr.io
+gcr.io
+. .registry.io
+registry.io:8080/path
+
+
+
+defaultCacheDuration [必需]
+meta/v1.Duration
+
+
+
+
+ defaultCacheDuration 是插件在内存中缓存凭据的默认时长,
+ 在插件响应中没有给出缓存时长时,使用这里设置的值。此字段是必需的。
+
+
+
+apiVersion [必需]
+string
+
+
+
+
+ 要求 exec 插件 CredentialProviderRequest 请求的输入版本。
+ 所返回的 CredentialProviderResponse 必须使用与输入相同的编码版本。当前支持的值有:
+
+
+credentialprovider.kubelet.k8s.io/v1beta1
+
+
+
+args
+[]string
+
+
+
+ 在执行插件可执行文件时要传递给命令的参数。
+
+
+env
+[]ExecEnvVar
+
+
+
+
+ env 定义要提供给插件进程的额外的环境变量。
+ 这些环境变量会与主机上的其他环境变量以及 client-go 所使用的环境变量组合起来,
+ 一起传递给插件。
+
+
+
+
+
+
+## `ExecEnvVar` {#kubelet-config-k8s-io-v1beta1-ExecEnvVar}
+
+
+**出现在:**
+
+- [CredentialProvider](#kubelet-config-k8s-io-v1beta1-CredentialProvider)
+
+
+ExecEnvVar 用来在执行基于 exec 的凭据插件时设置环境变量。
+
+
+字段 描述
+
+
+name [必需]
+string
+
+
+
+
+ 无描述
+
+
+
+value [必需]
+string
+
+
+
+
+ 无描述
+
+
+
+
+
+
+
## `KubeletAnonymousAuthentication` {#kubelet-config-k8s-io-v1beta1-KubeletAnonymousAuthentication}
@@ -2491,7 +2239,7 @@ API 来提供持有者令牌身份认证。
cacheAuthorizedTTL
-meta/v1.Duration
+meta/v1.Duration
cacheUnauthorizedTTL
-meta/v1.Duration
+meta/v1.Duration
flushFrequency [必需]
-time.Duration
+time.Duration
-
- 对日志进行清洗的最大间隔秒数。如果所选的日志后端在写入日志消息时不提供缓存,
-则此配置会被忽略。
+
+ 对日志进行清洗的最大间隔纳秒数(例如,1s = 1000000000)。
+ 如果所选的日志后端在写入日志消息时不提供缓存,则此配置会被忽略。
@@ -2827,19 +2578,6 @@ Only supported for "text" log format.-->
-sanitization [必需]
-bool
-
-
-
-
- [试验功能] 当启用此选项时,被标记为敏感的字段(密码、秘钥、令牌)不会被日志记录。
-运行时日志过滤功能可能会引入非常大的计算开销,因此在生产环境中不应启用。
-
-
-
-
options [必需]
FormatOptions
diff --git a/content/zh-cn/docs/reference/config-api/kubelet-credentialprovider.v1alpha1.md b/content/zh-cn/docs/reference/config-api/kubelet-credentialprovider.v1alpha1.md
new file mode 100644
index 0000000000..cf3287b09a
--- /dev/null
+++ b/content/zh-cn/docs/reference/config-api/kubelet-credentialprovider.v1alpha1.md
@@ -0,0 +1,253 @@
+---
+title: Kubelet CredentialProvider (v1alpha1)
+content_type: tool-reference
+package: credentialprovider.kubelet.k8s.io/v1alpha1
+---
+
+
+
+## 资源类型 {#resource-types}
+
+- [CredentialProviderRequest](#credentialprovider-kubelet-k8s-io-v1alpha1-CredentialProviderRequest)
+- [CredentialProviderResponse](#credentialprovider-kubelet-k8s-io-v1alpha1-CredentialProviderResponse)
+
+## `CredentialProviderRequest` {#credentialprovider-kubelet-k8s-io-v1alpha1-CredentialProviderRequest}
+
+
+
+CredentialProviderRequest 包含 kubelet 需要进行身份验证的镜像。
+Kubelet 会通过标准输入将此请求对象传递给插件。一般来说,插件倾向于用它们所收到的相同的 apiVersion 来响应。
+
+
+
+字段 描述
+
+
+apiVersion stringcredentialprovider.kubelet.k8s.io/v1alpha1
+kind stringCredentialProviderRequest
+
+
+image [必需]
+string
+
+
+
+
+ image 是容器镜像,作为凭据提供程序插件请求的一部分。
+ 插件可以有选择地解析镜像以提取获取凭据所需的任何信息。
+
+
+
+
+
+
+## `CredentialProviderResponse` {#credentialprovider-kubelet-k8s-io-v1alpha1-CredentialProviderResponse}
+
+
+
+CredentialProviderResponse 持有 kubelet 应用于原始请求中提供的指定镜像的凭据。
+kubelet 将通过标准输出读取插件的响应。此响应的 apiVersion 值应设置为与 CredentialProviderRequest 中 apiVersion 值相同。
+
+
+
+
+字段 描述
+
+
+apiVersion stringcredentialprovider.kubelet.k8s.io/v1alpha1
+kind stringCredentialProviderResponse
+
+
+cacheKeyType [必需]
+PluginCacheKeyType
+
+
+
+
+ cacheKeyType 表明基于请求中所给镜像而要使用的缓存键类型。缓存键类型有三个有效值:
+ Image、Registry 和 Global。如果指定了无效值,则 kubelet 不会使用该响应。
+
+
+
+cacheDuration
+meta/v1.Duration
+
+
+
+
+ cacheDuration 表示所提供的凭据应该被缓存的时间。kubelet 使用这个字段为
+ auth 中的凭据设置内存中数据的缓存时间。如果为空,kubelet 将使用 CredentialProviderConfig
+ 中提供的 defaultCacheDuration。如果设置为 0,kubelet 将不会缓存所提供的 auth 数据。
+
+
+
+auth
+map[string]k8s.io/kubelet/pkg/apis/credentialprovider/v1alpha1.AuthConfig
+
+
+
+
+ auth 是一个映射,其中包含传递到 kubelet 的身份验证信息。
+ 每个键都是一个匹配镜像字符串(下面将对此进行详细介绍)。相应的 authConfig 值应该对所有与此键匹配的镜像有效。
+ 如果不能为请求的镜像返回有效的凭据,插件应将此字段设置为 null。
+
+
+
+ 映射中每个键值都是一个正则表达式,可以选择包含端口和路径。
+ 域名部分可以包含通配符,但在端口或路径中不能使用通配符。
+ 支持通配符作为子域,如 *.k8s.io 或 k8s.*.io,以及顶级域,如 k8s.*。
+ 还支持匹配部分子域,如 app*.k8s.io。每个通配符只能匹配一个子域段,
+ 因此 *.io 不匹配 *.k8s.io。
+
+
+
+ 当满足以下所有条件时,kubelet 会将镜像与键值匹配:
+
+
+ 两者都包含相同数量的域部分,并且每个部分都匹配。
+ imageMatch 的 URL 路径必须是目标镜像的 URL 路径的前缀。
+ 如果 imageMatch 包含端口,则该端口也必须在镜像中匹配。
+
+
+
+ 当返回多个键(key)时,kubelet 会倒序遍历所有键,这样:
+
+
+ 具有相同前缀的较长键位于较短键之前
+ 具有相同前缀的非通配符键位于通配符键之前。
+
+
+
+ 对于任何给定的匹配,kubelet 将尝试使用提供的凭据进行镜像拉取,并在第一次成功验证后停止拉取。
+
+ 键值示例:
+
+123456789.dkr.ecr.us-east-1.amazonaws.com
+*.azurecr.io
+gcr.io
+. .registry.io
+registry.io:8080/path
+
+
+
+
+
+
+## `AuthConfig` {#credentialprovider-kubelet-k8s-io-v1alpha1-AuthConfig}
+
+
+**出现在:**
+
+- [CredentialProviderResponse](#credentialprovider-kubelet-k8s-io-v1alpha1-CredentialProviderResponse)
+
+
+AuthConfig 包含容器仓库的身份验证信息。目前仅支持基于用户名/密码的身份验证,但未来可能会添加更多身份验证机制。
+
+
+字段 描述
+
+
+
+username [必需]
+string
+
+
+
+
+ username 是用于向容器仓库进行身份验证的用户名。空的用户名是合法的。
+
+
+
+password [必需]
+string
+
+
+
+
+ password 是用于向容器仓库进行身份验证的密码。空密码是合法的。
+
+
+
+
+
+
+## `PluginCacheKeyType` {#credentialprovider-kubelet-k8s-io-v1alpha1-PluginCacheKeyType}
+
+
+(string 数据类型的别名)
+
+**出现在:**
+
+- [CredentialProviderResponse](#credentialprovider-kubelet-k8s-io-v1alpha1-CredentialProviderResponse)
\ No newline at end of file
diff --git a/content/zh-cn/docs/reference/config-api/kubelet-credentialprovider.v1beta1.md b/content/zh-cn/docs/reference/config-api/kubelet-credentialprovider.v1beta1.md
new file mode 100644
index 0000000000..3bf2430a76
--- /dev/null
+++ b/content/zh-cn/docs/reference/config-api/kubelet-credentialprovider.v1beta1.md
@@ -0,0 +1,253 @@
+---
+title: Kubelet CredentialProvider (v1beta1)
+content_type: tool-reference
+package: credentialprovider.kubelet.k8s.io/v1beta1
+---
+
+
+
+## 资源类型 {#resource-types}
+
+- [CredentialProviderRequest](#credentialprovider-kubelet-k8s-io-v1beta1-CredentialProviderRequest)
+- [CredentialProviderResponse](#credentialprovider-kubelet-k8s-io-v1beta1-CredentialProviderResponse)
+
+## `CredentialProviderRequest` {#credentialprovider-kubelet-k8s-io-v1beta1-CredentialProviderRequest}
+
+
+
+CredentialProviderRequest 包含 kubelet 需要进行身份验证的镜像。
+Kubelet 会通过标准输入将此请求对象传递给插件。一般来说,插件倾向于用它们所收到的相同的 apiVersion 来响应。
+
+
+
+字段 描述
+
+
+apiVersion stringcredentialprovider.kubelet.k8s.io/v1beta1
+kind stringCredentialProviderRequest
+
+
+image [必需]
+string
+
+
+
+
+ image 是容器镜像,作为凭据提供程序插件请求的一部分。
+ 插件可以有选择地解析镜像以提取获取凭据所需的任何信息。
+
+
+
+
+
+
+## `CredentialProviderResponse` {#credentialprovider-kubelet-k8s-io-v1beta1-CredentialProviderResponse}
+
+
+
+CredentialProviderResponse 持有 kubelet 应用于原始请求中提供的指定镜像的凭据。
+kubelet 将通过标准输出读取插件的响应。此响应的 apiVersion 值应设置为与 CredentialProviderRequest 中 apiVersion 值相同。
+
+
+
+
+字段 描述
+
+
+apiVersion stringcredentialprovider.kubelet.k8s.io/v1beta1
+kind stringCredentialProviderResponse
+
+
+cacheKeyType [必需]
+PluginCacheKeyType
+
+
+
+
+ cacheKeyType 表明基于请求中所给镜像而要使用的缓存键类型。缓存键类型有三个有效值:
+ Image、Registry 和 Global。如果指定了无效值,则 kubelet 不会使用该响应。
+
+
+
+cacheDuration
+meta/v1.Duration
+
+
+
+
+ cacheDuration 表示所提供的凭据应该被缓存的时间。kubelet 使用这个字段为
+ auth 中的凭据设置内存中数据的缓存时间。如果为空,kubelet 将使用 CredentialProviderConfig
+ 中提供的 defaultCacheDuration。如果设置为 0,kubelet 将不会缓存所提供的 auth 数据。
+
+
+
+auth
+map[string]k8s.io/kubelet/pkg/apis/credentialprovider/v1beta1.AuthConfig
+
+
+
+
+ auth 是一个映射,其中包含传递到 kubelet 的身份验证信息。
+ 每个键都是一个匹配镜像字符串(下面将对此进行详细介绍)。相应的 authConfig 值应该对所有与此键匹配的镜像有效。
+ 如果不能为请求的镜像返回有效的凭据,插件应将此字段设置为 null。
+
+
+
+ 映射中每个键值都是一个正则表达式,可以选择包含端口和路径。
+ 域名部分可以包含通配符,但在端口或路径中不能使用通配符。
+ 支持通配符作为子域,如 *.k8s.io 或 k8s.*.io,以及顶级域,如 k8s.*。
+ 还支持匹配部分子域,如 app*.k8s.io。每个通配符只能匹配一个子域段,
+ 因此 *.io 不匹配 *.k8s.io。
+
+
+
+ 当满足以下所有条件时,kubelet 会将镜像与键值匹配:
+
+
+ 两者都包含相同数量的域部分,并且每个部分都匹配。
+ imageMatch 的 URL 路径必须是目标镜像的 URL 路径的前缀。
+ 如果 imageMatch 包含端口,则该端口也必须在镜像中匹配。
+
+
+
+ 当返回多个键(key)时,kubelet 会倒序遍历所有键,这样:
+
+
+ 具有相同前缀的较长键位于较短键之前
+ 具有相同前缀的非通配符键位于通配符键之前。
+
+
+
+ 对于任何给定的匹配,kubelet 将尝试使用提供的凭据进行镜像拉取,并在第一次成功验证后停止拉取。
+
+ 键值示例:
+
+123456789.dkr.ecr.us-east-1.amazonaws.com
+*.azurecr.io
+gcr.io
+. .registry.io
+registry.io:8080/path
+
+
+
+
+
+
+## `AuthConfig` {#credentialprovider-kubelet-k8s-io-v1beta1-AuthConfig}
+
+
+**出现在:**
+
+- [CredentialProviderResponse](#credentialprovider-kubelet-k8s-io-v1beta1-CredentialProviderResponse)
+
+
+AuthConfig 包含容器仓库的身份验证信息。目前仅支持基于用户名/密码的身份验证,但未来可能会添加更多身份验证机制。
+
+
+字段 描述
+
+
+
+username [必需]
+string
+
+
+
+
+ username 是用于向容器仓库进行身份验证的用户名。空的用户名是合法的。
+
+
+
+password [必需]
+string
+
+
+
+
+ password 是用于向容器仓库进行身份验证的密码。空密码是合法的。
+
+
+
+
+
+
+## `PluginCacheKeyType` {#credentialprovider-kubelet-k8s-io-v1beta1-PluginCacheKeyType}
+
+
+(string 数据类型的别名)
+
+**出现在:**
+
+- [CredentialProviderResponse](#credentialprovider-kubelet-k8s-io-v1beta1-CredentialProviderResponse)
\ No newline at end of file
diff --git a/content/zh/docs/reference/glossary/addons.md b/content/zh-cn/docs/reference/glossary/addons.md
similarity index 100%
rename from content/zh/docs/reference/glossary/addons.md
rename to content/zh-cn/docs/reference/glossary/addons.md
diff --git a/content/zh/docs/reference/glossary/admission-controller.md b/content/zh-cn/docs/reference/glossary/admission-controller.md
similarity index 100%
rename from content/zh/docs/reference/glossary/admission-controller.md
rename to content/zh-cn/docs/reference/glossary/admission-controller.md
diff --git a/content/zh/docs/reference/glossary/affinity.md b/content/zh-cn/docs/reference/glossary/affinity.md
similarity index 100%
rename from content/zh/docs/reference/glossary/affinity.md
rename to content/zh-cn/docs/reference/glossary/affinity.md
diff --git a/content/zh/docs/reference/glossary/aggregation-layer.md b/content/zh-cn/docs/reference/glossary/aggregation-layer.md
similarity index 100%
rename from content/zh/docs/reference/glossary/aggregation-layer.md
rename to content/zh-cn/docs/reference/glossary/aggregation-layer.md
diff --git a/content/zh/docs/reference/glossary/annotation.md b/content/zh-cn/docs/reference/glossary/annotation.md
similarity index 100%
rename from content/zh/docs/reference/glossary/annotation.md
rename to content/zh-cn/docs/reference/glossary/annotation.md
diff --git a/content/zh/docs/reference/glossary/api-eviction.md b/content/zh-cn/docs/reference/glossary/api-eviction.md
similarity index 100%
rename from content/zh/docs/reference/glossary/api-eviction.md
rename to content/zh-cn/docs/reference/glossary/api-eviction.md
diff --git a/content/zh/docs/reference/glossary/api-group.md b/content/zh-cn/docs/reference/glossary/api-group.md
similarity index 100%
rename from content/zh/docs/reference/glossary/api-group.md
rename to content/zh-cn/docs/reference/glossary/api-group.md
diff --git a/content/zh/docs/reference/glossary/app-container.md b/content/zh-cn/docs/reference/glossary/app-container.md
similarity index 100%
rename from content/zh/docs/reference/glossary/app-container.md
rename to content/zh-cn/docs/reference/glossary/app-container.md
diff --git a/content/zh/docs/reference/glossary/application-architect.md b/content/zh-cn/docs/reference/glossary/application-architect.md
similarity index 100%
rename from content/zh/docs/reference/glossary/application-architect.md
rename to content/zh-cn/docs/reference/glossary/application-architect.md
diff --git a/content/zh/docs/reference/glossary/application-developer.md b/content/zh-cn/docs/reference/glossary/application-developer.md
similarity index 100%
rename from content/zh/docs/reference/glossary/application-developer.md
rename to content/zh-cn/docs/reference/glossary/application-developer.md
diff --git a/content/zh/docs/reference/glossary/applications.md b/content/zh-cn/docs/reference/glossary/applications.md
similarity index 100%
rename from content/zh/docs/reference/glossary/applications.md
rename to content/zh-cn/docs/reference/glossary/applications.md
diff --git a/content/zh/docs/reference/glossary/approver.md b/content/zh-cn/docs/reference/glossary/approver.md
similarity index 100%
rename from content/zh/docs/reference/glossary/approver.md
rename to content/zh-cn/docs/reference/glossary/approver.md
diff --git a/content/zh/docs/reference/glossary/cadvisor.md b/content/zh-cn/docs/reference/glossary/cadvisor.md
similarity index 100%
rename from content/zh/docs/reference/glossary/cadvisor.md
rename to content/zh-cn/docs/reference/glossary/cadvisor.md
diff --git a/content/zh/docs/reference/glossary/certificate.md b/content/zh-cn/docs/reference/glossary/certificate.md
similarity index 100%
rename from content/zh/docs/reference/glossary/certificate.md
rename to content/zh-cn/docs/reference/glossary/certificate.md
diff --git a/content/zh/docs/reference/glossary/cgroup.md b/content/zh-cn/docs/reference/glossary/cgroup.md
similarity index 100%
rename from content/zh/docs/reference/glossary/cgroup.md
rename to content/zh-cn/docs/reference/glossary/cgroup.md
diff --git a/content/zh/docs/reference/glossary/cidr.md b/content/zh-cn/docs/reference/glossary/cidr.md
similarity index 100%
rename from content/zh/docs/reference/glossary/cidr.md
rename to content/zh-cn/docs/reference/glossary/cidr.md
diff --git a/content/zh/docs/reference/glossary/cla.md b/content/zh-cn/docs/reference/glossary/cla.md
similarity index 100%
rename from content/zh/docs/reference/glossary/cla.md
rename to content/zh-cn/docs/reference/glossary/cla.md
diff --git a/content/zh/docs/reference/glossary/cloud-controller-manager.md b/content/zh-cn/docs/reference/glossary/cloud-controller-manager.md
similarity index 87%
rename from content/zh/docs/reference/glossary/cloud-controller-manager.md
rename to content/zh-cn/docs/reference/glossary/cloud-controller-manager.md
index 3d33b8c7fe..7fc039db36 100644
--- a/content/zh/docs/reference/glossary/cloud-controller-manager.md
+++ b/content/zh-cn/docs/reference/glossary/cloud-controller-manager.md
@@ -33,18 +33,17 @@ that embeds cloud-specific control logic. The cloud controller manager lets you
cluster into your cloud provider's API, and separates out the components that interact
with that cloud platform from components that only interact with your cluster.
-->
-云控制器管理器是指嵌入特定云的控制逻辑的
+`cloud-controller-manager` 是指嵌入特定云的控制逻辑之
{{< glossary_tooltip text="控制平面" term_id="control-plane" >}}组件。
-云控制器管理器使得你可以将你的集群连接到云提供商的 API 之上,
+`cloud-controller-manager` 允许你将你的集群连接到云提供商的 API 之上,
并将与该云平台交互的组件同与你的集群交互的组件分离开来。
-
通过分离 Kubernetes 和底层云基础设置之间的互操作性逻辑,
-云控制器管理器组件使云提供商能够以不同于 Kubernetes 主项目的
+`cloud-controller-manager` 组件使云提供商能够以不同于 Kubernetes 主项目的
步调发布新特征。
diff --git a/content/zh/docs/reference/glossary/cloud-provider.md b/content/zh-cn/docs/reference/glossary/cloud-provider.md
similarity index 100%
rename from content/zh/docs/reference/glossary/cloud-provider.md
rename to content/zh-cn/docs/reference/glossary/cloud-provider.md
diff --git a/content/zh/docs/reference/glossary/cluster-architect.md b/content/zh-cn/docs/reference/glossary/cluster-architect.md
similarity index 100%
rename from content/zh/docs/reference/glossary/cluster-architect.md
rename to content/zh-cn/docs/reference/glossary/cluster-architect.md
diff --git a/content/zh/docs/reference/glossary/cluster-infrastructure.md b/content/zh-cn/docs/reference/glossary/cluster-infrastructure.md
similarity index 100%
rename from content/zh/docs/reference/glossary/cluster-infrastructure.md
rename to content/zh-cn/docs/reference/glossary/cluster-infrastructure.md
diff --git a/content/zh/docs/reference/glossary/cluster-operations.md b/content/zh-cn/docs/reference/glossary/cluster-operations.md
similarity index 100%
rename from content/zh/docs/reference/glossary/cluster-operations.md
rename to content/zh-cn/docs/reference/glossary/cluster-operations.md
diff --git a/content/zh/docs/reference/glossary/cluster-operator.md b/content/zh-cn/docs/reference/glossary/cluster-operator.md
similarity index 100%
rename from content/zh/docs/reference/glossary/cluster-operator.md
rename to content/zh-cn/docs/reference/glossary/cluster-operator.md
diff --git a/content/zh/docs/reference/glossary/cluster.md b/content/zh-cn/docs/reference/glossary/cluster.md
similarity index 69%
rename from content/zh/docs/reference/glossary/cluster.md
rename to content/zh-cn/docs/reference/glossary/cluster.md
index 74d48ff2c2..07b79c5f96 100644
--- a/content/zh/docs/reference/glossary/cluster.md
+++ b/content/zh-cn/docs/reference/glossary/cluster.md
@@ -4,7 +4,7 @@ id: cluster
date: 2019-06-15
full_link:
short_description: >
- 集群由一组被称作节点的机器组成。这些节点上运行 Kubernetes 所管理的容器化应用。集群具有至少一个工作节点。
+ 集群由一组被称作节点的机器组成。这些节点上运行 Kubernetes 所管理的容器化应用。集群具有至少一个工作节点。
aka:
tags:
@@ -32,8 +32,9 @@ tags:
A set of worker machines, called {{< glossary_tooltip text="nodes" term_id="node" >}},
that run containerized applications. Every cluster has at least one worker node.
-->
-集群由一组被称作节点的机器组成。这些节点上运行 Kubernetes 所管理的容器化应用。集群具有至少一个工作节点。
-
+集群是由一组被称作{{< glossary_tooltip text="节点(node)" term_id="node" >}}的机器组成,
+这些节点上会运行由 Kubernetes 所管理的容器化应用。
+且每个集群至少有一个工作节点。
-工作节点托管作为应用负载的组件的 Pod 。控制平面管理集群中的工作节点和 Pod 。
-为集群提供故障转移和高可用性,这些控制平面一般跨多主机运行,集群跨多个节点运行。
+工作节点会托管所谓的 Pods,而 Pod 就是作为应用负载的组件。
+控制平面管理集群中的工作节点和 Pods。
+为集群提供故障转移和高可用性,
+这些控制平面一般跨多主机运行,而集群也会跨多个节点运行。
diff --git a/content/zh/docs/reference/glossary/cncf.md b/content/zh-cn/docs/reference/glossary/cncf.md
similarity index 100%
rename from content/zh/docs/reference/glossary/cncf.md
rename to content/zh-cn/docs/reference/glossary/cncf.md
diff --git a/content/zh/docs/reference/glossary/cni.md b/content/zh-cn/docs/reference/glossary/cni.md
similarity index 100%
rename from content/zh/docs/reference/glossary/cni.md
rename to content/zh-cn/docs/reference/glossary/cni.md
diff --git a/content/zh/docs/reference/glossary/code-contributor.md b/content/zh-cn/docs/reference/glossary/code-contributor.md
similarity index 100%
rename from content/zh/docs/reference/glossary/code-contributor.md
rename to content/zh-cn/docs/reference/glossary/code-contributor.md
diff --git a/content/zh/docs/reference/glossary/configmap.md b/content/zh-cn/docs/reference/glossary/configmap.md
similarity index 100%
rename from content/zh/docs/reference/glossary/configmap.md
rename to content/zh-cn/docs/reference/glossary/configmap.md
diff --git a/content/zh/docs/reference/glossary/container-env-variables.md b/content/zh-cn/docs/reference/glossary/container-env-variables.md
similarity index 100%
rename from content/zh/docs/reference/glossary/container-env-variables.md
rename to content/zh-cn/docs/reference/glossary/container-env-variables.md
diff --git a/content/zh/docs/reference/glossary/container-lifecycle-hooks.md b/content/zh-cn/docs/reference/glossary/container-lifecycle-hooks.md
similarity index 100%
rename from content/zh/docs/reference/glossary/container-lifecycle-hooks.md
rename to content/zh-cn/docs/reference/glossary/container-lifecycle-hooks.md
diff --git a/content/zh/docs/reference/glossary/container-runtime-interface.md b/content/zh-cn/docs/reference/glossary/container-runtime-interface.md
similarity index 100%
rename from content/zh/docs/reference/glossary/container-runtime-interface.md
rename to content/zh-cn/docs/reference/glossary/container-runtime-interface.md
diff --git a/content/zh/docs/reference/glossary/container-runtime.md b/content/zh-cn/docs/reference/glossary/container-runtime.md
similarity index 90%
rename from content/zh/docs/reference/glossary/container-runtime.md
rename to content/zh-cn/docs/reference/glossary/container-runtime.md
index 36a0caf416..0040642c43 100644
--- a/content/zh/docs/reference/glossary/container-runtime.md
+++ b/content/zh-cn/docs/reference/glossary/container-runtime.md
@@ -41,8 +41,9 @@ Kubernetes supports container runtimes such sa
and any other implementation of the [Kubernetes CRI (Container Runtime
Interface)](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/container-runtime-interface.md).
-->
-Kubernetes 支持容器运行时,例如
+Kubernetes 支持许多容器运行环境,例如
{{< glossary_tooltip term_id="docker">}}、
-{{< glossary_tooltip term_id="containerd" >}}、{{< glossary_tooltip term_id="cri-o" >}}
+{{< glossary_tooltip term_id="containerd" >}}、
+{{< glossary_tooltip term_id="cri-o" >}}
以及 [Kubernetes CRI (容器运行环境接口)](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/container-runtime-interface.md)
的其他任何实现。
\ No newline at end of file
diff --git a/content/zh/docs/reference/glossary/container.md b/content/zh-cn/docs/reference/glossary/container.md
similarity index 100%
rename from content/zh/docs/reference/glossary/container.md
rename to content/zh-cn/docs/reference/glossary/container.md
diff --git a/content/zh/docs/reference/glossary/containerd.md b/content/zh-cn/docs/reference/glossary/containerd.md
similarity index 100%
rename from content/zh/docs/reference/glossary/containerd.md
rename to content/zh-cn/docs/reference/glossary/containerd.md
diff --git a/content/zh/docs/reference/glossary/contributor.md b/content/zh-cn/docs/reference/glossary/contributor.md
similarity index 100%
rename from content/zh/docs/reference/glossary/contributor.md
rename to content/zh-cn/docs/reference/glossary/contributor.md
diff --git a/content/zh/docs/reference/glossary/control-plane.md b/content/zh-cn/docs/reference/glossary/control-plane.md
similarity index 100%
rename from content/zh/docs/reference/glossary/control-plane.md
rename to content/zh-cn/docs/reference/glossary/control-plane.md
diff --git a/content/zh/docs/reference/glossary/controller.md b/content/zh-cn/docs/reference/glossary/controller.md
similarity index 100%
rename from content/zh/docs/reference/glossary/controller.md
rename to content/zh-cn/docs/reference/glossary/controller.md
diff --git a/content/zh/docs/reference/glossary/cri-o.md b/content/zh-cn/docs/reference/glossary/cri-o.md
similarity index 100%
rename from content/zh/docs/reference/glossary/cri-o.md
rename to content/zh-cn/docs/reference/glossary/cri-o.md
diff --git a/content/zh/docs/reference/glossary/cri.md b/content/zh-cn/docs/reference/glossary/cri.md
similarity index 100%
rename from content/zh/docs/reference/glossary/cri.md
rename to content/zh-cn/docs/reference/glossary/cri.md
diff --git a/content/zh/docs/reference/glossary/cronjob.md b/content/zh-cn/docs/reference/glossary/cronjob.md
similarity index 100%
rename from content/zh/docs/reference/glossary/cronjob.md
rename to content/zh-cn/docs/reference/glossary/cronjob.md
diff --git a/content/zh/docs/reference/glossary/csi.md b/content/zh-cn/docs/reference/glossary/csi.md
similarity index 100%
rename from content/zh/docs/reference/glossary/csi.md
rename to content/zh-cn/docs/reference/glossary/csi.md
diff --git a/content/zh/docs/reference/glossary/customresourcedefinition.md b/content/zh-cn/docs/reference/glossary/customresourcedefinition.md
similarity index 100%
rename from content/zh/docs/reference/glossary/customresourcedefinition.md
rename to content/zh-cn/docs/reference/glossary/customresourcedefinition.md
diff --git a/content/zh/docs/reference/glossary/daemonset.md b/content/zh-cn/docs/reference/glossary/daemonset.md
similarity index 100%
rename from content/zh/docs/reference/glossary/daemonset.md
rename to content/zh-cn/docs/reference/glossary/daemonset.md
diff --git a/content/zh/docs/reference/glossary/data-plane.md b/content/zh-cn/docs/reference/glossary/data-plane.md
similarity index 100%
rename from content/zh/docs/reference/glossary/data-plane.md
rename to content/zh-cn/docs/reference/glossary/data-plane.md
diff --git a/content/zh/docs/reference/glossary/deployment.md b/content/zh-cn/docs/reference/glossary/deployment.md
similarity index 100%
rename from content/zh/docs/reference/glossary/deployment.md
rename to content/zh-cn/docs/reference/glossary/deployment.md
diff --git a/content/zh/docs/reference/glossary/developer.md b/content/zh-cn/docs/reference/glossary/developer.md
similarity index 100%
rename from content/zh/docs/reference/glossary/developer.md
rename to content/zh-cn/docs/reference/glossary/developer.md
diff --git a/content/zh/docs/reference/glossary/device-plugin.md b/content/zh-cn/docs/reference/glossary/device-plugin.md
similarity index 100%
rename from content/zh/docs/reference/glossary/device-plugin.md
rename to content/zh-cn/docs/reference/glossary/device-plugin.md
diff --git a/content/zh/docs/reference/glossary/disruption.md b/content/zh-cn/docs/reference/glossary/disruption.md
similarity index 100%
rename from content/zh/docs/reference/glossary/disruption.md
rename to content/zh-cn/docs/reference/glossary/disruption.md
diff --git a/content/zh/docs/reference/glossary/docker.md b/content/zh-cn/docs/reference/glossary/docker.md
similarity index 100%
rename from content/zh/docs/reference/glossary/docker.md
rename to content/zh-cn/docs/reference/glossary/docker.md
diff --git a/content/zh-cn/docs/reference/glossary/dockershim.md b/content/zh-cn/docs/reference/glossary/dockershim.md
new file mode 100644
index 0000000000..22570a4b17
--- /dev/null
+++ b/content/zh-cn/docs/reference/glossary/dockershim.md
@@ -0,0 +1,40 @@
+---
+title: Dockershim
+id: dockershim
+date: 2022-04-15
+full_link: /zh/dockershim
+short_description: >
+ dockershim 是 Kubernetes v1.23 及之前版本中的一个组件,Kubernetes 系统组件通过它与 Docker Engine 通信。
+
+aka:
+tags:
+- fundamental
+---
+
+
+
+
+
+dockershim 是 Kubernetes v1.23 及之前版本中的一个组件。
+Kubernetes 系统组件通过它与 {{< glossary_tooltip text="Docker Engine" term_id="docker" >}} 通信。
+
+
+
+从 Kubernetes v1.24 开始,dockershim 已从 Kubernetes 中移除.
+想了解更多信息,可参考[移除 Dockershim 的常见问题](/zh/dockershim)。
\ No newline at end of file
diff --git a/content/zh/docs/reference/glossary/downstream.md b/content/zh-cn/docs/reference/glossary/downstream.md
similarity index 100%
rename from content/zh/docs/reference/glossary/downstream.md
rename to content/zh-cn/docs/reference/glossary/downstream.md
diff --git a/content/zh/docs/reference/glossary/dynamic-volume-provisioning.md b/content/zh-cn/docs/reference/glossary/dynamic-volume-provisioning.md
similarity index 100%
rename from content/zh/docs/reference/glossary/dynamic-volume-provisioning.md
rename to content/zh-cn/docs/reference/glossary/dynamic-volume-provisioning.md
diff --git a/content/zh/docs/reference/glossary/endpoint-slice.md b/content/zh-cn/docs/reference/glossary/endpoint-slice.md
similarity index 100%
rename from content/zh/docs/reference/glossary/endpoint-slice.md
rename to content/zh-cn/docs/reference/glossary/endpoint-slice.md
diff --git a/content/zh/docs/reference/glossary/endpoint.md b/content/zh-cn/docs/reference/glossary/endpoint.md
similarity index 100%
rename from content/zh/docs/reference/glossary/endpoint.md
rename to content/zh-cn/docs/reference/glossary/endpoint.md
diff --git a/content/zh/docs/reference/glossary/ephemeral-container.md b/content/zh-cn/docs/reference/glossary/ephemeral-container.md
similarity index 100%
rename from content/zh/docs/reference/glossary/ephemeral-container.md
rename to content/zh-cn/docs/reference/glossary/ephemeral-container.md
diff --git a/content/zh/docs/reference/glossary/etcd.md b/content/zh-cn/docs/reference/glossary/etcd.md
similarity index 72%
rename from content/zh/docs/reference/glossary/etcd.md
rename to content/zh-cn/docs/reference/glossary/etcd.md
index a13de28d1a..adb4737975 100644
--- a/content/zh/docs/reference/glossary/etcd.md
+++ b/content/zh-cn/docs/reference/glossary/etcd.md
@@ -32,7 +32,7 @@ tags:
Consistent and highly-available key value store used as Kubernetes' backing store for all cluster data.
-->
-etcd 是兼具一致性和高可用性的键值数据库,可以作为保存 Kubernetes 所有集群数据的后台数据库。
+`etcd` 是兼顾一致性与高可用性的键值数据库,可以作为保存 Kubernetes 所有集群数据的后台数据库。
-你的 Kubernetes 集群的 etcd 数据库通常需要有个备份计划。
+你的 Kubernetes 集群的 `etcd` 数据库通常需要有个[备份](/zh/docs/tasks/administer-cluster/configure-upgrade-etcd/#backing-up-an-etcd-cluster)计划。
-要了解 etcd 更深层次的信息,请参考 [etcd 文档](https://etcd.io/docs/)。
+如果想要更深入的了解 `etcd`,请参考 [etcd 文档](https://etcd.io/docs/)。
diff --git a/content/zh/docs/reference/glossary/event.md b/content/zh-cn/docs/reference/glossary/event.md
similarity index 100%
rename from content/zh/docs/reference/glossary/event.md
rename to content/zh-cn/docs/reference/glossary/event.md
diff --git a/content/zh/docs/reference/glossary/eviction.md b/content/zh-cn/docs/reference/glossary/eviction.md
similarity index 100%
rename from content/zh/docs/reference/glossary/eviction.md
rename to content/zh-cn/docs/reference/glossary/eviction.md
diff --git a/content/zh/docs/reference/glossary/extensions.md b/content/zh-cn/docs/reference/glossary/extensions.md
similarity index 100%
rename from content/zh/docs/reference/glossary/extensions.md
rename to content/zh-cn/docs/reference/glossary/extensions.md
diff --git a/content/zh/docs/reference/glossary/finalizer.md b/content/zh-cn/docs/reference/glossary/finalizer.md
similarity index 100%
rename from content/zh/docs/reference/glossary/finalizer.md
rename to content/zh-cn/docs/reference/glossary/finalizer.md
diff --git a/content/zh/docs/reference/glossary/flexvolume.md b/content/zh-cn/docs/reference/glossary/flexvolume.md
similarity index 100%
rename from content/zh/docs/reference/glossary/flexvolume.md
rename to content/zh-cn/docs/reference/glossary/flexvolume.md
diff --git a/content/zh/docs/reference/glossary/garbage-collection.md b/content/zh-cn/docs/reference/glossary/garbage-collection.md
similarity index 100%
rename from content/zh/docs/reference/glossary/garbage-collection.md
rename to content/zh-cn/docs/reference/glossary/garbage-collection.md
diff --git a/content/zh/docs/reference/glossary/helm-chart.md b/content/zh-cn/docs/reference/glossary/helm-chart.md
similarity index 100%
rename from content/zh/docs/reference/glossary/helm-chart.md
rename to content/zh-cn/docs/reference/glossary/helm-chart.md
diff --git a/content/zh/docs/reference/glossary/horizontal-pod-autoscaler.md b/content/zh-cn/docs/reference/glossary/horizontal-pod-autoscaler.md
similarity index 100%
rename from content/zh/docs/reference/glossary/horizontal-pod-autoscaler.md
rename to content/zh-cn/docs/reference/glossary/horizontal-pod-autoscaler.md
diff --git a/content/zh/docs/reference/glossary/host-aliases.md b/content/zh-cn/docs/reference/glossary/host-aliases.md
similarity index 100%
rename from content/zh/docs/reference/glossary/host-aliases.md
rename to content/zh-cn/docs/reference/glossary/host-aliases.md
diff --git a/content/zh/docs/reference/glossary/image.md b/content/zh-cn/docs/reference/glossary/image.md
similarity index 100%
rename from content/zh/docs/reference/glossary/image.md
rename to content/zh-cn/docs/reference/glossary/image.md
diff --git a/content/zh/docs/reference/glossary/index.md b/content/zh-cn/docs/reference/glossary/index.md
similarity index 100%
rename from content/zh/docs/reference/glossary/index.md
rename to content/zh-cn/docs/reference/glossary/index.md
diff --git a/content/zh/docs/reference/glossary/ingress.md b/content/zh-cn/docs/reference/glossary/ingress.md
similarity index 100%
rename from content/zh/docs/reference/glossary/ingress.md
rename to content/zh-cn/docs/reference/glossary/ingress.md
diff --git a/content/zh/docs/reference/glossary/init-container.md b/content/zh-cn/docs/reference/glossary/init-container.md
similarity index 100%
rename from content/zh/docs/reference/glossary/init-container.md
rename to content/zh-cn/docs/reference/glossary/init-container.md
diff --git a/content/zh/docs/reference/glossary/istio.md b/content/zh-cn/docs/reference/glossary/istio.md
similarity index 100%
rename from content/zh/docs/reference/glossary/istio.md
rename to content/zh-cn/docs/reference/glossary/istio.md
diff --git a/content/zh/docs/reference/glossary/job.md b/content/zh-cn/docs/reference/glossary/job.md
similarity index 100%
rename from content/zh/docs/reference/glossary/job.md
rename to content/zh-cn/docs/reference/glossary/job.md
diff --git a/content/zh/docs/reference/glossary/kops.md b/content/zh-cn/docs/reference/glossary/kops.md
similarity index 100%
rename from content/zh/docs/reference/glossary/kops.md
rename to content/zh-cn/docs/reference/glossary/kops.md
diff --git a/content/zh/docs/reference/glossary/kube-apiserver.md b/content/zh-cn/docs/reference/glossary/kube-apiserver.md
similarity index 73%
rename from content/zh/docs/reference/glossary/kube-apiserver.md
rename to content/zh-cn/docs/reference/glossary/kube-apiserver.md
index 05f9605b2a..189ecfc36c 100644
--- a/content/zh/docs/reference/glossary/kube-apiserver.md
+++ b/content/zh-cn/docs/reference/glossary/kube-apiserver.md
@@ -31,9 +31,9 @@ tags:
{{< glossary_tooltip text="control plane" term_id="control-plane" >}} that exposes the Kubernetes API.
The API server is the front end for the Kubernetes control plane.
-->
-API 服务器是 Kubernetes {{< glossary_tooltip text="控制面" term_id="control-plane" >}}的组件,
-该组件公开了 Kubernetes API。
-API 服务器是 Kubernetes 控制面的前端。
+API 服务器是 Kubernetes {{< glossary_tooltip text="控制平面" term_id="control-plane" >}}的组件,
+该组件负责公开了 Kubernetes API,负责处理接受请求的工作。
+API 服务器是 Kubernetes 控制平面的前端。
@@ -43,5 +43,5 @@ kube-apiserver is designed to scale horizontally—that is, it scales by dep
You can run several instances of kube-apiserver and balance traffic between those instances.
-->
Kubernetes API 服务器的主要实现是 [kube-apiserver](/zh/docs/reference/command-line-tools-reference/kube-apiserver/)。
-kube-apiserver 设计上考虑了水平伸缩,也就是说,它可通过部署多个实例进行伸缩。
-你可以运行 kube-apiserver 的多个实例,并在这些实例之间平衡流量。
+`kube-apiserver` 设计上考虑了水平扩缩,也就是说,它可通过部署多个实例来进行扩缩。
+你可以运行 `kube-apiserver` 的多个实例,并在这些实例之间平衡流量。
diff --git a/content/zh-cn/docs/reference/glossary/kube-controller-manager.md b/content/zh-cn/docs/reference/glossary/kube-controller-manager.md
new file mode 100644
index 0000000000..12dd0b3988
--- /dev/null
+++ b/content/zh-cn/docs/reference/glossary/kube-controller-manager.md
@@ -0,0 +1,47 @@
+---
+title: kube-controller-manager
+id: kube-controller-manager
+date: 2018-04-12
+full_link: /docs/reference/generated/kube-controller-manager/
+short_description: >
+ 主节点上运行控制器的组件。
+
+aka:
+tags:
+- architecture
+- fundamental
+---
+
+
+
+
+[kube-controller-manager](/zh/docs/reference/command-line-tools-reference/kube-controller-manager/) 是{{< glossary_tooltip text="控制平面" term_id="control-plane" >}}的组件,
+负责运行{{< glossary_tooltip text="控制器" term_id="controller" >}}进程。
+
+
+
+从逻辑上讲,
+每个{{< glossary_tooltip text="控制器" term_id="controller" >}}都是一个单独的进程,
+但是为了降低复杂性,它们都被编译到同一个可执行文件,并在同一个进程中运行。
+
diff --git a/content/zh-cn/docs/reference/glossary/kube-proxy.md b/content/zh-cn/docs/reference/glossary/kube-proxy.md
new file mode 100644
index 0000000000..3fce715cb7
--- /dev/null
+++ b/content/zh-cn/docs/reference/glossary/kube-proxy.md
@@ -0,0 +1,53 @@
+---
+title: kube-proxy
+id: kube-proxy
+date: 2018-04-12
+full_link: /zh/docs/reference/command-line-tools-reference/kube-proxy/
+short_description: >
+ `kube-proxy` 是集群中每个节点上运行的网络代理。
+
+aka:
+tags:
+- fundamental
+- networking
+---
+
+
+[kube-proxy](/zh/docs/reference/command-line-tools-reference/kube-proxy/)
+是集群中每个{{< glossary_tooltip text="节点(node)" term_id="node" >}}所上运行的网络代理,
+实现 Kubernetes {{< glossary_tooltip term_id="service">}} 概念的一部分。
+
+
+
+
+kube-proxy 维护节点上的一些网络规则,
+这些网络规则会允许从集群内部或外部的网络会话与 Pod 进行网络通信。
+
+
+如果操作系统提供了可用的数据包过滤层,则 kube-proxy 会通过它来实现网络规则。
+否则,kube-proxy 仅做流量转发。
diff --git a/content/zh/docs/reference/glossary/kube-scheduler.md b/content/zh-cn/docs/reference/glossary/kube-scheduler.md
similarity index 69%
rename from content/zh/docs/reference/glossary/kube-scheduler.md
rename to content/zh-cn/docs/reference/glossary/kube-scheduler.md
index 9d6a1842fb..c2964d0d74 100644
--- a/content/zh/docs/reference/glossary/kube-scheduler.md
+++ b/content/zh-cn/docs/reference/glossary/kube-scheduler.md
@@ -33,7 +33,9 @@ Control plane component that watches for newly created
{{< glossary_tooltip term_id="node" text="node">}}, and selects a node for them
to run on.-->
- 控制平面组件,负责监视新创建的、未指定运行{{< glossary_tooltip term_id="node" text="节点(node)">}}的 {{< glossary_tooltip term_id="pod" text="Pods" >}},选择节点让 Pod 在上面运行。
+ `kube-scheduler` 是{{< glossary_tooltip text="控制平面" term_id="control-plane" >}}的组件,
+ 负责监视新创建的、未指定运行{{< glossary_tooltip term_id="node" text="节点(node)">}}的 {{< glossary_tooltip term_id="pod" text="Pods" >}},
+ 并选择节点来让 Pod 在上面运行。
@@ -41,4 +43,5 @@ to run on.-->
Factors taken into account for scheduling decisions include individual and collective resource requirements, hardware/software/policy constraints, affinity and anti-affinity specifications, data locality, inter-workload interference and deadlines.
-->
-调度决策考虑的因素包括单个 Pod 和 Pod 集合的资源需求、硬件/软件/策略约束、亲和性和反亲和性规范、数据位置、工作负载间的干扰和最后时限。
+调度决策考虑的因素包括单个 Pod 及 Pods 集合的资源需求、软硬件及策略约束、
+亲和性及反亲和性规范、数据位置、工作负载间的干扰及最后时限。
diff --git a/content/zh/docs/reference/glossary/kubeadm.md b/content/zh-cn/docs/reference/glossary/kubeadm.md
similarity index 100%
rename from content/zh/docs/reference/glossary/kubeadm.md
rename to content/zh-cn/docs/reference/glossary/kubeadm.md
diff --git a/content/zh/docs/reference/glossary/kubectl.md b/content/zh-cn/docs/reference/glossary/kubectl.md
similarity index 100%
rename from content/zh/docs/reference/glossary/kubectl.md
rename to content/zh-cn/docs/reference/glossary/kubectl.md
diff --git a/content/zh/docs/reference/glossary/kubelet.md b/content/zh-cn/docs/reference/glossary/kubelet.md
similarity index 81%
rename from content/zh/docs/reference/glossary/kubelet.md
rename to content/zh-cn/docs/reference/glossary/kubelet.md
index a00971e224..1a5b4f630b 100644
--- a/content/zh/docs/reference/glossary/kubelet.md
+++ b/content/zh-cn/docs/reference/glossary/kubelet.md
@@ -28,16 +28,16 @@ tags:
-一个在集群中每个{{< glossary_tooltip text="节点(node)" term_id="node" >}}上运行的代理。
-它保证{{< glossary_tooltip text="容器(containers)" term_id="container" >}}都
-运行在 {{< glossary_tooltip text="Pod" term_id="pod" >}} 中。
+`kubelet` 会在集群中每个{{< glossary_tooltip text="节点(node)" term_id="node" >}}上运行。
+它保证{{< glossary_tooltip text="容器(containers)" term_id="container" >}}都运行在
+{{< glossary_tooltip text="Pod" term_id="pod" >}} 中。
-kubelet 接收一组通过各类机制提供给它的 PodSpecs,确保这些 PodSpecs
-中描述的容器处于运行状态且健康。
+kubelet 接收一组通过各类机制提供给它的 PodSpecs,
+确保这些 PodSpecs 中描述的容器处于运行状态且健康。
kubelet 不会管理不是由 Kubernetes 创建的容器。
diff --git a/content/zh/docs/reference/glossary/kubernetes-api.md b/content/zh-cn/docs/reference/glossary/kubernetes-api.md
similarity index 100%
rename from content/zh/docs/reference/glossary/kubernetes-api.md
rename to content/zh-cn/docs/reference/glossary/kubernetes-api.md
diff --git a/content/zh/docs/reference/glossary/label.md b/content/zh-cn/docs/reference/glossary/label.md
similarity index 100%
rename from content/zh/docs/reference/glossary/label.md
rename to content/zh-cn/docs/reference/glossary/label.md
diff --git a/content/zh/docs/reference/glossary/limitrange.md b/content/zh-cn/docs/reference/glossary/limitrange.md
similarity index 100%
rename from content/zh/docs/reference/glossary/limitrange.md
rename to content/zh-cn/docs/reference/glossary/limitrange.md
diff --git a/content/zh/docs/reference/glossary/logging.md b/content/zh-cn/docs/reference/glossary/logging.md
similarity index 100%
rename from content/zh/docs/reference/glossary/logging.md
rename to content/zh-cn/docs/reference/glossary/logging.md
diff --git a/content/zh/docs/reference/glossary/managed-service.md b/content/zh-cn/docs/reference/glossary/managed-service.md
similarity index 100%
rename from content/zh/docs/reference/glossary/managed-service.md
rename to content/zh-cn/docs/reference/glossary/managed-service.md
diff --git a/content/zh/docs/reference/glossary/manifest.md b/content/zh-cn/docs/reference/glossary/manifest.md
similarity index 100%
rename from content/zh/docs/reference/glossary/manifest.md
rename to content/zh-cn/docs/reference/glossary/manifest.md
diff --git a/content/zh/docs/reference/glossary/master.md b/content/zh-cn/docs/reference/glossary/master.md
similarity index 100%
rename from content/zh/docs/reference/glossary/master.md
rename to content/zh-cn/docs/reference/glossary/master.md
diff --git a/content/zh/docs/reference/glossary/member.md b/content/zh-cn/docs/reference/glossary/member.md
similarity index 100%
rename from content/zh/docs/reference/glossary/member.md
rename to content/zh-cn/docs/reference/glossary/member.md
diff --git a/content/zh/docs/reference/glossary/minikube.md b/content/zh-cn/docs/reference/glossary/minikube.md
similarity index 100%
rename from content/zh/docs/reference/glossary/minikube.md
rename to content/zh-cn/docs/reference/glossary/minikube.md
diff --git a/content/zh/docs/reference/glossary/mirror-pod.md b/content/zh-cn/docs/reference/glossary/mirror-pod.md
similarity index 100%
rename from content/zh/docs/reference/glossary/mirror-pod.md
rename to content/zh-cn/docs/reference/glossary/mirror-pod.md
diff --git a/content/zh/docs/reference/glossary/name.md b/content/zh-cn/docs/reference/glossary/name.md
similarity index 100%
rename from content/zh/docs/reference/glossary/name.md
rename to content/zh-cn/docs/reference/glossary/name.md
diff --git a/content/zh/docs/reference/glossary/namespace.md b/content/zh-cn/docs/reference/glossary/namespace.md
similarity index 100%
rename from content/zh/docs/reference/glossary/namespace.md
rename to content/zh-cn/docs/reference/glossary/namespace.md
diff --git a/content/zh/docs/reference/glossary/network-policy.md b/content/zh-cn/docs/reference/glossary/network-policy.md
similarity index 100%
rename from content/zh/docs/reference/glossary/network-policy.md
rename to content/zh-cn/docs/reference/glossary/network-policy.md
diff --git a/content/zh/docs/reference/glossary/node-pressure-eviction.md b/content/zh-cn/docs/reference/glossary/node-pressure-eviction.md
similarity index 100%
rename from content/zh/docs/reference/glossary/node-pressure-eviction.md
rename to content/zh-cn/docs/reference/glossary/node-pressure-eviction.md
diff --git a/content/zh/docs/reference/glossary/node.md b/content/zh-cn/docs/reference/glossary/node.md
similarity index 100%
rename from content/zh/docs/reference/glossary/node.md
rename to content/zh-cn/docs/reference/glossary/node.md
diff --git a/content/zh/docs/reference/glossary/object.md b/content/zh-cn/docs/reference/glossary/object.md
similarity index 100%
rename from content/zh/docs/reference/glossary/object.md
rename to content/zh-cn/docs/reference/glossary/object.md
diff --git a/content/zh/docs/reference/glossary/operator-pattern.md b/content/zh-cn/docs/reference/glossary/operator-pattern.md
similarity index 100%
rename from content/zh/docs/reference/glossary/operator-pattern.md
rename to content/zh-cn/docs/reference/glossary/operator-pattern.md
diff --git a/content/zh/docs/reference/glossary/persistent-volume-claim.md b/content/zh-cn/docs/reference/glossary/persistent-volume-claim.md
similarity index 100%
rename from content/zh/docs/reference/glossary/persistent-volume-claim.md
rename to content/zh-cn/docs/reference/glossary/persistent-volume-claim.md
diff --git a/content/zh/docs/reference/glossary/persistent-volume.md b/content/zh-cn/docs/reference/glossary/persistent-volume.md
similarity index 100%
rename from content/zh/docs/reference/glossary/persistent-volume.md
rename to content/zh-cn/docs/reference/glossary/persistent-volume.md
diff --git a/content/zh/docs/reference/glossary/platform-developer.md b/content/zh-cn/docs/reference/glossary/platform-developer.md
similarity index 100%
rename from content/zh/docs/reference/glossary/platform-developer.md
rename to content/zh-cn/docs/reference/glossary/platform-developer.md
diff --git a/content/zh/docs/reference/glossary/pod-disruption-budget.md b/content/zh-cn/docs/reference/glossary/pod-disruption-budget.md
similarity index 100%
rename from content/zh/docs/reference/glossary/pod-disruption-budget.md
rename to content/zh-cn/docs/reference/glossary/pod-disruption-budget.md
diff --git a/content/zh/docs/reference/glossary/pod-disruption.md b/content/zh-cn/docs/reference/glossary/pod-disruption.md
similarity index 100%
rename from content/zh/docs/reference/glossary/pod-disruption.md
rename to content/zh-cn/docs/reference/glossary/pod-disruption.md
diff --git a/content/zh/docs/reference/glossary/pod-lifecycle.md b/content/zh-cn/docs/reference/glossary/pod-lifecycle.md
similarity index 100%
rename from content/zh/docs/reference/glossary/pod-lifecycle.md
rename to content/zh-cn/docs/reference/glossary/pod-lifecycle.md
diff --git a/content/zh/docs/reference/glossary/pod-priority.md b/content/zh-cn/docs/reference/glossary/pod-priority.md
similarity index 100%
rename from content/zh/docs/reference/glossary/pod-priority.md
rename to content/zh-cn/docs/reference/glossary/pod-priority.md
diff --git a/content/zh/docs/reference/glossary/pod-security-policy.md b/content/zh-cn/docs/reference/glossary/pod-security-policy.md
similarity index 100%
rename from content/zh/docs/reference/glossary/pod-security-policy.md
rename to content/zh-cn/docs/reference/glossary/pod-security-policy.md
diff --git a/content/zh/docs/reference/glossary/pod.md b/content/zh-cn/docs/reference/glossary/pod.md
similarity index 100%
rename from content/zh/docs/reference/glossary/pod.md
rename to content/zh-cn/docs/reference/glossary/pod.md
diff --git a/content/zh/docs/reference/glossary/preemption.md b/content/zh-cn/docs/reference/glossary/preemption.md
similarity index 100%
rename from content/zh/docs/reference/glossary/preemption.md
rename to content/zh-cn/docs/reference/glossary/preemption.md
diff --git a/content/zh/docs/reference/glossary/proxy.md b/content/zh-cn/docs/reference/glossary/proxy.md
similarity index 100%
rename from content/zh/docs/reference/glossary/proxy.md
rename to content/zh-cn/docs/reference/glossary/proxy.md
diff --git a/content/zh/docs/reference/glossary/qos-class.md b/content/zh-cn/docs/reference/glossary/qos-class.md
similarity index 100%
rename from content/zh/docs/reference/glossary/qos-class.md
rename to content/zh-cn/docs/reference/glossary/qos-class.md
diff --git a/content/zh/docs/reference/glossary/quantity.md b/content/zh-cn/docs/reference/glossary/quantity.md
similarity index 100%
rename from content/zh/docs/reference/glossary/quantity.md
rename to content/zh-cn/docs/reference/glossary/quantity.md
diff --git a/content/zh/docs/reference/glossary/rbac.md b/content/zh-cn/docs/reference/glossary/rbac.md
similarity index 100%
rename from content/zh/docs/reference/glossary/rbac.md
rename to content/zh-cn/docs/reference/glossary/rbac.md
diff --git a/content/zh/docs/reference/glossary/replica-set.md b/content/zh-cn/docs/reference/glossary/replica-set.md
similarity index 100%
rename from content/zh/docs/reference/glossary/replica-set.md
rename to content/zh-cn/docs/reference/glossary/replica-set.md
diff --git a/content/zh/docs/reference/glossary/replication-controller.md b/content/zh-cn/docs/reference/glossary/replication-controller.md
similarity index 100%
rename from content/zh/docs/reference/glossary/replication-controller.md
rename to content/zh-cn/docs/reference/glossary/replication-controller.md
diff --git a/content/zh/docs/reference/glossary/resource-quota.md b/content/zh-cn/docs/reference/glossary/resource-quota.md
similarity index 100%
rename from content/zh/docs/reference/glossary/resource-quota.md
rename to content/zh-cn/docs/reference/glossary/resource-quota.md
diff --git a/content/zh/docs/reference/glossary/reviewer.md b/content/zh-cn/docs/reference/glossary/reviewer.md
similarity index 100%
rename from content/zh/docs/reference/glossary/reviewer.md
rename to content/zh-cn/docs/reference/glossary/reviewer.md
diff --git a/content/zh/docs/reference/glossary/secret.md b/content/zh-cn/docs/reference/glossary/secret.md
similarity index 100%
rename from content/zh/docs/reference/glossary/secret.md
rename to content/zh-cn/docs/reference/glossary/secret.md
diff --git a/content/zh/docs/reference/glossary/security-context.md b/content/zh-cn/docs/reference/glossary/security-context.md
similarity index 100%
rename from content/zh/docs/reference/glossary/security-context.md
rename to content/zh-cn/docs/reference/glossary/security-context.md
diff --git a/content/zh/docs/reference/glossary/selector.md b/content/zh-cn/docs/reference/glossary/selector.md
similarity index 100%
rename from content/zh/docs/reference/glossary/selector.md
rename to content/zh-cn/docs/reference/glossary/selector.md
diff --git a/content/zh/docs/reference/glossary/service-account.md b/content/zh-cn/docs/reference/glossary/service-account.md
similarity index 100%
rename from content/zh/docs/reference/glossary/service-account.md
rename to content/zh-cn/docs/reference/glossary/service-account.md
diff --git a/content/zh/docs/reference/glossary/service-broker.md b/content/zh-cn/docs/reference/glossary/service-broker.md
similarity index 100%
rename from content/zh/docs/reference/glossary/service-broker.md
rename to content/zh-cn/docs/reference/glossary/service-broker.md
diff --git a/content/zh/docs/reference/glossary/service-catalog.md b/content/zh-cn/docs/reference/glossary/service-catalog.md
similarity index 100%
rename from content/zh/docs/reference/glossary/service-catalog.md
rename to content/zh-cn/docs/reference/glossary/service-catalog.md
diff --git a/content/zh/docs/reference/glossary/service.md b/content/zh-cn/docs/reference/glossary/service.md
similarity index 100%
rename from content/zh/docs/reference/glossary/service.md
rename to content/zh-cn/docs/reference/glossary/service.md
diff --git a/content/zh/docs/reference/glossary/shuffle-sharding.md b/content/zh-cn/docs/reference/glossary/shuffle-sharding.md
similarity index 100%
rename from content/zh/docs/reference/glossary/shuffle-sharding.md
rename to content/zh-cn/docs/reference/glossary/shuffle-sharding.md
diff --git a/content/zh/docs/reference/glossary/sig.md b/content/zh-cn/docs/reference/glossary/sig.md
similarity index 100%
rename from content/zh/docs/reference/glossary/sig.md
rename to content/zh-cn/docs/reference/glossary/sig.md
diff --git a/content/zh/docs/reference/glossary/statefulset.md b/content/zh-cn/docs/reference/glossary/statefulset.md
similarity index 100%
rename from content/zh/docs/reference/glossary/statefulset.md
rename to content/zh-cn/docs/reference/glossary/statefulset.md
diff --git a/content/zh/docs/reference/glossary/static-pod.md b/content/zh-cn/docs/reference/glossary/static-pod.md
similarity index 100%
rename from content/zh/docs/reference/glossary/static-pod.md
rename to content/zh-cn/docs/reference/glossary/static-pod.md
diff --git a/content/zh/docs/reference/glossary/storage-class.md b/content/zh-cn/docs/reference/glossary/storage-class.md
similarity index 100%
rename from content/zh/docs/reference/glossary/storage-class.md
rename to content/zh-cn/docs/reference/glossary/storage-class.md
diff --git a/content/zh/docs/reference/glossary/sysctl.md b/content/zh-cn/docs/reference/glossary/sysctl.md
similarity index 100%
rename from content/zh/docs/reference/glossary/sysctl.md
rename to content/zh-cn/docs/reference/glossary/sysctl.md
diff --git a/content/zh/docs/reference/glossary/taint.md b/content/zh-cn/docs/reference/glossary/taint.md
similarity index 100%
rename from content/zh/docs/reference/glossary/taint.md
rename to content/zh-cn/docs/reference/glossary/taint.md
diff --git a/content/zh/docs/reference/glossary/toleration.md b/content/zh-cn/docs/reference/glossary/toleration.md
similarity index 100%
rename from content/zh/docs/reference/glossary/toleration.md
rename to content/zh-cn/docs/reference/glossary/toleration.md
diff --git a/content/zh/docs/reference/glossary/uid.md b/content/zh-cn/docs/reference/glossary/uid.md
similarity index 100%
rename from content/zh/docs/reference/glossary/uid.md
rename to content/zh-cn/docs/reference/glossary/uid.md
diff --git a/content/zh/docs/reference/glossary/upstream.md b/content/zh-cn/docs/reference/glossary/upstream.md
similarity index 100%
rename from content/zh/docs/reference/glossary/upstream.md
rename to content/zh-cn/docs/reference/glossary/upstream.md
diff --git a/content/zh/docs/reference/glossary/userns.md b/content/zh-cn/docs/reference/glossary/userns.md
similarity index 100%
rename from content/zh/docs/reference/glossary/userns.md
rename to content/zh-cn/docs/reference/glossary/userns.md
diff --git a/content/zh/docs/reference/glossary/volume-plugin.md b/content/zh-cn/docs/reference/glossary/volume-plugin.md
similarity index 100%
rename from content/zh/docs/reference/glossary/volume-plugin.md
rename to content/zh-cn/docs/reference/glossary/volume-plugin.md
diff --git a/content/zh/docs/reference/glossary/volume.md b/content/zh-cn/docs/reference/glossary/volume.md
similarity index 100%
rename from content/zh/docs/reference/glossary/volume.md
rename to content/zh-cn/docs/reference/glossary/volume.md
diff --git a/content/zh/docs/reference/glossary/wg.md b/content/zh-cn/docs/reference/glossary/wg.md
similarity index 100%
rename from content/zh/docs/reference/glossary/wg.md
rename to content/zh-cn/docs/reference/glossary/wg.md
diff --git a/content/zh/docs/reference/glossary/workload.md b/content/zh-cn/docs/reference/glossary/workload.md
similarity index 100%
rename from content/zh/docs/reference/glossary/workload.md
rename to content/zh-cn/docs/reference/glossary/workload.md
diff --git a/content/zh/docs/reference/issues-security/_index.md b/content/zh-cn/docs/reference/issues-security/_index.md
similarity index 100%
rename from content/zh/docs/reference/issues-security/_index.md
rename to content/zh-cn/docs/reference/issues-security/_index.md
diff --git a/content/zh/docs/reference/issues-security/issues.md b/content/zh-cn/docs/reference/issues-security/issues.md
similarity index 94%
rename from content/zh/docs/reference/issues-security/issues.md
rename to content/zh-cn/docs/reference/issues-security/issues.md
index 23a015a519..0cad3c4329 100644
--- a/content/zh/docs/reference/issues-security/issues.md
+++ b/content/zh-cn/docs/reference/issues-security/issues.md
@@ -1,6 +1,7 @@
---
title: Kubernetes 问题追踪
weight: 10
+aliases: [/zh/cve/, /zh/cves/]
---
-与安全性相关的公告请发送到
+与安全性相关的公告将发送到
[kubernetes-security-announce@googlegroups.com](https://groups.google.com/forum/#!forum/kubernetes-security-announce)
邮件列表。
diff --git a/content/zh/docs/reference/issues-security/security.md b/content/zh-cn/docs/reference/issues-security/security.md
similarity index 68%
rename from content/zh/docs/reference/issues-security/security.md
rename to content/zh-cn/docs/reference/issues-security/security.md
index 3124098682..a6698022b7 100644
--- a/content/zh/docs/reference/issues-security/security.md
+++ b/content/zh-cn/docs/reference/issues-security/security.md
@@ -1,5 +1,6 @@
---
title: Kubernetes 安全和信息披露
+aliases: [/zh/security/]
content_type: concept
weight: 20
---
@@ -27,7 +28,7 @@ This page describes Kubernetes security and disclosure information.
-## 安全公告
+## 安全公告 {#security-announcements}
-## 报告一个漏洞
+## 报告一个漏洞 {#report-a-vulnerability}
我们非常感谢向 Kubernetes 开源社区报告漏洞的安全研究人员和用户。
所有的报告都由社区志愿者进行彻底调查。
-如需报告,请连同安全细节以及预期的[所有 Kubernetes bug 报告](https://git.k8s.io/kubernetes/.github/ISSUE_TEMPLATE/bug-report.md)
-详细信息电子邮件到[security@kubernetes.io](mailto:security@kubernetes.io)列表。
+如需报告,请将你的漏洞提交给 [Kubernetes 漏洞赏金计划](https://hackerone.com/kubernetes)。
+这样做可以使得社区能够在标准化的响应时间内对漏洞进行分类和处理。
你还可以通过电子邮件向私有 [security@kubernetes.io](mailto:security@kubernetes.io)
列表发送电子邮件,邮件中应该包含
[所有 Kubernetes 错误报告](https://github.com/kubernetes/kubernetes/blob/master/.github/ISSUE_TEMPLATE/bug-report.yaml)
所需的详细信息。
+
@@ -68,45 +69,45 @@ GPG 密钥加密你的发往邮件列表的邮件。揭示问题时不需要使
-### 我应该在什么时候报告漏洞?
+### 我应该在什么时候报告漏洞? {#when-should-i-report-a-vulnerability}
- 你认为在 Kubernetes 中发现了一个潜在的安全漏洞
- 你不确定漏洞如何影响 Kubernetes
- 你认为你在 Kubernetes 依赖的另一个项目中发现了一个漏洞
-- 对于具有漏洞报告和披露流程的项目,请直接在该项目处报告
+ - 对于具有漏洞报告和披露流程的项目,请直接在该项目处报告
-### 我什么时候不应该报告漏洞?
+### 我什么时候不应该报告漏洞? {#when-should-i-not-report-a-vulnerability}
-- 你需要帮助调整 Kubernetes 组件的安全性
-- 你需要帮助应用与安全相关的更新
+- 你需要调整 Kubernetes 组件安全性的帮助
+- 你需要应用与安全相关更新的帮助
- 你的问题与安全无关
-## 安全漏洞响应
+## 安全漏洞响应 {#security-vulnerability-response}
-每个报告在 3 个工作日内由安全响应委员会成员确认和分析。这将启动[安全发布过程](https://git.k8s.io/sig-release/security-release-process-documentation/security-release-process.md#disclosures)。
+每个报告在 3 个工作日内由安全响应委员会成员确认和分析,这将启动[安全发布过程](https://git.k8s.io/sig-release/security-release-process-documentation/security-release-process.md#disclosures)。
与安全响应委员会共享的任何漏洞信息都保留在 Kubernetes 项目中,除非有必要修复该问题,否则不会传播到其他项目。
@@ -118,7 +119,7 @@ As the security issue moves from triage, to identified fix, to release planning
-## 公开披露时间
+## 公开披露时间 {#public-disclosure-timing}
-信息披露的时间范围从即时(尤其是已经公开的)到几周。作为一个基本的约定,我们希望报告日期到披露日期的间隔是 7 天。在设置披露日期时,Kubernetes 产品安全团队拥有最终决定权。
-
+信息披露的时间范围从即时(尤其是已经公开的)到几周不等。
+对于具有直接缓解措施的漏洞,我们希望报告日期到披露日期的间隔是 7 天。
+在设置披露日期方面,Kubernetes 安全响应委员会拥有最终决定权。
diff --git a/content/zh/docs/reference/kubectl/overview.md b/content/zh-cn/docs/reference/kubectl/_index.md
similarity index 71%
rename from content/zh/docs/reference/kubectl/overview.md
rename to content/zh-cn/docs/reference/kubectl/_index.md
index ddc83e8536..38659b2e8d 100644
--- a/content/zh/docs/reference/kubectl/overview.md
+++ b/content/zh-cn/docs/reference/kubectl/_index.md
@@ -1,37 +1,40 @@
---
-reviewers:
-- hw-qiaolei
-title: kubectl 概述
-content_type: concept
-weight: 20
+title: 命令行工具 (kubectl)
+content_type: reference
+weight: 60
+no_list: true
card:
name: reference
weight: 20
---
-
+
+{{< glossary_definition prepend="Kubernetes 提供" term_id="kubectl" length="short" >}}
+
+
+这个工具叫做 `kubectl`。
-你可以使用 Kubectl 命令行工具管理 Kubernetes 集群。
-`kubectl` 在 `$HOME/.kube` 目录中查找一个名为 `config` 的配置文件。
-你可以通过设置 KUBECONFIG 环境变量或设置
+`针对配置信息,`kubectl` 在 `$HOME/.kube` 目录中查找一个名为 `config` 的配置文件。
+你可以通过设置 `KUBECONFIG` 环境变量或设置
[`--kubeconfig`](/zh/docs/concepts/configuration/organize-cluster-access-kubeconfig/)
参数来指定其它 [kubeconfig](/zh/docs/concepts/configuration/organize-cluster-access-kubeconfig/) 文件。
@@ -39,24 +42,32 @@ files by setting the KUBECONFIG environment variable or by setting the
This overview covers `kubectl` syntax, describes the command operations, and provides common examples.
For details about each command, including all the supported flags and subcommands, see the
[kubectl](/docs/reference/generated/kubectl/kubectl-commands/) reference documentation.
-For installation instructions see [installing kubectl](/docs/tasks/tools/install-kubectl/).
-->
本文概述了 `kubectl` 语法和命令操作描述,并提供了常见的示例。
有关每个命令的详细信息,包括所有受支持的参数和子命令,
请参阅 [kubectl](/docs/reference/generated/kubectl/kubectl-commands/) 参考文档。
-有关安装说明,请参见[安装 kubectl](/zh/docs/tasks/tools/install-kubectl/) 。
-
-
+
+有关安装说明,请参见[安装 kubectl](/zh/docs/tasks/tools/#kubectl);
+如需快速指南,请参见[备忘单](/zh/docs/reference/kubectl/cheatsheet/)。
+如果你更习惯使用 `docker` 命令行工具,
+[Docker 用户的 `kubectl`](/zh/docs/reference/kubectl/docker-cli-to-kubectl/)
+介绍了一些 Kubernetes 的等价命令。
+
+
## 语法
-
-使用以下语法 `kubectl` 从终端窗口运行命令:
+使用以下语法从终端窗口运行 `kubectl` 命令:
```shell
kubectl [command] [TYPE] [NAME] [flags]
@@ -68,34 +79,36 @@ where `command`, `TYPE`, `NAME`, and `flags` are:
其中 `command`、`TYPE`、`NAME` 和 `flags` 分别是:
* `command`:指定要对一个或多个资源执行的操作,例如 `create`、`get`、`describe`、`delete`。
-* `TYPE`:指定[资源类型](#资源类型)。资源类型不区分大小写,
- 可以指定单数、复数或缩写形式。例如,以下命令输出相同的结果:
+* `TYPE`:指定[资源类型](#resource-types)。资源类型不区分大小写,
+ 可以指定单数、复数或缩写形式。例如,以下命令输出相同的结果:
- ```shell
- kubectl get pod pod1
- kubectl get pods pod1
- kubectl get po pod1
- ```
+ ```shell
+ kubectl get pod pod1
+ kubectl get pods pod1
+ kubectl get po pod1
+ ```
-
* `NAME`:指定资源的名称。名称区分大小写。
- 如果省略名称,则显示所有资源的详细信息 `kubectl get pods`。
+ 如果省略名称,则显示所有资源的详细信息。例如:`kubectl get pods`。
在对多个资源执行操作时,你可以按类型和名称指定每个资源,或指定一个或多个文件:
-
- * 要按类型和名称指定资源:
+-->
+ * 要按类型和名称指定资源:
- * 要对所有类型相同的资源进行分组,请执行以下操作:`TYPE1 name1 name2 name<#>`。
+ * 要对所有类型相同的资源进行分组,请执行以下操作:`TYPE1 name1 name2 name<#>`。
+ 例子:`kubectl get pod example-pod1 example-pod2`
- 例子:`kubectl get pod example-pod1 example-pod2`
+ * 分别指定多个资源类型:`TYPE1/name1 TYPE1/name2 TYPE2/name3 TYPE<#>/name<#>`。
+ 例子:`kubectl get pod/example-pod1 replicationcontroller/example-rc1`
- * 分别指定多个资源类型:`TYPE1/name1 TYPE1/name2 TYPE2/name3 TYPE<#>/name<#>`。
+ * 用一个或多个文件指定资源:`-f file1 -f file2 -f file<#>`
- 例子:`kubectl get pod/example-pod1 replicationcontroller/example-rc1`
-
- * 用一个或多个文件指定资源:`-f file1 -f file2 -f file<#>`
-
- * [使用 YAML 而不是 JSON](/zh/docs/concepts/configuration/overview/#general-configuration-tips)
- 因为 YAML 更容易使用,特别是用于配置文件时。
- 例子:`kubectl get -f ./pod.yaml`
+ * [使用 YAML 而不是 JSON](/zh/docs/concepts/configuration/overview/#general-configuration-tips),
+ 因为 YAML 对用户更友好, 特别是对于配置文件。
+ 例子:`kubectl get -f ./pod.yaml`
-* `flags`: 指定可选的参数。例如,可以使用 `-s` 或 `-server` 参数指定
+* `flags`: 指定可选的参数。例如,可以使用 `-s` 或 `--server` 参数指定
Kubernetes API 服务器的地址和端口。
-{{< caution >}}
+{{< caution >}}
从命令行指定的参数会覆盖默认值和任何相应的环境变量。
{{< /caution >}}
-如果你需要帮助,从终端窗口运行 `kubectl help` 。
+如果你需要帮助,在终端窗口中运行 `kubectl help`。
+
+
+## 集群内身份验证和命名空间覆盖
+
+
+默认情况下,`kubectl` 命令首先确定它是否在 Pod 中运行,从而被视为在集群中运行。
+它首先检查 `KUBERNETES_SERVICE_HOST` 和 `KUBERNETES_SERVICE_PORT` 环境变量以及
+`/var/run/secrets/kubernetes.io/serviceaccount/token` 中是否存在服务帐户令牌文件。
+如果三个条件都被满足,则假定在集群内进行身份验证。
+
+
+为保持向后兼容性,如果在集群内身份验证期间设置了 `POD_NAMESPACE`
+环境变量,它将覆盖服务帐户令牌中的默认命名空间。
+任何依赖默认命名空间的清单或工具都会受到影响。
+
+
+**`POD_NAMESPACE` 环境变量**
+
+
+如果设置了 `POD_NAMESPACE` 环境变量,对命名空间资源的 CLI 操作对象将使用该变量值作为默认值。
+例如,如果该变量设置为 `seattle`,`kubectl get pods` 将返回 `seattle` 命名空间中的 Pod。
+这是因为 Pod 是一个命名空间资源,且命令中没有提供命名空间。
+
+
+直接使用 `--namespace ` 会覆盖此行为。
+
+
+**kubectl 如何处理 ServiceAccount 令牌**
+
+
+假设:
+* 有 Kubernetes 服务帐户令牌文件挂载在
+ `/var/run/secrets/kubernetes.io/serviceaccount/token` 上,并且
+* 设置了 `KUBERNETES_SERVICE_HOST` 环境变量,并且
+* 设置了 `KUBERNETES_SERVICE_PORT` 环境变量,并且
+* 你没有在 kubectl 命令行上明确指定命名空间。
+
+
+然后 kubectl 假定它正在你的集群中运行。
+kubectl 工具查找该 ServiceAccount 的命名空间
+(该命名空间与 Pod 的命名空间相同)并针对该命名空间进行操作。
+这与集群外运行的情况不同;
+当 kubectl 在集群外运行并且你没有指定命名空间时,
+kubectl 命令会针对 `default` 命名空间进行操作。
+操作 | 语法 | 描述
+-------------------- | -------------------- | --------------------
+`alpha` | `kubectl alpha SUBCOMMAND [flags]` | 列出与 alpha 特性对应的可用命令,这些特性在 Kubernetes 集群中默认情况下是不启用的。
+`annotate` | kubectl annotate (-f FILENAME | TYPE NAME | TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--overwrite] [--all] [--resource-version=version] [flags] | 添加或更新一个或多个资源的注解。
+`api-resources` | `kubectl api-resources [flags]` | 列出可用的 API 资源。
+`api-versions` | `kubectl api-versions [flags]` | 列出可用的 API 版本。
+
+`apply` | `kubectl apply -f FILENAME [flags]`| 从文件或 stdin 对资源应用配置更改。
+`attach` | `kubectl attach POD -c CONTAINER [-i] [-t] [flags]` | 挂接到正在运行的容器,查看输出流或与容器(stdin)交互。
+`auth` | `kubectl auth [flags] [options]` | 检查授权。
+`autoscale` | kubectl autoscale (-f FILENAME | TYPE NAME | TYPE/NAME) [--min=MINPODS] --max=MAXPODS [--cpu-percent=CPU] [flags] | 自动扩缩由副本控制器管理的一组 pod。
+`certificate` | `kubectl certificate SUBCOMMAND [options]` | 修改证书资源。
+`cluster-info` | `kubectl cluster-info [flags]` | 显示有关集群中主服务器和服务的端口信息。
+`completion` | `kubectl completion SHELL [options]` | 为指定的 Shell(Bash 或 Zsh)输出 Shell 补齐代码。
+`config` | `kubectl config SUBCOMMAND [flags]` | 修改 kubeconfig 文件。有关详细信息,请参阅各个子命令。
+
+`convert` | `kubectl convert -f FILENAME [options]` | 在不同的 API 版本之间转换配置文件。配置文件可以是 YAML 或 JSON 格式。注意 - 需要安装 `kubectl-convert` 插件。
+`cordon` | `kubectl cordon NODE [options]` | 将节点标记为不可调度。
+`cp` | `kubectl cp [options]` | 从容器复制文件、目录或将文件、目录复制到容器。
+`create` | `kubectl create -f FILENAME [flags]` | 从文件或 stdin 创建一个或多个资源。
+`delete` | kubectl delete (-f FILENAME | TYPE [NAME | /NAME | -l label | --all]) [flags] | 基于文件、标准输入或通过指定标签选择器、名称、资源选择器或资源本身,删除资源。
+`describe` | kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | /NAME | -l label]) [flags] | 显示一个或多个资源的详细状态。
+`diff` | `kubectl diff -f FILENAME [flags]`| 在当前起作用的配置和文件或标准输之间作对比 (**BETA**)
+
+`drain` | `kubectl drain NODE [options]` | 腾空节点以准备维护。
+`edit` | kubectl edit (-f FILENAME | TYPE NAME | TYPE/NAME) [flags] | 使用默认编辑器编辑和更新服务器上一个或多个资源的定义。
+`exec` | `kubectl exec POD [-c CONTAINER] [-i] [-t] [flags] [-- COMMAND [args...]]` | 对 Pod 中的容器执行命令。
+`explain` | `kubectl explain [--recursive=false] [flags]` | 获取多种资源的文档。例如 Pod、Node、Service 等。
+`expose` | kubectl expose (-f FILENAME | TYPE NAME | TYPE/NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type] [flags] | 将副本控制器、服务或 Pod 作为新的 Kubernetes 服务暴露。
+`get` | kubectl get (-f FILENAME | TYPE [NAME | /NAME | -l label]) [--watch] [--sort-by=FIELD] [[-o | --output]=OUTPUT_FORMAT] [flags] | 列出一个或多个资源。
+`kustomize` | kubectl kustomize [flags] [options]` | 列出从 kustomization.yaml 文件中的指令生成的一组 API 资源。参数必须是包含文件的目录的路径,或者是 git 存储库 URL,其路径后缀相对于存储库根目录指定了相同的路径。
+
+`label` | kubectl label (-f FILENAME | TYPE NAME | TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--overwrite] [--all] [--resource-version=version] [flags] | 添加或更新一个或多个资源的标签。
+`logs` | `kubectl logs POD [-c CONTAINER] [--follow] [flags]` | 打印 Pod 中容器的日志。
+`options` | `kubectl options` | 全局命令行选项列表,这些选项适用于所有命令。
+`patch` | kubectl patch (-f FILENAME | TYPE NAME | TYPE/NAME) --patch PATCH [flags] | 使用策略合并流程更新资源的一个或多个字段。
+`plugin` | `kubectl plugin [flags] [options]` | 提供用于与插件交互的实用程序。
+`port-forward` | `kubectl port-forward POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] [flags]` | 将一个或多个本地端口转发到一个 Pod。
+`proxy` | `kubectl proxy [--port=PORT] [--www=static-dir] [--www-prefix=prefix] [--api-prefix=prefix] [flags]` | 运行访问 Kubernetes API 服务器的代理。
+`replace` | `kubectl replace -f FILENAME` | 基于文件或标准输入替换资源。
+`rollout` | `kubectl rollout SUBCOMMAND [options]` | 管理资源的上线。有效的资源类型包括:Deployment、 DaemonSet 和 StatefulSet。
+`run` | kubectl run NAME --image=image [--env="key=value"] [--port=port] [--dry-run=server | client | none] [--overrides=inline-json] [flags] | 在集群上运行指定的镜像。
+
-
-操作 | 语法 | 描述
--------------------- | -------------------- | --------------------
-`alpha` | `kubectl alpha SUBCOMMAND [flags]` | 列出与 alpha 特性对应的可用命令,这些特性在 Kubernetes 集群中默认情况下是不启用的。
-`annotate` | kubectl annotate (-f FILENAME | TYPE NAME | TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--overwrite] [--all] [--resource-version=version] [flags] | 添加或更新一个或多个资源的注解。
-`api-resources` | `kubectl api-resources [flags]` | 列出可用的 API 资源。
-`api-versions` | `kubectl api-versions [flags]` | 列出可用的 API 版本。
-`apply` | `kubectl apply -f FILENAME [flags]`| 从文件或 stdin 对资源应用配置更改。
-`attach` | `kubectl attach POD -c CONTAINER [-i] [-t] [flags]` | 附加到正在运行的容器,查看输出流或与容器(stdin)交互。
-`auth` | `kubectl auth [flags] [options]` | 检查授权。
-`autoscale` | kubectl autoscale (-f FILENAME | TYPE NAME | TYPE/NAME) [--min=MINPODS] --max=MAXPODS [--cpu-percent=CPU] [flags] | 自动伸缩由副本控制器管理的一组 pod。
-`certificate` | `kubectl certificate SUBCOMMAND [options]` | 修改证书资源。
-`cluster-info` | `kubectl cluster-info [flags]` | 显示有关集群中主服务器和服务的端口信息。
-`completion` | `kubectl completion SHELL [options]` | 为指定的 shell (bash 或 zsh)输出 shell 补齐代码。
-`config` | `kubectl config SUBCOMMAND [flags]` | 修改 kubeconfig 文件。有关详细信息,请参阅各个子命令。
-`convert` | `kubectl convert -f FILENAME [options]` | 在不同的 API 版本之间转换配置文件。配置文件可以是 YAML 或 JSON 格式。
-`cordon` | `kubectl cordon NODE [options]` | 将节点标记为不可调度。
-`cp` | `kubectl cp [options]` | 在容器之间复制文件和目录。
-`create` | `kubectl create -f FILENAME [flags]` | 从文件或 stdin 创建一个或多个资源。
-`delete` | kubectl delete (-f FILENAME | TYPE [NAME | /NAME | -l label | --all]) [flags] | 从文件、标准输入或指定标签选择器、名称、资源选择器或资源中删除资源。
-`describe` | kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | /NAME | -l label]) [flags] | 显示一个或多个资源的详细状态。
-`diff` | `kubectl diff -f FILENAME [flags]`| 将 live 配置和文件或标准输入做对比 (**BETA**)
-`drain` | `kubectl drain NODE [options]` | 腾空节点以准备维护。
-`edit` | kubectl edit (-f FILENAME | TYPE NAME | TYPE/NAME) [flags] | 使用默认编辑器编辑和更新服务器上一个或多个资源的定义。
-`exec` | `kubectl exec POD [-c CONTAINER] [-i] [-t] [flags] [-- COMMAND [args...]]` | 对 pod 中的容器执行命令。
-`explain` | `kubectl explain [--recursive=false] [flags]` | 获取多种资源的文档。例如 pod, node, service 等。
-`expose` | kubectl expose (-f FILENAME | TYPE NAME | TYPE/NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type] [flags] | 将副本控制器、服务或 pod 作为新的 Kubernetes 服务暴露。
-`get` | kubectl get (-f FILENAME | TYPE [NAME | /NAME | -l label]) [--watch] [--sort-by=FIELD] [[-o | --output]=OUTPUT_FORMAT] [flags] | 列出一个或多个资源。
-`kustomize` | `kubectl kustomize [flags] [options]` | 列出从 kustomization.yaml 文件中的指令生成的一组 API 资源。参数必须是包含文件的目录的路径,或者是 git 存储库 URL,其路径后缀相对于存储库根目录指定了相同的路径。
-`label` | kubectl label (-f FILENAME | TYPE NAME | TYPE/NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--overwrite] [--all] [--resource-version=version] [flags] | 添加或更新一个或多个资源的标签。
-`logs` | `kubectl logs POD [-c CONTAINER] [--follow] [flags]` | 在 pod 中打印容器的日志。
-`options` | `kubectl options` | 全局命令行选项列表,适用于所有命令。
-`patch` | kubectl patch (-f FILENAME | TYPE NAME | TYPE/NAME) --patch PATCH [flags] | 使用策略合并 patch 程序更新资源的一个或多个字段。
-`plugin` | `kubectl plugin [flags] [options]` | 提供用于与插件交互的实用程序。
-`port-forward` | `kubectl port-forward POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] [flags]` | 将一个或多个本地端口转发到一个 pod。
-`proxy` | `kubectl proxy [--port=PORT] [--www=static-dir] [--www-prefix=prefix] [--api-prefix=prefix] [flags]` | 运行 Kubernetes API 服务器的代理。
-`replace` | `kubectl replace -f FILENAME` | 从文件或标准输入中替换资源。
-`rollout` | `kubectl rollout SUBCOMMAND [options]` | 管理资源的部署。有效的资源类型包括:Deployments, DaemonSets 和 StatefulSets。
-`run` | kubectl run NAME --image=image [--env="key=value"] [--port=port] [--dry-run=server | client | none] [--overrides=inline-json] [flags] | 在集群上运行指定的镜像。
`scale` | kubectl scale (-f FILENAME | TYPE NAME | TYPE/NAME) --replicas=COUNT [--resource-version=version] [--current-replicas=count] [flags] | 更新指定副本控制器的大小。
-`set` | `kubectl set SUBCOMMAND [options]` | 配置应用程序资源。
+`set` | `kubectl set SUBCOMMAND [options]` | 配置应用资源。
`taint` | `kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFECT_N [options]` | 更新一个或多个节点上的污点。
-`top` | `kubectl top [flags] [options]` | 显示资源(CPU/内存/存储)的使用情况。
+`top` | `kubectl top [flags] [options]` | 显示资源(CPU、内存、存储)的使用情况。
`uncordon` | `kubectl uncordon NODE [options]` | 将节点标记为可调度。
`version` | `kubectl version [--client] [flags]` | 显示运行在客户端和服务器上的 Kubernetes 版本。
-`wait` | kubectl wait ([-f FILENAME] | resource.group/resource.name | resource.group [(-l label | --all)]) [--for=delete|--for condition=available] [options] | 实验性:等待一种或多种资源的特定条件。
-
+`wait` | kubectl wait ([-f FILENAME] | resource.group/resource.name | resource.group [(-l label | --all)]) [--for=delete|--for condition=available] [options] | 实验特性:等待一种或多种资源的特定状况。
-了解更多有关命令操作的信息,请参阅 [kubectl](/zh/docs/reference/kubectl/kubectl/) 参考文档。
+了解更多有关命令操作的信息,
+请参阅 [kubectl](/zh/docs/reference/kubectl/kubectl/) 参考文档。
-
## 资源类型
-下表列出所有受支持的资源类型及其缩写别名:
+下表列出所有受支持的资源类型及其缩写别名。
| 资源名 | 缩写名 | API 分组 | 按命名空间 | 资源类型 |
|---|---|---|---|---|
@@ -388,7 +421,6 @@ The following table includes a list of all the supported resource types and thei
| `storageclasses` | `sc` | storage.k8s.io | false | StorageClass |
| `volumeattachments` | | storage.k8s.io | false | VolumeAttachment |
-
@@ -398,7 +430,8 @@ The following table includes a list of all the supported resource types and thei
-有关如何格式化或排序某些命令的输出的信息,请使用以下部分。有关哪些命令支持各种输出选项的详细信息,请参阅[kubectl](/zh/docs/reference/kubectl/kubectl/) 参考文档。
+有关如何格式化或排序某些命令的输出的信息,请参阅以下章节。有关哪些命令支持不同输出选项的详细信息,
+请参阅 [kubectl](/zh/docs/reference/kubectl/kubectl/) 参考文档。
-所有 `kubectl` 命令的默认输出格式都是人类可读的纯文本格式。要以特定格式向终端窗口输出详细信息,可以将 `-o` 或 `--output` 参数添加到受支持的 `kubectl` 命令中。
+所有 `kubectl` 命令的默认输出格式都是人类可读的纯文本格式。要以特定格式在终端窗口输出详细信息,
+可以将 `-o` 或 `--output` 参数添加到受支持的 `kubectl` 命令中。
-根据 `kubectl` 操作,支持以下输出格式:
+取决于具体的 `kubectl` 操作,支持的输出格式如下:
-Output format | Description
+输出格式 | 描述
--------------| -----------
`-o custom-columns=` | 使用逗号分隔的[自定义列](#custom-columns)列表打印表。
`-o custom-columns-file=` | 使用 `` 文件中的[自定义列](#custom-columns)模板打印表。
@@ -444,10 +478,9 @@ Output format | Description
`-o jsonpath=` | 打印 [jsonpath](/zh/docs/reference/kubectl/jsonpath/) 表达式定义的字段
`-o jsonpath-file=` | 打印 `` 文件中 [jsonpath](/zh/docs/reference/kubectl/jsonpath/) 表达式定义的字段。
`-o name` | 仅打印资源名称而不打印任何其他内容。
-`-o wide` | 以纯文本格式输出,包含任何附加信息。对于 pod 包含节点名。
+`-o wide` | 以纯文本格式输出,包含所有附加信息。对于 Pod 包含节点名。
`-o yaml` | 输出 YAML 格式的 API 对象。
-
@@ -457,27 +490,29 @@ Output format | Description
-在此示例中,以下命令将单个 pod 的详细信息输出为 YAML 格式的对象:
+在此示例中,以下命令将单个 Pod 的详细信息输出为 YAML 格式的对象:
```shell
kubectl get pod web-pod-13je7 -o yaml
```
-
-请记住:有关每个命令支持哪种输出格式的详细信息,请参阅 [kubectl](/zh/docs/reference/kubectl/kubectl/) 参考文档。
+请记住:有关每个命令支持哪种输出格式的详细信息,
+请参阅 [kubectl](/zh/docs/reference/kubectl/kubectl/) 参考文档。
-#### 自定义列
+#### 自定义列 {#custom-columns}
-要定义自定义列并仅将所需的详细信息输出到表中,可以使用该 custom-columns 选项。你可以选择内联定义自定义列或使用模板文件:`-o=custom-columns=` 或 `-o=custom-columns-file=`。
+要定义自定义列并仅将所需的详细信息输出到表中,可以使用 `custom-columns` 选项。
+你可以选择内联定义自定义列或使用模板文件:`-o custom-columns=` 或 `-o custom-columns-file=`。
-运行任何一个命令的结果类似于:
+运行这两个命令之一的结果类似于:
```shell
NAME RSRC
@@ -550,7 +585,7 @@ This feature is enabled by default. To disable it, add the
-要打印有关 pod 状态的信息,请使用如下命令:
+要打印有关 Pod 状态的信息,请使用如下命令:
```shell
kubectl get pods --server-print=false
@@ -574,7 +609,9 @@ pod-name 1m
-要将对象排序后输出到终端窗口,可以将 `--sort-by` 参数添加到支持的 `kubectl` 命令。通过使用 `--sort-by` 参数指定任何数字或字符串字段来对对象进行排序。要指定字段,请使用 [jsonpath](/zh/docs/reference/kubectl/jsonpath/) 表达式。
+要将对象排序后输出到终端窗口,可以将 `--sort-by` 参数添加到支持的 `kubectl` 命令。
+通过使用 `--sort-by` 参数指定任何数字或字符串字段来对对象进行排序。
+要指定字段,请使用 [jsonpath](/zh/docs/reference/kubectl/jsonpath/) 表达式。
-要打印按名称排序的 pod 列表,请运行:
+要打印按名称排序的 Pod 列表,请运行:
```shell
kubectl get pods --sort-by=.metadata.name
@@ -633,7 +670,7 @@ kubectl apply -f example-service.yaml
# 使用 example-controller.yaml 中的定义创建 replication controller。
kubectl apply -f example-controller.yaml
-# 使用 路径下的任意 .yaml, .yml, 或 .json 文件 创建对象。
+# 使用 路径下的任意 .yaml、.yml 或 .json 文件 创建对象。
kubectl apply -f
```
@@ -644,18 +681,29 @@ kubectl apply -f
```shell
-# 以纯文本输出格式列出所有 pod。
+# 以纯文本输出格式列出所有 Pod。
kubectl get pods
-# 以纯文本输出格式列出所有 pod,并包含附加信息(如节点名)。
+# 以纯文本输出格式列出所有 Pod,并包含附加信息(如节点名)。
kubectl get pods -o wide
# 以纯文本输出格式列出具有指定名称的副本控制器。提示:你可以使用别名 'rc' 缩短和替换 'replicationcontroller' 资源类型。
@@ -667,7 +715,7 @@ kubectl get rc,services
# 以纯文本输出格式列出所有守护程序集,包括未初始化的守护程序集。
kubectl get ds --include-uninitialized
-# 列出在节点 server01 上运行的所有 pod
+# 列出在节点 server01 上运行的所有 Pod
kubectl get pods --field-selector=spec.nodeName=server01
```
@@ -687,22 +735,22 @@ kubectl describe pods/
# Remember: Any pods that are created by the replication controller get prefixed with the name of the replication controller.
kubectl describe pods
-# Describe all pods, not including uninitialized ones
+# Describe all pods
kubectl describe pods
-->
```shell
-# 显示名称为 的节点的详细信息。
+# 显示名为 的 Pod 的详细信息。
kubectl describe nodes
-# 显示名为 的 pod 的详细信息。
+# 显示名为 的 Pod 的详细信息。
kubectl describe pods/
-# 显示由名为 的副本控制器管理的所有 pod 的详细信息。
-# 记住:副本控制器创建的任何 pod 都以复制控制器的名称为前缀。
+# 显示由名为 的副本控制器管理的所有 Pod 的详细信息。
+# 记住:副本控制器创建的任何 Pod 都以副本控制器的名称为前缀。
kubectl describe pods
-# 描述所有的 pod,不包括未初始化的 pod
+# 描述所有的 Pod
kubectl describe pods
```
@@ -719,17 +767,18 @@ API server to build a view for the user. For example, the `kubectl describe node
command retrieves not only the information about the node, but also a summary of
the pods running on it, the events generated for the node etc.
-->
-`kubectl get` 命令通常用于检索同一资源类型的一个或多个资源。
-它具有丰富的参数,允许你使用 `-o` 或 `--output` 参数自定义输出格式。你可以指定 `-w` 或 `--watch` 参数以开始观察特定对象的更新。
+`kubectl get` 命令通常用于检索同一资源类别的一个或多个资源。
+它具有丰富的参数,允许你使用 `-o` 或 `--output` 参数自定义输出格式。
+你可以指定 `-w` 或 `--watch` 参数以开始监测特定对象的更新。
`kubectl describe` 命令更侧重于描述指定资源的许多相关方面。它可以调用对 `API 服务器` 的多个 API 调用来为用户构建视图。
-例如,该 `kubectl describe node` 命令不仅检索有关节点的信息,还检索在其上运行的 pod 的摘要,为节点生成的事件等。
+例如,该 `kubectl describe node` 命令不仅检索有关节点的信息,还检索在其上运行的 Pod 的摘要,为节点生成的事件等。
{{< /note >}}
-`kubectl delete` - 从文件、stdin 或指定标签选择器、名称、资源选择器或资源中删除资源。
+`kubectl delete` - 基于文件、标准输入或通过指定标签选择器、名称、资源选择器或资源来删除资源。
```shell
-# 使用 pod.yaml 文件中指定的类型和名称删除 pod。
+# 使用 pod.yaml 文件中指定的类型和名称删除 Pod。
kubectl delete -f pod.yaml
# 删除所有带有 '=' 标签的 Pod 和服务。
kubectl delete pods,services -l =
-# 删除所有 pod,包括未初始化的 pod。
+# 删除所有 Pod,包括未初始化的 Pod。
kubectl delete pods --all
```
-`kubectl exec` - 对 pod 中的容器执行命令。
+`kubectl exec` - 对 Pod 中的容器执行命令。
```shell
-# 从 pod 中获取运行 'date' 的输出。默认情况下,输出来自第一个容器。
+# 从 Pod 中获取运行 'date' 的输出。默认情况下,输出来自第一个容器。
kubectl exec -- date
-# 运行输出 'date' 获取在容器的 中 pod 的输出。
+# 运行输出 'date' 获取在 Pod 中容器 的输出。
kubectl exec -c -- date
-# 获取一个交互 TTY 并运行 /bin/bash 。默认情况下,输出来自第一个容器。
+# 获取一个交互 TTY 并在 Pod 中运行 /bin/bash。默认情况下,输出来自第一个容器。
kubectl exec -ti -- /bin/bash
```
@@ -797,13 +846,34 @@ kubectl logs -f
-->
```shell
-# 从 pod 返回日志快照。
+# 返回 Pod 的日志快照。
kubectl logs
-# 从 pod 开始流式传输日志。这类似于 'tail -f' Linux 命令。
+# 从 Pod 开始流式传输日志。这类似于 'tail -f' Linux 命令。
kubectl logs -f
```
+
+`kubectl diff` - 查看集群建议更新的差异。
+
+```shell
+# “pod.json”中包含的差异资源。
+kubectl diff -f pod.json
+
+# 从标准输入读取的差异文件。
+cat service.yaml | kubectl diff -f -
+```
+
@@ -820,11 +890,31 @@ Use the following set of examples to help you familiarize yourself with writing
# create a simple plugin in any language and name the resulting executable file
# so that it begins with the prefix "kubectl-"
cat ./kubectl-hello
+```
+-->
+```shell
+# 用任何语言创建一个简单的插件,并为生成的可执行文件命名
+# 以前缀 "kubectl-" 开始
+cat ./kubectl-hello
+```
+
+
+
+```shell
+#!/bin/sh
+
+# 这个插件打印单词 "hello world"
+echo "hello world"
+```
+
+
-```shell
-# 用任何语言创建一个简单的插件,并为生成的可执行文件命名
-# 以前缀 "kubectl-" 开始
-cat ./kubectl-hello
-```
-```shell
-#!/bin/sh
-
-# 这个插件打印单词 "hello world"
-echo "hello world"
-```
这个插件写好了,把它变成可执行的:
```bash
+
sudo chmod a+x ./kubectl-hello
# 并将其移动到路径中的某个位置
@@ -862,6 +942,7 @@ sudo chown root:root /usr/local/bin
# 你可以开始使用这个插件,从 kubectl 调用它,就像它是一个常规命令一样
kubectl hello
```
+
```
hello world
```
@@ -873,7 +954,7 @@ sudo rm /usr/local/bin/kubectl-hello
```
-->
```shell
-# 你可以"卸载"一个插件,只需从你的路径中删除它
+# 你可以"卸载"一个插件,只需从你的 $PATH 中删除它
sudo rm /usr/local/bin/kubectl-hello
```
@@ -887,13 +968,6 @@ kubectl plugin list
```
输出类似于:
```
@@ -911,23 +985,12 @@ sudo chmod -x /usr/local/bin/kubectl-foo # remove execute permission
kubectl plugin list
```
-->
-`kubectl plugin list`指令也可以向你告警哪些插件被运行,或是被其它插件覆盖了,例如:
+`kubectl plugin list` 指令也可以向你告警哪些插件被运行,或是被其它插件覆盖了,例如:
```shell
sudo chmod -x /usr/local/bin/kubectl-foo # 删除执行权限
kubectl plugin list
```
-
```
The following kubectl-compatible plugins are available:
@@ -945,10 +1008,6 @@ of the existing kubectl commands:
-->
你可以将插件视为在现有 kubectl 命令之上构建更复杂功能的一种方法:
-
```shell
cat ./kubectl-whoami
```
@@ -957,7 +1016,7 @@ cat ./kubectl-whoami
The next few examples assume that you already made `kubectl-whoami` have
the following contents:
-->
-接下来的几个示例假设你已经将 `kubectl-whoami` 设置为以下内容:
+接下来的几个示例假设你已经将 `kubectl-whoami` 设置为以下内容:
-运行以上命令将为你提供一个输出,其中包含 KUBECONFIG 文件中当前上下文的用户:
+运行以上命令将为你提供一个输出,其中包含 KUBECONFIG 文件中当前上下文的用户:
-要了解关于插件的更多信息,请查看[示例 cli 插件](https://github.com/kubernetes/sample-cli-plugin)。
-
-
-
## {{% heading "whatsnext" %}}
-* 开始使用 [kubectl](/docs/reference/generated/kubectl/kubectl-commands/) 命令。
-
-* 查看更多[示例 cli 插件](https://github.com/kubernetes/sample-cli-plugin)。
+* 阅读 `kubectl` 参考文档:
+ * kubectl [命令参考](/zh/docs/reference/kubectl/kubectl/)
+ * 参考[命令行参数](/docs/reference/generated/kubectl/kubectl-commands/)
+* 学习关于 [`kubectl` 使用约定](/zh/docs/reference/kubectl/conventions/)
+* 阅读 kubectl 中的 [JSONPath 支持](/zh/docs/reference/kubectl/jsonpath/)
+* 了解如何[使用插件扩展 kubectl](/zh/docs/tasks/extend-kubectl/kubectl-plugins)
+ * 查看更多[示例 cli 插件](https://github.com/kubernetes/sample-cli-plugin)。
\ No newline at end of file
diff --git a/content/zh/docs/reference/kubectl/cheatsheet.md b/content/zh-cn/docs/reference/kubectl/cheatsheet.md
similarity index 87%
rename from content/zh/docs/reference/kubectl/cheatsheet.md
rename to content/zh-cn/docs/reference/kubectl/cheatsheet.md
index 4bd973b8bd..a55fbf4b38 100644
--- a/content/zh/docs/reference/kubectl/cheatsheet.md
+++ b/content/zh-cn/docs/reference/kubectl/cheatsheet.md
@@ -1,6 +1,7 @@
---
title: kubectl 备忘单
content_type: concept
+weight: 10
card:
name: reference
weight: 30
@@ -12,6 +13,7 @@ reviewers:
- krousey
- clove
content_type: concept
+weight: 10 # highlight it
card:
name: reference
weight: 30
@@ -70,6 +72,18 @@ source <(kubectl completion zsh) # 在 zsh 中设置当前 shell 的自动补
echo "[[ $commands[kubectl] ]] && source <(kubectl completion zsh)" >> ~/.zshrc # 在您的 zsh shell 中永久的添加自动补全
```
+
+### 关于 --all-namespaces 的一点说明
+
+
+我们经常用到 `--all-namespaces` 参数,你应该要知道它的简写:
+
+```kubectl -A```
+
```bash
@@ -140,6 +158,11 @@ kubectl config set-context gce --user=cluster-admin --namespace=foo \
&& kubectl config use-context gce
kubectl config unset users.foo # 删除用户 foo
+
+# 设置或显示 context / namespace 的短别名
+# (仅适用于 bash 和 bash 兼容的 shell,在使用 kn 设置命名空间之前要先设置 current-context)
+alias kx='f() { [ "$1" ] && kubectl config use-context $1 || kubectl config current-context ; } ; f'
+alias kn='f() { [ "$1" ] && kubectl config set-context --current --namespace $1 || kubectl config view --minify | grep namespace | cut -d" " -f6 ; } ; f'
```
```bash
@@ -390,8 +416,8 @@ kubectl get pods --selector=app=cassandra -o \
kubectl get configmap myconfig \
-o jsonpath='{.data.ca\.crt}'
-# 获取所有工作节点(使用选择器以排除标签名称为 'node-role.kubernetes.io/master' 的结果)
-kubectl get node --selector='!node-role.kubernetes.io/master'
+# 获取所有工作节点(使用选择器以排除标签名称为 'node-role.kubernetes.io/control-plane' 的结果)
+kubectl get node --selector='!node-role.kubernetes.io/control-plane'
# 获取当前命名空间中正在运行的 Pods
kubectl get pods --field-selector=status.phase=Running
@@ -429,14 +455,17 @@ kubectl diff -f ./my-manifest.yaml
# 生成一个句点分隔的树,其中包含为节点返回的所有键
# 在复杂的嵌套JSON结构中定位键时非常有用
-kubectl get nodes -o json | jq -c 'path(..)|[.[]|tostring]|join(".")'
+kubectl get nodes -o json | jq -c 'paths|join(".")'
# 生成一个句点分隔的树,其中包含为pod等返回的所有键
-kubectl get pods -o json | jq -c 'path(..)|[.[]|tostring]|join(".")'
+kubectl get pods -o json | jq -c 'paths|join(".")'
# 假设你的 Pods 有默认的容器和默认的名字空间,并且支持 'env' 命令,可以使用以下脚本为所有 Pods 生成 ENV 变量。
# 该脚本也可用于在所有的 Pods 里运行任何受支持的命令,而不仅仅是 'env'。
for pod in $(kubectl get po --output=jsonpath={.items..metadata.name}); do echo $pod && kubectl exec -it $pod -- env; done
+
+# 获取一个 Deployment 的 status 子资源
+kubectl get deployment nginx-deployment --subresource=status
```
```bash
@@ -529,6 +561,9 @@ kubectl patch deployment valid-deployment --type json -p='[{"op": "remove", "
# 在带位置数组中添加元素
kubectl patch sa default --type='json' -p='[{"op": "add", "path": "/secrets/1", "value": {"name": "whatever" } }]'
+
+# 通过修正 scale 子资源来更新 Deployment 的副本数
+kubectl patch deployment nginx-deployment --subresource='scale' --type='merge' -p '{"spec":{"replicas":2}}'
```
+## 从容器中复制文件和目录
+
+
+```bash
+kubectl cp /tmp/foo_dir my-pod:/tmp/bar_dir # 将 /tmp/foo_dir 本地目录复制到远程当前命名空间中 Pod 中的 /tmp/bar_dir
+kubectl cp /tmp/foo my-pod:/tmp/bar -c my-container # 将 /tmp/foo 本地文件复制到远程 Pod 中特定容器的 /tmp/bar 下
+kubectl cp /tmp/foo my-namespace/my-pod:/tmp/bar # 将 /tmp/foo 本地文件复制到远程 “my-namespace” 命名空间内指定 Pod 中的 /tmp/bar
+kubectl cp my-namespace/my-pod:/tmp/foo /tmp/bar # 将 /tmp/foo 从远程 Pod 复制到本地 /tmp/bar
+```
+
+
+{{< note >}}
+`kubectl cp` 要求容器镜像中存在 “tar” 二进制文件。如果 “tar” 不存在,`kubectl cp` 将失败。
+对于进阶用例,例如符号链接、通配符扩展或保留文件权限,请考虑使用 `kubectl exec`。
+{{< /note >}}
+
+
+```bash
+tar cf - /tmp/foo | kubectl exec -i -n my-namespace my-pod -- tar xf - -C /tmp/bar # 将 /tmp/foo 本地文件复制到远程 “my-namespace” 命名空间中 pod 中的 /tmp/bar
+kubectl exec -n my-namespace my-pod -- tar cf - /tmp/foo | tar xf - -C /tmp/bar # 将 /tmp/foo 从远程 pod 复制到本地 /tmp/bar
@@ -794,7 +866,7 @@ kubectl get pods -A -o=custom-columns='DATA:spec.containers[?(@.image!="k8s.gcr.
# All fields under metadata regardless of name
kubectl get pods -A -o=custom-columns='DATA:metadata.*'
-More examples in the kubectl [reference documentation](/docs/reference/kubectl/overview/#custom-columns).
+More examples in the kubectl [reference documentation](/docs/reference/kubectl/#custom-columns).
```
-->
使用 `-o=custom-columns` 的示例:
@@ -813,7 +885,7 @@ kubectl get pods -A -o=custom-columns='DATA:spec.containers[?(@.image!="k8s.gcr.
kubectl get pods -A -o=custom-columns='DATA:metadata.*'
```
-有关更多示例,请参看 kubectl [参考文档](/zh/docs/reference/kubectl/overview/#custom-columns)。
+有关更多示例,请参看 kubectl [参考文档](/zh/docs/reference/kubectl/#custom-columns)。
-* 参阅 [kubectl 概述](/zh/docs/reference/kubectl/overview/),进一步了解[JsonPath](/zh/docs/reference/kubectl/jsonpath)。
+* 参阅 [kubectl 概述](/zh/docs/reference/kubectl/),进一步了解 [JsonPath](/zh/docs/reference/kubectl/jsonpath)。
* 参阅 [kubectl](/zh/docs/reference/kubectl/kubectl/) 选项。
* 参阅 [kubectl 使用约定](/zh/docs/reference/kubectl/conventions/)来理解如何在可复用的脚本中使用它。
* 查看社区中其他的 [kubectl 备忘单](https://github.com/dennyzhang/cheatsheet-kubernetes-A4)。
diff --git a/content/zh/docs/reference/kubectl/conventions.md b/content/zh-cn/docs/reference/kubectl/conventions.md
similarity index 87%
rename from content/zh/docs/reference/kubectl/conventions.md
rename to content/zh-cn/docs/reference/kubectl/conventions.md
index ebec31f492..6ab00ca620 100644
--- a/content/zh/docs/reference/kubectl/conventions.md
+++ b/content/zh-cn/docs/reference/kubectl/conventions.md
@@ -1,17 +1,12 @@
---
title: kubectl 的用法约定
-reviewers:
-- janetkuo
content_type: concept
---
-
@@ -26,7 +21,7 @@ Recommended usage conventions for `kubectl`.
-## 在可重用脚本中使用 `kubectl`
+## 在可重用脚本中使用 `kubectl` {#using-kubectl-in-reusable-scripts}
* 你可以将 `--subresource` alpha 标志用于 kubectl 命令,例如 `get`、`patch`、`edit` 和 `replace`
- 来获取和更新所有支持子资源的资源的子资源。 目前,仅支持 `status` 和 `scale` 子资源。
-* 针对子资源的 API 协定与完整资源相同。在更新`status` 子资源为一个新值时,请记住,
+ 来获取和更新所有支持子资源的资源的子资源。目前,仅支持 `status` 和 `scale` 子资源。
+* 针对子资源的 API 协定与完整资源相同。在更新 `status` 子资源为一个新值时,请记住,
子资源可能是潜在的由控制器调和为不同的值。
-## 最佳实践
+## 最佳实践 {#best-practices}
### `kubectl run`
@@ -80,7 +75,8 @@ For `kubectl run` to satisfy infrastructure as code:
* Switch to configuration files checked into source control for features that are needed, but not expressible via `kubectl run` flags.
-->
-* 使用特定版本的标签标记镜像,不要将该标签移动到新版本。例如,使用 `:v1234`、`v1.2.3`、`r03062016-1-4`,而不是 `:latest`(有关详细信息,请参阅[配置的最佳实践](/zh/docs/concepts/configuration/overview/#container-images))。
+* 使用特定版本的标签标记镜像,不要将该标签改为新版本。例如使用 `:v1234`、`v1.2.3`、`r03062016-1-4`,
+ 而不是 `:latest`(有关详细信息,请参阅[配置的最佳实践](/zh/docs/concepts/configuration/overview/#container-images))。
* 使用基于版本控制的脚本来运行包含大量参数的镜像。
* 对于无法通过 `kubectl run` 参数来表示的功能特性,使用基于源码控制的配置文件,以记录要使用的功能特性。
diff --git a/content/zh/docs/reference/kubectl/docker-cli-to-kubectl.md b/content/zh-cn/docs/reference/kubectl/docker-cli-to-kubectl.md
similarity index 91%
rename from content/zh/docs/reference/kubectl/docker-cli-to-kubectl.md
rename to content/zh-cn/docs/reference/kubectl/docker-cli-to-kubectl.md
index 0b32ecafdc..a2e3b49848 100644
--- a/content/zh/docs/reference/kubectl/docker-cli-to-kubectl.md
+++ b/content/zh-cn/docs/reference/kubectl/docker-cli-to-kubectl.md
@@ -1,23 +1,18 @@
---
title: 适用于 Docker 用户的 kubectl
content_type: concept
-reviewers:
-- brendandburns
-- thockin
---
你可以使用 Kubernetes 命令行工具 `kubectl` 与 API 服务器进行交互。如果你熟悉 Docker 命令行工具,
则使用 kubectl 非常简单。但是,Docker 命令和 kubectl 命令之间有一些区别。以下显示了 Docker 子命令,
@@ -30,8 +25,12 @@ You can use the Kubernetes command line tool `kubectl` to interact with the API
-要运行 nginx 部署并将其暴露,请参见[kubectl create deployment](/docs/reference/generated/kubectl/kubectl-commands#-em-deployment-em-)
+要运行 nginx 部署并将其暴露,请参见 [kubectl create deployment](/docs/reference/generated/kubectl/kubectl-commands#-em-deployment-em-)
+
+
+使用 docker 命令:
```shell
docker run -d --restart=always -e DOMAIN=cluster --name nginx-app -p 80:80 nginx
@@ -48,7 +47,10 @@ CONTAINER ID IMAGE COMMAND CREATED
55c103fa1296 nginx "nginx -g 'daemon of…" 9 seconds ago Up 9 seconds 0.0.0.0:80->80/tcp nginx-app
```
+
+使用 kubectl 命令:
在 kubectl 命令中,我们创建了一个 [Deployment](/zh/docs/concepts/workloads/controllers/deployment/),
-这将保证有 N 个运行 nginx 的 Pod(N 代表 spec 中声明的 replica 数,默认为 1)。
+这将保证有 N 个运行 nginx 的 Pod(N 代表 spec 中声明的 replica 数,默认为 1)。
我们还创建了一个 [service](/zh/docs/concepts/services-networking/service/),其选择器与容器标签匹配。
查看[使用服务访问集群中的应用程序](/zh/docs/tasks/access-application-cluster/service-access-application-cluster) 获取更多信息。
@@ -115,7 +117,7 @@ kubectl run [-i] [--tty] --attach --image=
Unlike `docker run ...`, if you specify `--attach`, then you attach `stdin`, `stdout` and `stderr`. You cannot control which streams are attached (`docker -a ...`).
To detach from the container, you can type the escape sequence Ctrl+P followed by Ctrl+Q.
-->
-与 `docker run ...` 不同的是,如果指定了 `--attach` ,我们将连接到 `stdin`,`stdout` 和 `stderr`,
+与 `docker run ...` 不同的是,如果指定了 `--attach`,我们将连接到 `stdin`,`stdout` 和 `stderr`,
而不能控制具体连接到哪个输出流(`docker -a ...`)。要从容器中退出,可以输入 Ctrl + P,然后按 Ctrl + Q。
因为我们使用 Deployment 启动了容器,如果你终止连接到的进程(例如 `ctrl-c`),容器将会重启,
-这跟 `docker run -it` 不同。 如果想销毁该 Deployment(和它的 Pod),
+这跟 `docker run -it` 不同。如果想销毁该 Deployment(和它的 Pod),
你需要运行 `kubectl delete deployment `。
## docker ps
@@ -271,7 +273,7 @@ docker exec -ti 55c103fa1296 /bin/sh
kubectl:
```shell
-kubectl exec -ti nginx-app-5jyvm -- /bin/sh
+kubectl exec -ti nginx-app-5jyvm -- /bin/sh
# exit
```
@@ -318,9 +320,9 @@ kubectl logs -f nginx-app-zibvs
There is a slight difference between pods and containers; by default pods do not terminate if their processes exit. Instead the pods restart the process. This is similar to the docker run option `--restart=always` with one major difference. In docker, the output for each invocation of the process is concatenated, but for Kubernetes, each invocation is separate. To see the output from a previous run in Kubernetes, do this:
-->
现在是时候提一下 Pod 和容器之间的细微差别了;默认情况下如果 Pod 中的进程退出 Pod 也不会终止,
-相反它将会重启该进程。这类似于 docker run 时的 `--restart=always` 选项, 这是主要差别。
-在 docker 中,进程的每个调用的输出都是被连接起来的,但是对于 kubernetes,每个调用都是分开的。
-要查看以前在 kubernetes 中执行的输出,请执行以下操作:
+相反它将会重启该进程。这类似于 docker run 时的 `--restart=always` 选项,这是主要差别。
+在 docker 中,进程的每个调用的输出都是被连接起来的,但是对于 Kubernetes,每个调用都是分开的。
+要查看以前在 Kubernetes 中执行的输出,请执行以下操作:
```shell
kubectl logs --previous nginx-app-zibvs
@@ -403,7 +405,7 @@ kubectl get po -l app=nginx-app
{{< note >}}
请注意,我们不直接删除 Pod。使用 kubectl 命令,我们要删除拥有该 Pod 的 Deployment。
如果我们直接删除 Pod,Deployment 将会重新创建该 Pod。
@@ -501,10 +503,10 @@ kubectl:
kubectl cluster-info
```
```
-Kubernetes master is running at https://108.59.85.141
-KubeDNS is running at https://108.59.85.141/api/v1/namespaces/kube-system/services/kube-dns/proxy
-kubernetes-dashboard is running at https://108.59.85.141/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy
-Grafana is running at https://108.59.85.141/api/v1/namespaces/kube-system/services/monitoring-grafana/proxy
-Heapster is running at https://108.59.85.141/api/v1/namespaces/kube-system/services/monitoring-heapster/proxy
-InfluxDB is running at https://108.59.85.141/api/v1/namespaces/kube-system/services/monitoring-influxdb/proxy
+Kubernetes master is running at https://203.0.113.141
+KubeDNS is running at https://203.0.113.141/api/v1/namespaces/kube-system/services/kube-dns/proxy
+kubernetes-dashboard is running at https://203.0.113.141/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy
+Grafana is running at https://203.0.113.141/api/v1/namespaces/kube-system/services/monitoring-grafana/proxy
+Heapster is running at https://203.0.113.141/api/v1/namespaces/kube-system/services/monitoring-heapster/proxy
+InfluxDB is running at https://203.0.113.141/api/v1/namespaces/kube-system/services/monitoring-influxdb/proxy
```
diff --git a/content/zh/docs/reference/kubectl/jsonpath.md b/content/zh-cn/docs/reference/kubectl/jsonpath.md
similarity index 100%
rename from content/zh/docs/reference/kubectl/jsonpath.md
rename to content/zh-cn/docs/reference/kubectl/jsonpath.md
diff --git a/content/zh/docs/reference/kubectl/kubectl-cmds.md b/content/zh-cn/docs/reference/kubectl/kubectl-cmds.md
similarity index 100%
rename from content/zh/docs/reference/kubectl/kubectl-cmds.md
rename to content/zh-cn/docs/reference/kubectl/kubectl-cmds.md
diff --git a/content/zh/docs/reference/kubectl/kubectl.md b/content/zh-cn/docs/reference/kubectl/kubectl.md
similarity index 100%
rename from content/zh/docs/reference/kubectl/kubectl.md
rename to content/zh-cn/docs/reference/kubectl/kubectl.md
diff --git a/content/zh/docs/reference/kubernetes-api/_index.md b/content/zh-cn/docs/reference/kubernetes-api/_index.md
similarity index 100%
rename from content/zh/docs/reference/kubernetes-api/_index.md
rename to content/zh-cn/docs/reference/kubernetes-api/_index.md
diff --git a/content/zh/docs/reference/kubernetes-api/authentication-resources/_index.md b/content/zh-cn/docs/reference/kubernetes-api/authentication-resources/_index.md
similarity index 100%
rename from content/zh/docs/reference/kubernetes-api/authentication-resources/_index.md
rename to content/zh-cn/docs/reference/kubernetes-api/authentication-resources/_index.md
diff --git a/content/zh/docs/reference/kubernetes-api/authentication-resources/service-account-v1.md b/content/zh-cn/docs/reference/kubernetes-api/authentication-resources/service-account-v1.md
similarity index 78%
rename from content/zh/docs/reference/kubernetes-api/authentication-resources/service-account-v1.md
rename to content/zh-cn/docs/reference/kubernetes-api/authentication-resources/service-account-v1.md
index f306b2cf21..8611df1606 100644
--- a/content/zh/docs/reference/kubernetes-api/authentication-resources/service-account-v1.md
+++ b/content/zh-cn/docs/reference/kubernetes-api/authentication-resources/service-account-v1.md
@@ -4,7 +4,7 @@ api_metadata:
import: "k8s.io/api/core/v1"
kind: "ServiceAccount"
content_type: "api_reference"
-description: "ServiceAccount 将以下内容绑定在一起:1. 用户可以理解的名称,也可能是外围系统理解的身份标识 2. 可以验证和授权的主体 3. 一组 secret 。"
+description: "ServiceAccount 将以下内容绑定在一起:1. 用户可以理解的名称,也可能是外围系统理解的身份标识 2. 可以验证和授权的主体 3. 一组 secret。"
title: "ServiceAccount"
weight: 1
auto_generated: true
@@ -27,7 +27,7 @@ The file is auto-generated from the Go source code of the component using a gene
[generator](https://github.com/kubernetes-sigs/reference-docs/). To learn how
to generate the reference documentation, please read
[Contributing to the reference documentation](/docs/contribute/generate-ref-docs/).
-To update the reference content, please follow the
+To update the reference content, please follow the
[Contributing upstream](/docs/contribute/generate-ref-docs/contribute-upstream/)
guide. You can file document formatting bugs against the
[reference-docs](https://github.com/kubernetes-sigs/reference-docs/) project.
@@ -76,20 +76,29 @@ ServiceAccount 将以下内容绑定在一起:
- imagePullSecrets 是对同一命名空间中 Secret 的引用列表,用于拉取引用此 ServiceAccount 的 Pod 中的任何镜像。
- imagePullSecrets 与 Secrets 不同,因为 Secrets 可以挂载在 Pod 中,但 imagePullSecrets 只能由 kubelet 访问。
- 更多信息:https://kubernetes.io/zh/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
+ imagePullSecrets 是对同一命名空间中 Secret 的引用列表,用于拉取引用此 ServiceAccount 的 Pod 中的任何镜像。
+ imagePullSecrets 与 Secrets 不同,因为 Secrets 可以挂载在 Pod 中,但 imagePullSecrets 只能由 kubelet 访问。
+ 更多信息: https://kubernetes.io/zh/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
- **secrets** ([]}}">ObjectReference )
-
+
**补丁策略:基于键 `name` 合并**
- Secrets 是允许使用此 ServiceAccount 运行的 Pod 使用的 Secret 列表。
- 更多信息:https://kubernetes.io/zh/docs/concepts/configuration/secret
+
+ Secrets 是允许使用此 ServiceAccount 运行的 pod 使用的同一命名空间中的秘密列表。
+ 仅当此服务帐户的 “kubernetes.io/enforce-mountable-secrets” 注释设置为 “true” 时,Pod 才限于此列表。
+ 此字段不应用于查找自动生成的服务帐户令牌机密以在 pod 之外使用。
+ 相反,可以使用 TokenRequest API 直接请求令牌,或者可以手动创建服务帐户令牌 secret。
+ 更多信息: https://kubernetes.io/docs/concepts/configuration/secret
## ServiceAccountList {#ServiceAccountList}
@@ -107,13 +116,13 @@ ServiceAccountList 是 ServiceAccount 对象的列表
- **metadata** (}}">ListMeta )
-
+
- 标准列表元数据, 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+ 标准列表元数据, 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
-
- **items** ([]}}">ServiceAccount ), 必需
@@ -121,7 +130,7 @@ ServiceAccountList 是 ServiceAccount 对象的列表
- ServiceAccount 列表,更多信息:https://kubernetes.io/zh/docs/tasks/configure-pod-container/configure-service-account/
+ ServiceAccount 列表,更多信息: https://kubernetes.io/zh/docs/tasks/configure-pod-container/configure-service-account/
-- **name** (**位于路径中**): string, 必需
+- **name** (**路径参数**): string, 必需
-- **namespace** (**位于路径中**): string, 必需
+- **namespace** (**路径参数**): string, 必需
}}">namespace
-- **pretty** (**查询字符串**): string
+- **pretty** (**查询参数**): string
}}">pretty
@@ -198,28 +207,28 @@ GET /api/v1/namespaces/{namespace}/serviceaccounts
-- **namespace** (**位于路径中**): string, 必需
+- **namespace** (**路径参数**): string, 必需
}}">namespace
-- **allowWatchBookmarks** (**查询字符串**): boolean
+- **allowWatchBookmarks** (**查询参数**): boolean
}}">allowWatchBookmarks
-- **continue** (**查询字符串**): string
+- **continue** (**查询参数**): string
}}">continue
-- **fieldSelector** (**查询字符串**): string
+- **fieldSelector** (**查询参数**): string
}}">fieldSelector
@@ -227,7 +236,7 @@ GET /api/v1/namespaces/{namespace}/serviceaccounts
-- **labelSelector** (**查询字符串**): string
+- **labelSelector** (**查询参数**): string
}}">labelSelector
@@ -235,42 +244,42 @@ GET /api/v1/namespaces/{namespace}/serviceaccounts
-- **limit** (*查询字符串*): integer
+- **limit** (**查询参数**): integer
}}">limit
-- **pretty** (**查询字符串**): string
+- **pretty** (**查询参数**): string
}}">pretty
-- **resourceVersion** (**查询字符串**): string
+- **resourceVersion** (**查询参数**): string
}}">resourceVersion
-- **resourceVersionMatch** (**查询字符串**): string
+- **resourceVersionMatch** (**查询参数**): string
}}">resourceVersionMatch
-- **timeoutSeconds** (**查询字符串**): integer
+- **timeoutSeconds** (**查询参数**): integer
}}">timeoutSeconds
-- **watch** (**查询字符串**): boolean
+- **watch** (**查询参数**): boolean
}}">watch
@@ -303,21 +312,21 @@ GET /api/v1/serviceaccounts
-- **allowWatchBookmarks** (**查询字符串**): boolean
+- **allowWatchBookmarks** (**查询参数**): boolean
}}">allowWatchBookmarks
-- **continue** (**查询字符串**): string
+- **continue** (**查询参数**): string
}}">continue
-- **fieldSelector** (**查询字符串**): string
+- **fieldSelector** (**查询参数**): string
}}">fieldSelector
@@ -325,49 +334,49 @@ GET /api/v1/serviceaccounts
-- **labelSelector** (**查询字符串**): string
+- **labelSelector** (**查询参数**): string
}}">labelSelector
-- **limit** (**查询字符串**): integer
+- **limit** (**查询参数**): integer
}}">limit
-- **pretty** (**查询字符串**): string
+- **pretty** (**查询参数**): string
}}">pretty
-- **resourceVersion** (**查询字符串**): string
+- **resourceVersion** (**查询参数**): string
}}">resourceVersion
-- **resourceVersionMatch** (**查询字符串**): string
+- **resourceVersionMatch** (**查询参数**): string
}}">resourceVersionMatch
-- **timeoutSeconds** (**查询字符串**): integer
+- **timeoutSeconds** (**查询参数**): integer
}}">timeoutSeconds
-- **watch** (**查询字符串**): boolean
+- **watch** (**查询参数**): boolean
}}">watch
@@ -400,7 +409,7 @@ POST /api/v1/namespaces/{namespace}/serviceaccounts
-- **namespace** (**位于路径中**): string, 必需
+- **namespace** (**路径参数**): string, 必需
}}">namespace
@@ -412,21 +421,21 @@ POST /api/v1/namespaces/{namespace}/serviceaccounts
-- **dryRun** (**查询字符串**): string
+- **dryRun** (**查询参数**): string
}}">dryRun
-- **fieldManager** (**查询字符串**): string
+- **fieldManager** (**查询参数**): string
}}">fieldManager
-- **fieldValidation** (**查询字符串**): string
+- **fieldValidation** (**查询参数**): string
}}">fieldValidation
@@ -434,7 +443,7 @@ POST /api/v1/namespaces/{namespace}/serviceaccounts
-- **pretty** (**查询字符串**): string
+- **pretty** (**查询参数**): string
}}">pretty
@@ -471,7 +480,7 @@ PUT /api/v1/namespaces/{namespace}/serviceaccounts/{name}
-- **name** (**位于路径中**): string, required
+- **name** (**路径参数**): string, required
name of the ServiceAccount
@@ -479,7 +488,7 @@ PUT /api/v1/namespaces/{namespace}/serviceaccounts/{name}
-- **namespace** (**位于路径中**): string, 必需
+- **namespace** (**路径参数**): string, 必需
}}">namespace
@@ -491,21 +500,21 @@ PUT /api/v1/namespaces/{namespace}/serviceaccounts/{name}
-- **dryRun** (**查询字符串**): string
+- **dryRun** (**查询参数**): string
}}">dryRun
-- **fieldManager** (**查询字符串**): string
+- **fieldManager** (**查询参数**): string
}}">fieldManager
-- **fieldValidation** (**查询字符串**): string
+- **fieldValidation** (**查询参数**): string
}}">fieldValidation
@@ -513,7 +522,7 @@ PUT /api/v1/namespaces/{namespace}/serviceaccounts/{name}
-- **pretty** (**查询字符串**): string
+- **pretty** (**查询参数**): string
}}">pretty
@@ -547,7 +556,7 @@ PATCH /api/v1/namespaces/{namespace}/serviceaccounts/{name}
-- **name** (**位于路径中**): string, 必需
+- **name** (**路径参数**): string, 必需
-- **namespace** (**位于路径中**): string, 必需
+- **namespace** (**路径参数**): string, 必需
}}">namespace
@@ -568,28 +577,28 @@ PATCH /api/v1/namespaces/{namespace}/serviceaccounts/{name}
-- **dryRun** (**查询字符串**): string
+- **dryRun** (**查询参数**): string
}}">dryRun
-- **fieldManager** (**查询字符串**): string
+- **fieldManager** (**查询参数**): string
}}">fieldManager
-- **fieldValidation** (**查询字符串**): string
+- **fieldValidation** (**查询参数**): string
}}">fieldValidation
-- **force** (**查询字符串**): boolean
+- **force** (**查询参数**): boolean
}}">force
@@ -597,7 +606,7 @@ PATCH /api/v1/namespaces/{namespace}/serviceaccounts/{name}
-- **pretty** (**查询字符串**): string
+- **pretty** (**查询参数**): string
}}">pretty
@@ -633,7 +642,7 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts/{name}
-- **name** (**位于路径中**): string, 必需
+- **name** (**路径参数**): string, 必需
-- **namespace** (**位于路径中**): string, 必需
+- **namespace** (**路径参数**): string, 必需
}}">namespace
@@ -654,14 +663,14 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts/{name}
-- **dryRun** (**查询字符串**): string
+- **dryRun** (**查询参数**): string
}}">dryRun
-- **gracePeriodSeconds** (*查询字符串*): integer
+- **gracePeriodSeconds** (**查询参数**): integer
}}">gracePeriodSeconds
@@ -669,7 +678,7 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts/{name}
-- **pretty** (**查询字符串**): string
+- **pretty** (**查询参数**): string
}}">pretty
@@ -709,7 +718,7 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts
-- **namespace** (**位于路径中**): string, 必需
+- **namespace** (**路径参数**): string, 必需
}}">namespace
@@ -719,7 +728,7 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts
-- **continue** (**查询字符串**): string
+- **continue** (**查询参数**): string
}}">continue
@@ -727,14 +736,14 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts
-- **dryRun** (**查询字符串**): string
+- **dryRun** (**查询参数**): string
}}">dryRun
-- **fieldSelector** (**查询字符串**): string
+- **fieldSelector** (**查询参数**): string
}}">fieldSelector
@@ -742,21 +751,21 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts
-- **gracePeriodSeconds** (*查询字符串*): integer
+- **gracePeriodSeconds** (**查询参数**): integer
}}">gracePeriodSeconds
-- **labelSelector** (*查询字符串*): string
+- **labelSelector** (**查询参数**): string
}}">labelSelector
-- **limit** (*查询字符串*): integer
+- **limit** (**查询参数**): integer
}}">limit
@@ -764,35 +773,35 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts
-- **pretty** (**查询字符串**): string
+- **pretty** (**查询参数**): string
}}">pretty
-- **propagationPolicy** (**查询字符串**): string
+- **propagationPolicy** (**查询参数**): string
}}">propagationPolicy
-- **resourceVersion** (**查询字符串**): string
+- **resourceVersion** (**查询参数**): string
}}">resourceVersion
-- **resourceVersionMatch** (**查询字符串**): string
+- **resourceVersionMatch** (**查询参数**): string
}}">resourceVersionMatch
-- **timeoutSeconds** (**查询字符串**): integer
+- **timeoutSeconds** (**查询参数**): integer
}}">timeoutSeconds
@@ -805,4 +814,3 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts
200 (}}">Status ): OK
401: Unauthorized
-
diff --git a/content/zh/docs/reference/kubernetes-api/authentication-resources/token-review-v1.md b/content/zh-cn/docs/reference/kubernetes-api/authentication-resources/token-review-v1.md
similarity index 94%
rename from content/zh/docs/reference/kubernetes-api/authentication-resources/token-review-v1.md
rename to content/zh-cn/docs/reference/kubernetes-api/authentication-resources/token-review-v1.md
index c440a7de35..0ec8dc91be 100644
--- a/content/zh/docs/reference/kubernetes-api/authentication-resources/token-review-v1.md
+++ b/content/zh-cn/docs/reference/kubernetes-api/authentication-resources/token-review-v1.md
@@ -32,7 +32,7 @@ TokenReview attempts to authenticate a token to a known user. Note: TokenReview
-->
## TokenReview {#TokenReview}
-TokenReview 尝试通过验证令牌来确认已知用户。
+TokenReview 尝试通过验证令牌来确认已知用户。
注意:TokenReview 请求可能会被 kube-apiserver 中的 webhook 令牌验证器插件缓存。
@@ -48,7 +48,7 @@ TokenReview 尝试通过验证令牌来确认已知用户。
- 标准对象的元数据,更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+ 标准对象的元数据,更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- **spec** (}}">TokenReviewSpec ), required
@@ -104,10 +104,10 @@ TokenReviewStatus 是令牌认证请求的结果。
- audiences 是身份验证者选择的与 TokenReview 和令牌兼容的受众标识符。 标识符是
- TokenReviewSpec 受众和令牌受众的交集中的任何标识符。 设置 spec.audiences
+ audiences 是身份验证者选择的与 TokenReview 和令牌兼容的受众标识符。标识符是
+ TokenReviewSpec 受众和令牌受众的交集中的任何标识符。设置 spec.audiences
字段的 TokenReview API 的客户端应验证在 status.audiences 字段中返回了兼容的受众标识符,
- 以确保 TokenReview 服务器能够识别受众。 如果 TokenReview
+ 以确保 TokenReview 服务器能够识别受众。如果 TokenReview
返回一个空的 status.audience 字段,其中 status.authenticated 为 “true”,
则该令牌对 Kubernetes API 服务器的受众有效。
@@ -148,7 +148,7 @@ TokenReviewStatus 是令牌认证请求的结果。
+ -->
此用户所属的组的名称。
- **user.uid** (string)
@@ -168,7 +168,7 @@ TokenReviewStatus 是令牌认证请求的结果。
-## 操作 {#Operations}
+## 操作 {#Operations}
diff --git a/content/zh/docs/reference/kubernetes-api/authorization-resources/_index.md b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/_index.md
similarity index 100%
rename from content/zh/docs/reference/kubernetes-api/authorization-resources/_index.md
rename to content/zh-cn/docs/reference/kubernetes-api/authorization-resources/_index.md
diff --git a/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/cluster-role-binding-v1.md b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/cluster-role-binding-v1.md
new file mode 100644
index 0000000000..fbfa9dd428
--- /dev/null
+++ b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/cluster-role-binding-v1.md
@@ -0,0 +1,619 @@
+---
+api_metadata:
+ apiVersion: "rbac.authorization.k8s.io/v1"
+ import: "k8s.io/api/rbac/v1"
+ kind: "ClusterRoleBinding"
+content_type: "api_reference"
+description: "ClusterRoleBinding 引用 ClusterRole,但不包含它。"
+title: "ClusterRoleBinding"
+weight: 6
+auto_generated: false
+---
+
+
+`apiVersion: rbac.authorization.k8s.io/v1`
+
+`import "k8s.io/api/rbac/v1"`
+
+## ClusterRoleBinding {#ClusterRoleBinding}
+
+ClusterRoleBinding 引用 ClusterRole,但不包含它。
+它可以引用全局命名空间中的 ClusterRole,并通过 Subject 添加主体信息。
+
+
+
+- **apiVersion**: rbac.authorization.k8s.io/v1
+
+- **kind**: ClusterRoleBinding
+
+- **metadata** (}}">ObjectMeta )
+
+ 标准对象的元数据。
+
+- **roleRef** (RoleRef),必需
+
+ RoleRef 只能引用全局命名空间中的 ClusterRole。
+ 如果无法解析 RoleRef,则 Authorizer 必定返回一个错误。
+
+
+ **RoleRef 包含指向正被使用的角色的信息。**
+
+ - **roleRef.apiGroup** (string),必需
+
+ apiGroup 是被引用资源的组
+
+ - **roleRef.kind** (string),必需
+
+ kind 是被引用的资源的类别
+
+ - **roleRef.name** (string),必需
+
+ name 是被引用的资源的名称
+
+- **subjects** ([]Subject)
+
+ Subjects 包含角色所适用的对象的引用。
+
+
+ **Subject 包含对角色绑定所适用的对象或用户标识的引用。其中可以包含直接 API 对象的引用或非对象(如用户名和组名)的值。**
+
+ - **subjects.kind** (string),必需
+
+ 被引用的对象的类别。这个 API 组定义的值是 `User`、`Group` 和 `ServiceAccount`。
+ 如果 Authorizer 无法识别类别值,则 Authorizer 应报告一个错误。
+
+ - **subjects.name** (string),必需
+
+ 被引用的对象的名称。
+
+ - **subjects.apiGroup** (string)
+
+ apiGroup 包含被引用主体的 API 组。对于 ServiceAccount 主体默认为 ""。
+ 对于 User 和 Group 主体,默认为 "rbac.authorization.k8s.io"。
+
+ - **subjects.namespace** (string)
+
+ 被引用对象的命名空间。
+ 如果对象类别是 "User" 或 "Group" 等非命名空间作用域的对象且该值不为空,
+ 则 Authorizer 应报告一个错误。
+
+## ClusterRoleBindingList {#ClusterRoleBindingList}
+
+ClusterRoleBindingList 是 ClusterRoleBinding 的集合。
+
+
+
+- **apiVersion**: rbac.authorization.k8s.io/v1
+
+- **kind**: ClusterRoleBindingList
+
+- **metadata** (}}">ListMeta )
+
+ 标准的对象元数据。
+
+- **items** ([]}}">ClusterRoleBinding ),必需
+
+ items 是 ClusterRoleBindings 的列表。
+
+## 操作 {#Operations}
+
+
+
+
+### `get` 读取指定的 ClusterRoleBinding
+
+#### HTTP 请求
+
+GET /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ ClusterRoleBinding 的名称
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+#### 响应
+
+200 (}}">ClusterRoleBinding ): OK
+
+401: Unauthorized
+
+### `list` 列出或观测类别为 ClusterRoleBinding 的对象
+
+#### HTTP 请求
+
+GET /apis/rbac.authorization.k8s.io/v1/clusterrolebindings
+
+#### 参数
+
+- **allowWatchBookmarks** (**查询参数**): boolean
+
+ }}">allowWatchBookmarks
+
+- **continue** (**查询参数**): string
+
+ }}">continue
+
+- **fieldSelector** (**查询参数**): string
+
+ }}">fieldSelector
+
+- **labelSelector** (**查询参数**): string
+
+ }}">labelSelector
+
+- **limit** (**查询参数**): integer
+
+ }}">limit
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **resourceVersion** (**查询参数**): string
+
+ }}">resourceVersion
+
+- **resourceVersionMatch** (**查询参数**): string
+
+ }}">resourceVersionMatch
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+- **watch** (**查询参数**): boolean
+
+ }}">watch
+
+#### 响应
+
+200 (}}">ClusterRoleBindingList ): OK
+
+401: Unauthorized
+
+### `create` 创建 ClusterRoleBinding
+
+#### HTTP 请求
+
+POST /apis/rbac.authorization.k8s.io/v1/clusterrolebindings
+
+#### 参数
+
+- **body**: }}">ClusterRoleBinding ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+#### 响应
+
+200 (}}">ClusterRoleBinding ): OK
+
+201 (}}">ClusterRoleBinding ): Created
+
+202 (}}">ClusterRoleBinding ): Accepted
+
+401: Unauthorized
+
+### `update` 替换指定的 ClusterRoleBinding
+
+#### HTTP 请求
+
+PUT /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ ClusterRoleBinding 的名称
+
+- **body**: }}">ClusterRoleBinding ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+#### 响应
+
+200 (}}">ClusterRoleBinding ): OK
+
+201 (}}">ClusterRoleBinding ): Created
+
+401: Unauthorized
+
+### `patch` 部分更新指定的 ClusterRoleBinding
+
+#### HTTP 请求
+
+PATCH /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ ClusterRoleBinding 的名称
+
+- **body**: }}">Patch ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **force** (**查询参数**): boolean
+
+ }}">force
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+#### 响应
+
+200 (}}">ClusterRoleBinding ): OK
+
+201 (}}">ClusterRoleBinding ): Created
+
+401: Unauthorized
+
+### `delete` 删除 ClusterRoleBinding
+
+#### HTTP 请求
+
+DELETE /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ ClusterRoleBinding 的名称
+
+- **body**: }}">DeleteOptions
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **gracePeriodSeconds** (**查询参数**): integer
+
+ }}">gracePeriodSeconds
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **propagationPolicy** (**查询参数**): string
+
+ }}">propagationPolicy
+
+#### 响应
+
+200 (}}">Status ): OK
+
+202 (}}">Status ): Accepted
+
+401: Unauthorized
+
+### `deletecollection` 删除 ClusterRoleBinding 的集合
+
+#### HTTP 请求
+
+DELETE /apis/rbac.authorization.k8s.io/v1/clusterrolebindings
+
+#### 参数
+
+- **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
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+#### 响应
+
+200 (}}">Status ): OK
+
+401: Unauthorized
diff --git a/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1.md b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1.md
new file mode 100644
index 0000000000..c528d0c36f
--- /dev/null
+++ b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1.md
@@ -0,0 +1,592 @@
+---
+api_metadata:
+ apiVersion: "rbac.authorization.k8s.io/v1"
+ import: "k8s.io/api/rbac/v1"
+ kind: "ClusterRole"
+content_type: "api_reference"
+description: "ClusterRole 是一个集群级别的 PolicyRule 逻辑分组,可以被 RoleBinding 或 ClusterRoleBinding 作为一个单元引用。"
+title: "ClusterRole"
+weight: 5
+auto_generated: false
+---
+
+
+`apiVersion: rbac.authorization.k8s.io/v1`
+
+`import "k8s.io/api/rbac/v1"`
+
+## ClusterRole {#ClusterRole}
+
+ClusterRole 是一个集群级别的 PolicyRule 逻辑分组,
+可以被 RoleBinding 或 ClusterRoleBinding 作为一个单元引用。
+
+
+
+- **apiVersion**: rbac.authorization.k8s.io/v1
+
+- **kind**: ClusterRole
+
+- **metadata** (}}">ObjectMeta )
+
+ 标准的对象元数据。
+
+- **aggregationRule** (AggregationRule)
+
+ aggregationRule 是一个可选字段,用于描述如何构建这个 ClusterRole 的 rules。
+ 如果设置了 aggregationRule,则 rules 将由控制器管理,对 rules 的直接变更会被该控制器阻止。
+
+
+ **aggregationRule 描述如何定位并聚合其它 ClusterRole 到此 ClusterRole**
+
+ - **aggregationRule.clusterRoleSelectors** ([]}}">LabelSelector )
+
+ clusterRoleSelectors 包含一个选择器的列表,用于查找 ClusterRole 并创建规则。
+ 如果发现任何选择器匹配的 ClusterRole,将添加其对应的权限。
+
+- **rules** ([]PolicyRule)
+
+ rules 包含了这个 ClusterRole 的所有 PolicyRule。
+
+
+ **PolicyRule 包含描述一个策略规则的信息,但不包含该规则适用于哪个主体或适用于哪个命名空间的信息。**
+
+ - **rules.apiGroups** ([]string)
+
+ apiGroups 是包含资源的 apiGroup 的名称。
+ 如果指定了多个 API 组,则允许针对任何 API 组中的其中一个枚举资源来请求任何操作。
+
+ - **rules.resources** ([]string)
+
+ resources 是此规则所适用的资源的列表。“*” 表示所有资源。
+
+ - **rules.verbs** ([]string),必需
+
+ verbs 是适用于此规则中所包含的所有 ResourceKinds 的动作。
+ “*” 表示所有动作。
+
+ - **rules.resourceNames** ([]string)
+
+ resourceNames 是此规则所适用的资源名称白名单,可选。
+ 空集合意味着允许所有资源。
+
+ - **rules.nonResourceURLs** ([]string)
+
+ nonResourceURLs 是用户应有权访问的一组部分 URL。
+ 允许使用 “*”,但仅能作为路径中最后一段且必须用于完整的一段,
+ 因为非资源 URL 没有划分命名空间。
+ 此字段仅适用于从 ClusterRoleBinding 引用的 ClusterRole。
+ rules 可以应用到 API 资源(如 “pod” 或 “secret”)或非资源 URL 路径(如 “/api”),
+ 但不能同时应用于两者。
+
+## ClusterRoleList {#ClusterRoleList}
+
+ClusterRoleList 是 ClusterRole 的集合。
+
+
+
+- **apiVersion**: rbac.authorization.k8s.io/v1
+
+- **kind**: ClusterRoleList
+
+- **metadata** (}}">ListMeta )
+
+ 标准的对象元数据。
+
+- **items** ([]}}">ClusterRole ),必需
+
+ items 是 ClusterRole 的列表。
+
+## 操作 {#Operations}
+
+
+
+
+### `get` 读取指定的 ClusterRole
+
+#### HTTP 请求
+
+GET /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
+
+#### 参数
+
+- **name** (路径参数): string,必需
+
+ ClusterRole 的名称
+
+- **pretty** (查询参数): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">ClusterRole ): OK
+
+401: Unauthorized
+
+### `list` 列出或观测类别为 ClusterRole 的对象
+
+#### HTTP 请求
+
+GET /apis/rbac.authorization.k8s.io/v1/clusterroles
+
+#### 参数
+
+- **allowWatchBookmarks** (**查询参数**): boolean
+
+ }}">allowWatchBookmarks
+
+- **continue** (**查询参数**): string
+
+ }}">continue
+
+- **fieldSelector** (**查询参数**): string
+
+ }}">fieldSelector
+
+- **labelSelector** (**查询参数**): string
+
+ }}">labelSelector
+
+- **limit** (**查询参数**): integer
+
+ }}">limit
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **resourceVersion** (**查询参数**): string
+
+ }}">resourceVersion
+
+- **resourceVersionMatch** (**查询参数**): string
+
+ }}">resourceVersionMatch
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+- **watch** (**查询参数**): boolean
+
+ }}">watch
+
+#### 响应
+
+200 (}}">ClusterRoleList ): OK
+
+401: Unauthorized
+
+### `create` 创建一个 ClusterRole
+
+#### HTTP 请求
+
+POST /apis/rbac.authorization.k8s.io/v1/clusterroles
+
+#### 参数
+
+- **body**: }}">ClusterRole ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+#### 响应
+
+200 (}}">ClusterRole ): OK
+
+201 (}}">ClusterRole ): Created
+
+202 (}}">ClusterRole ): Accepted
+
+401: Unauthorized
+
+### `update` 替换指定的 ClusterRole
+
+#### HTTP 请求
+
+PUT /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ ClusterRole 的名称
+
+- **body**: }}">ClusterRole ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+#### 响应
+
+200 (}}">ClusterRole ): OK
+
+201 (}}">ClusterRole ): Created
+
+401: Unauthorized
+
+### `patch` 部分更新指定的 ClusterRole
+
+#### HTTP 请求
+
+PATCH /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ ClusterRole 的名称
+
+- **body**: }}">Patch ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **force** (**查询参数**): boolean
+
+ }}">force
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+#### 响应
+
+200 (}}">ClusterRole ): OK
+
+201 (}}">ClusterRole ): Created
+
+401: Unauthorized
+
+### `delete` 删除一个 ClusterRole
+
+#### HTTP 请求
+
+DELETE /apis/rbac.authorization.k8s.io/v1/clusterroles/{name}
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ ClusterRole 的名称
+
+- **body**: }}">DeleteOptions
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **gracePeriodSeconds** (**查询参数**): integer
+
+ }}">gracePeriodSeconds
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **propagationPolicy** (**查询参数**): string
+
+ }}">propagationPolicy
+
+#### 响应
+
+200 (}}">Status ): OK
+
+202 (}}">Status ): Accepted
+
+401: Unauthorized
+
+### `deletecollection` 删除 ClusterRole 的集合
+
+#### HTTP 请求
+
+DELETE /apis/rbac.authorization.k8s.io/v1/clusterroles
+
+#### 参数
+
+- **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
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+#### 响应
+
+200 (}}">Status ): OK
+
+401: Unauthorized
\ No newline at end of file
diff --git a/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/local-subject-access-review-v1.md b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/local-subject-access-review-v1.md
new file mode 100644
index 0000000000..26a99fe962
--- /dev/null
+++ b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/local-subject-access-review-v1.md
@@ -0,0 +1,146 @@
+---
+api_metadata:
+ apiVersion: "authorization.k8s.io/v1"
+ import: "k8s.io/api/authorization/v1"
+ kind: "LocalSubjectAccessReview"
+content_type: "api_reference"
+description: "LocalSubjectAccessReview 检查用户或组是否可以在给定的命名空间内执行某操作。"
+title: "LocalSubjectAccessReview"
+weight: 1
+---
+
+
+`apiVersion: authorization.k8s.io/v1`
+
+`import "k8s.io/api/authorization/v1"`
+
+## LocalSubjectAccessReview {#LocalSubjectAccessReview}
+
+LocalSubjectAccessReview 检查用户或组是否可以在给定的命名空间内执行某操作。
+划分命名空间范围的资源简化了命名空间范围的策略设置,例如权限检查。
+
+
+
+- **apiVersion**: authorization.k8s.io/v1
+
+- **kind**: LocalSubjectAccessReview
+
+- **metadata** (}}">ObjectMeta )
+
+ 标准的列表元数据。
+ 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+
+
+- **spec** (}}">SubjectAccessReviewSpec ),必需
+
+ spec 包含有关正在评估的请求的信息。
+ spec.namespace 必须是你的请求所针对的命名空间。
+ 如果留空,则会被设置默认值。
+
+- **status** (}}">SubjectAccessReviewStatus )
+
+ status 由服务器填写,表示请求是否被允许。
+
+
+## 操作 {#Operations}
+
+
+
+### `create` 创建 LocalSubjectAccessReview
+
+#### HTTP 请求
+
+POST /apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews
+
+#### 参数
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">LocalSubjectAccessReview ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">LocalSubjectAccessReview ): OK
+
+201 (}}">LocalSubjectAccessReview ): Created
+
+202 (}}">LocalSubjectAccessReview ): Accepted
+
+401: Unauthorized
diff --git a/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/role-binding-v1.md b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/role-binding-v1.md
new file mode 100644
index 0000000000..38abf1da14
--- /dev/null
+++ b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/role-binding-v1.md
@@ -0,0 +1,718 @@
+---
+api_metadata:
+ apiVersion: "rbac.authorization.k8s.io/v1"
+ import: "k8s.io/api/rbac/v1"
+ kind: "RoleBinding"
+content_type: "api_reference"
+description: "RoleBinding 引用一个角色,但不包含它。"
+title: "RoleBinding"
+weight: 8
+auto_generated: false
+---
+
+`apiVersion: rbac.authorization.k8s.io/v1`
+
+`import "k8s.io/api/rbac/v1"`
+
+## RoleBinding {#RoleBinding}
+
+RoleBinding 引用一个角色,但不包含它。
+RoleBinding 可以引用相同命名空间中的 Role 或全局命名空间中的 ClusterRole。
+RoleBinding 通过 Subjects 和所在的命名空间信息添加主体信息。
+处于给定命名空间中的 RoleBinding 仅在该命名空间中有效。
+
+
+
+- **apiVersion**: rbac.authorization.k8s.io/v1
+
+- **kind**: RoleBinding
+
+- **metadata** (}}">ObjectMeta )
+
+ 标准的对象元数据。
+
+- **roleRef** (RoleRef),必需
+
+ roleRef 可以引用当前命名空间中的 Role 或全局命名空间中的 ClusterRole。
+ 如果无法解析 roleRef,则 Authorizer 必定返回一个错误。
+
+
+ **roleRef 包含指向正被使用的角色的信息。**
+
+ - **roleRef.apiGroup** (string),必需
+
+ apiGroup 是被引用资源的组
+
+ - **roleRef.kind** (string),必需
+
+ kind 是被引用的资源的类别
+
+ - **roleRef.name** (string),必需
+
+ name 是被引用的资源的名称
+
+- **subjects** ([]Subject)
+
+ subjects 包含角色所适用的对象的引用。
+
+
+ **Subject 包含对角色绑定所适用的对象或用户标识的引用。其中可以包含直接 API 对象的引用或非对象(如用户名和组名)的值。**
+
+ - **subjects.kind** (string),必需
+
+ 被引用的对象的类别。
+ 这个 API 组定义的值是 `User`、`Group` 和 `ServiceAccount`。
+ 如果 Authorizer 无法识别类别值,则 Authorizer 应报告一个错误。
+
+ - **subjects.name** (string),必需
+
+ 被引用的对象的名称。
+
+ - **subjects.apiGroup** (string)
+
+ apiGroup 包含被引用主体的 API 组。
+ 对于 ServiceAccount 主体默认为 ""。
+ 对于 User 和 Group 主体,默认为 "rbac.authorization.k8s.io"。
+
+ - **subjects.namespace** (string)
+
+ 被引用的对象的命名空间。
+ 如果对象类别是 “User” 或 “Group” 等非命名空间作用域的对象且该值不为空,
+ 则 Authorizer 应报告一个错误。
+
+## RoleBindingList {#RoleBindingList}
+
+RoleBindingList 是 RoleBinding 的集合。
+
+
+
+- **apiVersion**: rbac.authorization.k8s.io/v1
+
+- **kind**: RoleBindingList
+
+- **metadata** (}}">ListMeta )
+
+ 标准的对象元数据。
+
+- **items** ([]}}">RoleBinding ),必需
+
+ items 是 RoleBinding 的列表。
+
+## 操作 {#Operations}
+
+
+
+### `get` 读取指定的 RoleBinding
+
+#### HTTP 请求
+
+GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ RoleBinding 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">RoleBinding ): OK
+
+401: Unauthorized
+
+### `list` 列出或观测类别为 RoleBinding 的对象
+
+#### HTTP 请求
+
+GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings
+
+#### 参数
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **allowWatchBookmarks** (**查询参数**): boolean
+
+ }}">allowWatchBookmarks
+
+- **continue** (**查询参数**): string
+
+ }}">continue
+
+- **fieldSelector** (**查询参数**): string
+
+ }}">fieldSelector
+
+- **labelSelector** (**查询参数**): string
+
+ }}">labelSelector
+
+- **limit** (**查询参数**): integer
+
+ }}">limit
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **resourceVersion** (**查询参数**): string
+
+ }}">resourceVersion
+
+- **resourceVersionMatch** (**查询参数**): string
+
+ }}">resourceVersionMatch
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+- **watch** (**查询参数**): boolean
+
+ }}">watch
+
+
+#### 响应
+
+200 (}}">RoleBindingList ): OK
+
+401: Unauthorized
+
+### `list` 列出或观测类别为 RoleBinding 的对象
+
+#### HTTP 请求
+
+GET /apis/rbac.authorization.k8s.io/v1/rolebindings
+
+#### 参数
+
+- **allowWatchBookmarks** (**查询参数**): boolean
+
+ }}">allowWatchBookmarks
+
+- **continue** (**查询参数**): string
+
+ }}">continue
+
+- **fieldSelector** (**查询参数**): string
+
+ }}">fieldSelector
+
+- **labelSelector** (**查询参数**): string
+
+ }}">labelSelector
+
+- **limit** (**查询参数**): integer
+
+ }}">limit
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **resourceVersion** (**查询参数**): string
+
+ }}">resourceVersion
+
+- **resourceVersionMatch** (**查询参数**): string
+
+ }}">resourceVersionMatch
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+- **watch** (**查询参数**): boolean
+
+ }}">watch
+
+#### 响应
+
+200 (}}">RoleBindingList ): OK
+
+401: Unauthorized
+
+### `create` 创建 RoleBinding
+
+#### HTTP 请求
+
+POST /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings
+
+#### 参数
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">RoleBinding ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+#### 响应
+
+200 (}}">RoleBinding ): OK
+
+201 (}}">RoleBinding ): Created
+
+202 (}}">RoleBinding ): Accepted
+
+401: Unauthorized
+
+### `update` 替换指定的 RoleBinding
+
+#### HTTP 请求
+
+PUT /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ RoleBinding 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">RoleBinding ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+#### 响应
+
+200 (}}">RoleBinding ): OK
+
+201 (}}">RoleBinding ): Created
+
+401: Unauthorized
+
+### `patch` 部分更新指定的 RoleBinding
+
+#### HTTP 请求
+
+PATCH /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ RoleBinding 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">Patch ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **force** (**查询参数**): boolean
+
+ }}">force
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+#### 响应
+
+200 (}}">RoleBinding ): OK
+
+201 (}}">RoleBinding ): Created
+
+401: Unauthorized
+
+### `delete` 删除 RoleBinding
+
+#### HTTP 请求
+
+DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ RoleBinding 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">DeleteOptions
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **gracePeriodSeconds** (**查询参数**): integer
+
+ }}">gracePeriodSeconds
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **propagationPolicy** (**查询参数**): string
+
+ }}">propagationPolicy
+
+#### 响应
+
+200 (}}">Status ): OK
+
+202 (}}">Status ): Accepted
+
+401: Unauthorized
+
+### `deletecollection` 删除 RoleBinding 的集合
+
+#### HTTP 请求
+
+DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings
+
+#### 参数
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **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
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+#### 响应
+
+200 (}}">Status ): OK
+
+401: Unauthorized
\ No newline at end of file
diff --git a/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/role-v1.md b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/role-v1.md
new file mode 100644
index 0000000000..8b6f136299
--- /dev/null
+++ b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/role-v1.md
@@ -0,0 +1,690 @@
+---
+api_metadata:
+ apiVersion: "rbac.authorization.k8s.io/v1"
+ import: "k8s.io/api/rbac/v1"
+ kind: "Role"
+content_type: "api_reference"
+description: "Role 是一个按命名空间划分的 PolicyRule 逻辑分组,可以被 RoleBinding 作为一个单元引用。"
+title: "Role"
+weight: 7
+auto_generated: false
+---
+
+
+`apiVersion: rbac.authorization.k8s.io/v1`
+
+`import "k8s.io/api/rbac/v1"`
+
+## Role {#Role}
+
+Role 是一个按命名空间划分的 PolicyRule 逻辑分组,可以被 RoleBinding 作为一个单元引用。
+
+
+
+- **apiVersion**: rbac.authorization.k8s.io/v1
+
+- **kind**: Role
+
+- **metadata** (}}">ObjectMeta )
+
+ 标准的对象元数据。
+
+- **rules** ([]PolicyRule)
+
+ rules 包含了这个 Role 的所有 PolicyRule。
+
+
+ **PolicyRule 包含描述一个策略规则的信息,但不包含该规则适用于哪个主体或适用于哪个命名空间的信息。**
+
+ - **rules.apiGroups** ([]string)
+
+ apiGroups 是包含资源的 apiGroup 的名称。
+ 如果指定了多个 API 组,则允许对任何 API 组中的其中一个枚举资源来请求任何操作。
+
+ - **rules.resources** ([]string)
+
+ resources 是此规则所适用的资源的列表。
+ “*” 表示所有资源。
+
+ - **rules.verbs** ([]string),必需
+
+ verbs 是适用于此规则中所包含的所有 ResourceKinds 的动作。
+ “*” 表示所有动作。
+
+ - **rules.resourceNames** ([]string)
+
+ resourceNames 是此规则所适用的资源名称白名单,可选。
+ 空集合意味着允许所有资源。
+
+ - **rules.nonResourceURLs** ([]string)
+
+ nonResourceURLs 是用户应有权访问的一组部分 URL。
+ 允许使用 “*”,但仅能作为路径中最后一段且必须用于完整的一段,
+ 因为非资源 URL 没有划分命名空间。
+ 此字段仅适用于从 ClusterRoleBinding 引用的 ClusterRole。
+ rules 可以应用到 API 资源(如 “pod” 或 “secret”)或非资源 URL 路径(如 “/api”),
+ 但不能同时应用于两者。
+
+## RoleList {#RoleList}
+
+RoleList 是 Role 的集合。
+
+
+
+- **apiVersion**: rbac.authorization.k8s.io/v1
+
+- **kind**: RoleList
+
+- **metadata** (}}">ListMeta )
+
+ 标准的对象元数据。
+
+- **items** ([]}}">Role ),必需
+
+ items 是 Role 的列表。
+
+## 操作 {#Operations}
+
+
+
+### `get` 读取指定的 Role
+
+#### HTTP 请求
+
+GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ Role 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+#### 响应
+
+200 (}}">Role ): OK
+
+401: Unauthorized
+
+### `list` 列出或观测类别为 Role 的对象
+
+#### HTTP 请求
+
+GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles
+
+#### 参数
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **allowWatchBookmarks** (**查询参数**): boolean
+
+ }}">allowWatchBookmarks
+
+- **continue** (**查询参数**): string
+
+ }}">continue
+
+- **fieldSelector** (**查询参数**): string
+
+ }}">fieldSelector
+
+- **labelSelector** (**查询参数**): string
+
+ }}">labelSelector
+
+- **limit** (**查询参数**): integer
+
+ }}">limit
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **resourceVersion** (**查询参数**): string
+
+ }}">resourceVersion
+
+- **resourceVersionMatch** (**查询参数**): string
+
+ }}">resourceVersionMatch
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+- **watch** (**查询参数**): boolean
+
+ }}">watch
+
+#### 响应
+
+200 (}}">RoleList ): OK
+
+401: Unauthorized
+
+### `list` 列出或观测类别为 Role 的对象
+
+#### HTTP 请求
+
+GET /apis/rbac.authorization.k8s.io/v1/roles
+
+#### 参数
+
+- **allowWatchBookmarks** (**查询参数**): boolean
+
+ }}">allowWatchBookmarks
+
+- **continue** (**查询参数**): string
+
+ }}">continue
+
+- **fieldSelector** (**查询参数**): string
+
+ }}">fieldSelector
+
+- **labelSelector** (**查询参数**): string
+
+ }}">labelSelector
+
+- **limit** (**查询参数**): integer
+
+ }}">limit
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **resourceVersion** (**查询参数**): string
+
+ }}">resourceVersion
+
+- **resourceVersionMatch** (**查询参数**): string
+
+ }}">resourceVersionMatch
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+- **watch** (**查询参数**): boolean
+
+ }}">watch
+
+#### 响应
+
+200 (}}">RoleList ): OK
+
+401: Unauthorized
+
+### `create` 创建 Role
+
+#### HTTP 请求
+
+POST /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles
+
+#### 参数
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">Role ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+#### 响应
+
+200 (}}">Role ): OK
+
+201 (}}">Role ): Created
+
+202 (}}">Role ): Accepted
+
+401: Unauthorized
+
+### `update` 替换指定的 Role
+
+#### HTTP 请求
+
+PUT /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ Role 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">Role ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+#### 响应
+
+200 (}}">Role ): OK
+
+201 (}}">Role ): Created
+
+401: Unauthorized
+
+### `patch` 部分更新指定的 Role
+
+#### HTTP 请求
+
+PATCH /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ Role 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">Patch ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **force** (**查询参数**): boolean
+
+ }}">force
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+#### 响应
+
+200 (}}">Role ): OK
+
+201 (}}">Role ): Created
+
+401: Unauthorized
+
+### `delete` 删除 Role
+
+#### HTTP 请求
+
+DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ Role 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">DeleteOptions
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **gracePeriodSeconds** (**查询参数**): integer
+
+ }}">gracePeriodSeconds
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **propagationPolicy** (**查询参数**): string
+
+ }}">propagationPolicy
+
+#### 响应
+
+200 (}}">Status ): OK
+
+202 (}}">Status ): Accepted
+
+401: Unauthorized
+
+### `deletecollection` 删除 Role 的集合
+
+#### HTTP 请求
+
+DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles
+
+#### 参数
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **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
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+#### 响应
+
+200 (}}">Status ): OK
+
+401: Unauthorized
diff --git a/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/self-subject-access-review-v1.md b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/self-subject-access-review-v1.md
new file mode 100644
index 0000000000..164a054c41
--- /dev/null
+++ b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/self-subject-access-review-v1.md
@@ -0,0 +1,230 @@
+---
+api_metadata:
+ apiVersion: "authorization.k8s.io/v1"
+ import: "k8s.io/api/authorization/v1"
+ kind: "SelfSubjectAccessReview"
+content_type: "api_reference"
+description: "SelfSubjectAccessReview 检查当前用户是否可以执行某操作。"
+title: "SelfSubjectAccessReview"
+weight: 2
+---
+
+`apiVersion: authorization.k8s.io/v1`
+
+`import "k8s.io/api/authorization/v1"`
+
+## SelfSubjectAccessReview {#SelfSubjectAccessReview}
+
+SelfSubjectAccessReview 检查当前用户是否可以执行某操作。
+不填写 spec.namespace 表示 “在所有命名空间中”。
+Self 是一个特殊情况,因为用户应始终能够检查自己是否可以执行某操作。
+
+
+
+- **apiVersion**: authorization.k8s.io/v1
+
+- **kind**: SelfSubjectAccessReview
+
+
+- **metadata** (}}">ObjectMeta )
+
+ 标准的列表元数据。
+ 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+
+- **spec** (}}">SelfSubjectAccessReviewSpec ),必需
+
+ spec 包含有关正在评估的请求的信息。
+ user 和 group 必须为空。
+
+- **status** (}}">SubjectAccessReviewStatus )
+
+ status 由服务器填写,表示请求是否被允许。
+
+## SelfSubjectAccessReviewSpec {#SelfSubjectAccessReviewSpec}
+
+SelfSubjectAccessReviewSpec 是访问请求的描述。
+resourceAuthorizationAttributes 和 nonResourceAuthorizationAttributes 二者必须设置其一,并且只能设置其一。
+
+
+
+
+- **nonResourceAttributes** (NonResourceAttributes)
+
+ nonResourceAttributes 描述非资源访问请求的信息。
+
+
+ **nonResourceAttributes 包括提供给 Authorizer 接口进行非资源请求鉴权时所用的属性。**
+
+ - **nonResourceAttributes.path** (string)
+
+ path 是请求的 URL 路径。
+
+ - **nonResourceAttributes.verb** (string)
+
+ verb 是标准的 HTTP 动作。
+
+- **resourceAttributes** (ResourceAttributes)
+
+ resourceAuthorizationAttributes 描述资源访问请求的信息。
+
+
+ **resourceAttributes 包括提供给 Authorizer 接口进行资源请求鉴权时所用的属性。**
+
+ - **resourceAttributes.group** (string)
+
+ group 是资源的 API 组。
+ "*" 表示所有组。
+
+ - **resourceAttributes.name** (string)
+
+ name 是 "get" 正在请求或 "delete" 已删除的资源的名称。
+ ""(空字符串)表示所有资源。
+
+ - **resourceAttributes.namespace** (string)
+
+ namespace 是正在请求的操作的命名空间。
+ 目前,无命名空间和所有命名空间之间没有区别。
+ 对于 LocalSubjectAccessReviews,默认为 ""(空字符串)。
+ 对于集群范围的资源,默认为 ""(空字符串)。
+ 对于来自 SubjectAccessReview 或 SelfSubjectAccessReview 的命名空间范围的资源,""(空字符串)表示 "all"(所有资源)。
+
+ - **resourceAttributes.resource** (string)
+
+ resource 是现有的资源类别之一。
+ "*" 表示所有资源类别。
+
+ - **resourceAttributes.subresource** (string)
+
+ subresource 是现有的资源类型之一。
+ "" 表示无。
+
+ - **resourceAttributes.verb** (string)
+
+ verb 是 kubernetes 资源 API 动作,例如 get、list、watch、create、update、delete、proxy。
+ "*" 表示所有动作。
+
+ - **resourceAttributes.version** (string)
+
+ version 是资源的 API 版本。
+ "*" 表示所有版本。
+
+## 操作 {#Operations}
+
+
+
+### `create` 创建 SelfSubjectAccessReview
+
+#### HTTP 请求
+
+POST /apis/authorization.k8s.io/v1/selfsubjectaccessreviews
+
+#### 参数
+
+- **body**: }}">SelfSubjectAccessReview ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+#### 响应
+
+200 (}}">SelfSubjectAccessReview ): OK
+
+201 (}}">SelfSubjectAccessReview ): Created
+
+202 (}}">SelfSubjectAccessReview ): Accepted
+
+401: Unauthorized
diff --git a/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/self-subject-rules-review-v1.md b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/self-subject-rules-review-v1.md
new file mode 100644
index 0000000000..e4c39decdc
--- /dev/null
+++ b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/self-subject-rules-review-v1.md
@@ -0,0 +1,246 @@
+---
+api_metadata:
+ apiVersion: "authorization.k8s.io/v1"
+ import: "k8s.io/api/authorization/v1"
+ kind: "SelfSubjectRulesReview"
+content_type: "api_reference"
+description: "SelfSubjectRulesReview 枚举当前用户可以在某命名空间内执行的操作集合。"
+title: "SelfSubjectRulesReview"
+weight: 3
+---
+
+`apiVersion: authorization.k8s.io/v1`
+
+`import "k8s.io/api/authorization/v1"`
+
+## SelfSubjectRulesReview {#SelfSubjectRulesReview}
+
+SelfSubjectRulesReview 枚举当前用户可以在某命名空间内执行的操作集合。
+返回的操作列表可能不完整,具体取决于服务器的鉴权模式以及评估过程中遇到的任何错误。
+SelfSubjectRulesReview 应由 UI 用于显示/隐藏操作,或让最终用户尽快理解自己的权限。
+SelfSubjectRulesReview 不得被外部系统使用以驱动鉴权决策,
+因为这会引起混淆代理人(confused deputy)、缓存有效期/吊销(cache lifetime/revocation)和正确性问题。
+SubjectAccessReview 和 LocalAccessReview 是遵从 API 服务器所做鉴权决策的正确方式。
+
+
+
+- **apiVersion**: authorization.k8s.io/v1
+
+- **kind**: SelfSubjectRulesReview
+
+
+- **metadata** (}}">ObjectMeta )
+
+ 标准的列表元数据。
+ 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+
+- **spec** (}}">SelfSubjectRulesReviewSpec ),必需
+
+ spec 包含有关正在评估的请求的信息。
+
+- **status** (SubjectRulesReviewStatus)
+
+ status 由服务器填写,表示用户可以执行的操作的集合。
+
+
+ **SubjectRulesReviewStatus 包含规则检查的结果。
+ 此检查可能不完整,具体取决于服务器配置的 Authorizer 的集合以及评估期间遇到的任何错误。
+ 由于鉴权规则是叠加的,所以如果某个规则出现在列表中,即使该列表不完整,也可以安全地假定该主体拥有该权限。**
+
+ - **status.incomplete** (boolean),必需
+
+ 当此调用返回的规则不完整时,incomplete 结果为 true。
+ 这种情况常见于 Authorizer(例如外部 Authorizer)不支持规则评估时。
+
+ - **status.nonResourceRules** ([]NonResourceRule),必需
+
+ nonResourceRules 是允许主体对非资源执行路径执行的操作列表。
+ 该列表顺序不重要,可以包含重复项,还可能不完整。
+
+
+ **nonResourceRule 包含描述非资源路径的规则的信息。**
+
+ - **status.nonResourceRules.verbs** ([]string),必需
+
+ verb 是 kubernetes 非资源 API 动作的列表,例如 get、post、put、delete、patch、head、options。
+ "*" 表示所有动作。
+
+ - **status.nonResourceRules.nonResourceURLs** ([]string)
+
+ nonResourceURLs 是用户应有权访问的一组部分 URL。
+ 允许使用 "*",但仅能作为路径中最后一段且必须用于完整的一段。
+ "*" 表示全部。
+
+ - **status.resourceRules** ([]ResourceRule),必需
+
+ resourceRules 是允许主体对资源执行的操作的列表。
+ 该列表顺序不重要,可以包含重复项,还可能不完整。
+
+
+ **resourceRule 是允许主体对资源执行的操作的列表。该列表顺序不重要,可以包含重复项,还可能不完整。**
+
+ - **status.resourceRules.verbs** ([]string),必需
+
+ verb 是 kubernetes 资源 API 动作的列表,例如 get、list、watch、create、update、delete、proxy。
+ "*" 表示所有动作。
+
+ - **status.resourceRules.apiGroups** ([]string)
+
+ apiGroups 是包含资源的 APIGroup 的名称。
+ 如果指定了多个 API 组,则允许对任何 API 组中枚举的资源之一请求任何操作。
+ "*" 表示所有 APIGroup。
+
+ - **status.resourceRules.resourceNames** ([]string)
+
+ resourceNames 是此规则所适用的资源名称白名单,可选。
+ 空集合意味着允许所有资源。
+ "*" 表示所有资源。
+
+ - **status.resourceRules.resources** ([]string)
+
+ resources 是此规则所适用的资源的列表。
+ "*" 表示指定 APIGroup 中的所有资源。
+ "*/foo" 表示指定 APIGroup 中所有资源的子资源 "foo"。
+
+ - **status.evaluationError** (string)
+
+ evaluationError 可以与 rules 一起出现。
+ 它表示在规则评估期间发生错误,例如 Authorizer 不支持规则评估以及 resourceRules 和/或 nonResourceRules 可能不完整。
+
+## SelfSubjectRulesReviewSpec {#SelfSubjectRulesReviewSpec}
+
+
+SelfSubjectRulesReviewSpec 定义 SelfSubjectRulesReview 的规范。
+
+
+
+- **namespace** (string)
+
+ namespace 是要评估规则的命名空间。
+ 必需。
+
+
+## 操作 {#Operations}
+
+
+
+### `create` 创建 SelfSubjectRulesReview
+
+#### HTTP 请求
+
+POST /apis/authorization.k8s.io/v1/selfsubjectrulesreviews
+
+#### 参数
+
+- **body**: }}">SelfSubjectRulesReview ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">SelfSubjectRulesReview ): OK
+
+201 (}}">SelfSubjectRulesReview ): Created
+
+202 (}}">SelfSubjectRulesReview ): Accepted
+
+401: Unauthorized
diff --git a/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/subject-access-review-v1.md b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/subject-access-review-v1.md
new file mode 100644
index 0000000000..be42036d46
--- /dev/null
+++ b/content/zh-cn/docs/reference/kubernetes-api/authorization-resources/subject-access-review-v1.md
@@ -0,0 +1,301 @@
+---
+api_metadata:
+ apiVersion: "authorization.k8s.io/v1"
+ import: "k8s.io/api/authorization/v1"
+ kind: "SubjectAccessReview"
+content_type: "api_reference"
+description: "SubjectAccessReview 检查用户或组是否可以执行某操作。"
+title: "SubjectAccessReview"
+weight: 4
+---
+
+
+`apiVersion: authorization.k8s.io/v1`
+
+`import "k8s.io/api/authorization/v1"`
+
+## SubjectAccessReview {#SubjectAccessReview}
+
+SubjectAccessReview 检查用户或组是否可以执行某操作。
+
+
+
+- **apiVersion**: authorization.k8s.io/v1
+
+- **kind**: SubjectAccessReview
+
+- **metadata** (}}">ObjectMeta )
+
+ 标准的列表元数据。
+ 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+
+- **spec** (}}">SubjectAccessReviewSpec ),必需
+
+ spec 包含有关正在评估的请求的信息。
+
+- **status** (}}">SubjectAccessReviewStatus )
+
+ status 由服务器填写,表示请求是否被允许。
+
+## SubjectAccessReviewSpec {#SubjectAccessReviewSpec}
+
+SubjectAccessReviewSpec 是访问请求的描述。
+resourceAuthorizationAttributes 和 nonResourceAuthorizationAttributes 二者必须设置其一,并且只能设置其一。
+
+
+
+
+- **extra** (map[string][]string)
+
+ extra 对应于来自鉴权器的 user.Info.GetExtra() 方法。
+ 由于这是针对 Authorizer 的输入,所以它需要在此处反映。
+
+- **groups** ([]string)
+
+ groups 是你正在测试的组。
+
+- **nonResourceAttributes** (NonResourceAttributes)
+
+ nonResourceAttributes 描述非资源访问请求的信息。
+
+
+ **nonResourceAttributes 包括提供给 Authorizer 接口进行非资源请求鉴权时所用的属性。**
+
+ - **nonResourceAttributes.path** (string)
+
+ path 是请求的 URL 路径。
+
+ - **nonResourceAttributes.verb** (string)
+
+ verb 是标准的 HTTP 动作。
+
+- **resourceAttributes** (ResourceAttributes)
+
+ resourceAuthorizationAttributes 描述资源访问请求的信息。
+
+
+ **resourceAttributes 包括提供给 Authorizer 接口进行资源请求鉴权时所用的属性。**
+
+ - **resourceAttributes.group** (string)
+
+ group 是资源的 API 组。
+ "*" 表示所有资源。
+
+ - **resourceAttributes.name** (string)
+
+ name 是 "get" 正在请求或 "delete" 已删除的资源。
+ ""(空字符串)表示所有资源。
+
+ - **resourceAttributes.namespace** (string)
+
+ namespace 是正在请求的操作的命名空间。
+ 目前,无命名空间和所有命名空间之间没有区别。
+ 对于 LocalSubjectAccessReviews,默认为 ""(空字符串)。
+ 对于集群范围的资源,默认为 ""(空字符串)。
+ 对于来自 SubjectAccessReview 或 SelfSubjectAccessReview 的命名空间范围的资源,
+ ""(空字符串)表示 "all"(所有资源)。
+
+ - **resourceAttributes.resource** (string)
+
+ resource 是现有的资源类别之一。
+ "*" 表示所有资源类别。
+
+ - **resourceAttributes.subresource** (string)
+
+ subresource 是现有的资源类别之一。
+ "" 表示无子资源。
+
+ - **resourceAttributes.verb** (string)
+
+ verb 是 kubernetes 资源的 API 动作,例如 get、list、watch、create、update、delete、proxy。
+ "*" 表示所有动作。
+
+ - **resourceAttributes.version** (string)
+
+ version 是资源的 API 版本。
+ "*" 表示所有版本。
+
+- **uid** (string)
+
+ 有关正在请求的用户的 UID 信息。
+
+- **user** (string)
+
+ user 是你正在测试的用户。
+ 如果你指定 “user” 而不是 “groups”,它将被解读为“如果 user 不是任何组的成员,将会怎样”。
+
+## SubjectAccessReviewStatus {#SubjectAccessReviewStatus}
+
+SubjectAccessReviewStatus
+
+
+
+
+- **allowed** (boolean),必需
+
+ allowed 是必需的。
+ 如果允许该操作,则为 true,否则为 false。
+
+- **denied** (boolean)
+
+ denied 是可选的。
+ 如果拒绝该操作,则为 true,否则为 false。
+ 如果 allowed 和 denied 均为 false,则 Authorizer 对是否鉴权操作没有意见。
+ 如果 allowed 为 true,则 denied 不能为 true。
+
+- **evaluationError** (string)
+
+ evaluationError 表示鉴权检查期间发生一些错误。
+ 出现错误的情况下完全有可能继续确定鉴权状态。
+ 例如,RBAC 可能缺少一个角色,但仍存在足够多的角色进行绑定,进而了解请求有关的原因。
+
+- **reason** (string)
+
+ reason 是可选的。
+ 它表示为什么允许或拒绝请求。
+
+## 操作 {#Operations}
+
+
+
+### `create` 创建 SubjectAccessReview
+
+#### HTTP 请求
+
+POST /apis/authorization.k8s.io/v1/subjectaccessreviews
+
+#### 参数
+
+- **body**: }}">SubjectAccessReview ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">SubjectAccessReview ): OK
+
+201 (}}">SubjectAccessReview ): Created
+
+202 (}}">SubjectAccessReview ): Accepted
+
+401: Unauthorized
diff --git a/content/zh/docs/reference/kubernetes-api/cluster-resources/_index.md b/content/zh-cn/docs/reference/kubernetes-api/cluster-resources/_index.md
similarity index 100%
rename from content/zh/docs/reference/kubernetes-api/cluster-resources/_index.md
rename to content/zh-cn/docs/reference/kubernetes-api/cluster-resources/_index.md
diff --git a/content/zh-cn/docs/reference/kubernetes-api/cluster-resources/binding-v1.md b/content/zh-cn/docs/reference/kubernetes-api/cluster-resources/binding-v1.md
new file mode 100644
index 0000000000..1b23f65ee8
--- /dev/null
+++ b/content/zh-cn/docs/reference/kubernetes-api/cluster-resources/binding-v1.md
@@ -0,0 +1,222 @@
+---
+api_metadata:
+ apiVersion: "v1"
+ import: "k8s.io/api/core/v1"
+ kind: "Binding"
+content_type: "api_reference"
+description: "Binding 将一个对象与另一个对象联系起来; 例如,一个 Pod 被调度程序绑定到一个节点。"
+title: "Binding"
+weight: 9
+auto_generated: true
+---
+
+`apiVersion: v1`
+
+`import "k8s.io/api/core/v1"`
+
+
+## Binding {#Binding}
+
+Binding 将一个对象与另一个对象联系起来; 例如,一个 Pod 被调度程序绑定到一个节点。
+已在 1.7 版本弃用,请使用 Pod 的 binding 子资源。
+
+
+- **apiVersion**: v1
+
+
+- **kind**: Binding
+
+
+- **metadata** (}}">ObjectMeta )
+
+ 标准对象的元数据, 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+
+
+
+- **target** (}}">ObjectReference ), 必需
+
+ 要绑定到标准对象的目标对象。
+
+## 操作 {#operations}
+
+
+
+
+### `create` 创建一个 Binding
+
+#### HTTP 请求
+
+POST /api/v1/namespaces/{namespace}/bindings
+
+#### 参数
+
+
+- **namespace** (**路径参数**): string, 必需
+
+ }}">namespace
+
+
+- **body**: }}">Binding , 必需
+
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+
+
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">Binding ): OK
+
+201 (}}">Binding ): Created
+
+202 (}}">Binding ): Accepted
+
+401: Unauthorized
+
+
+### `create` 创建 Pod 的绑定
+
+#### HTTP 请求
+
+POST /api/v1/namespaces/{namespace}/pods/{name}/binding
+
+#### 参数
+
+- **name** (**路径参数**): string, 必需
+
+ Binding 的名称
+
+- **namespace** (**路径参数**): string, 必需
+
+ }}">namespace
+
+- **body**: }}">Binding , 必需
+
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+#### 响应
+
+200 (}}">Binding ): OK
+
+201 (}}">Binding ): Created
+
+202 (}}">Binding ): Accepted
+
+401: Unauthorized
diff --git a/content/zh-cn/docs/reference/kubernetes-api/cluster-resources/namespace-v1.md b/content/zh-cn/docs/reference/kubernetes-api/cluster-resources/namespace-v1.md
new file mode 100644
index 0000000000..dc0e8d4ef2
--- /dev/null
+++ b/content/zh-cn/docs/reference/kubernetes-api/cluster-resources/namespace-v1.md
@@ -0,0 +1,839 @@
+---
+api_metadata:
+ apiVersion: "v1"
+ import: "k8s.io/api/core/v1"
+ kind: "Namespace"
+content_type: "api_reference"
+description: "Namespace 为名字提供作用域。"
+title: "Namespace"
+weight: 2
+---
+
+
+
+`apiVersion: v1`
+
+`import "k8s.io/api/core/v1"`
+
+## Namespace {#Namespace}
+
+Namespace 为名字提供作用域。使用多个命名空间是可选的。
+
+
+- **apiVersion**: v1
+
+- **kind**: Namespace
+
+- **metadata** (}}">ObjectMeta )
+
+ 标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+
+- **spec** (}}">NamespaceSpec )
+
+ spec 定义了 Namespace 的行为。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
+
+- **status** (}}">NamespaceStatus )
+
+ status 描述了当前 Namespace 的状态。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
+
+## NamespaceSpec {#NamespaceSpec}
+
+NamespaceSpec 用于描述 Namespace 的属性。
+
+
+
+- **finalizers** ([]string)
+
+
+ finalizers 是一个不透明的值列表,只有此列表为空时才能从存储中永久删除对象。 更多信息: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/
+
+## NamespaceStatus {#NamespaceStatus}
+
+NamespaceStatus 表示 Namespace 的当前状态信息。
+
+
+- **conditions** ([]NamespaceCondition)
+
+ **补丁策略:基于 `type` 健合并**
+
+ 表示命名空间当前状态的最新可用状况。
+
+
+
+ **NamespaceCondition 包含命名空间状态的详细信息。**
+
+ - **conditions.status** (string),必需
+
+ 状况(condition)的状态,取值为 True、False 或 Unknown 之一。
+
+ - **conditions.type** (string), 必需
+
+ 命名空间控制器状况的类型。
+
+ - **conditions.lastTransitionTime** (Time)
+
+
+
+ **Time 是对 time.Time 的封装。Time 支持对 YAML 和 JSON 进行正确封包。为 time 包的许多函数方法提供了封装器。**
+
+ - **conditions.message** (string)
+
+ - **conditions.reason** (string)
+
+- **phase** (string)
+
+
+ phase 是命名空间的当前生命周期阶段。更多信息: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/
+
+## NamespaceList {#NamespaceList}
+
+NamespaceList 是一个命名空间列表。
+
+
+- **apiVersion**: v1
+
+
+- **kind**: NamespaceList
+
+
+- **metadata** (}}">ListMeta )
+
+ 标准的列表元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+
+
+
+- **items** ([]}}">Namespace ),必需
+
+
+ items 是列表中的 Namespace 对象列表。更多信息: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+
+
+
+## 操作 {#Operations}
+
+
+
+
+### `get` 读取指定的 Namespace
+
+#### HTTP 请求
+
+GET /api/v1/namespaces/{name}
+
+#### 参数
+
+
+- **name** (**路径参数**):string,必需
+
+ Namespace 的名称
+
+- **pretty** (**查询参数**):string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">Namespace ):OK
+
+401:Unauthorized
+
+
+### `get` 读取指定 Namespace 的状态
+
+#### HTTP 请求
+
+GET /api/v1/namespaces/{name}/status
+
+#### 参数
+
+
+- **name** (**路径参数**):string,必需
+
+ Namespace 的名称
+
+
+- **pretty** (**查询参数**):string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">Namespace ):OK
+
+401:Unauthorized
+
+
+### `list` 列出或者检查类别为 Namespace 的对象
+
+#### HTTP 请求
+
+GET /api/v1/namespaces
+
+#### 参数
+
+
+- **allowWatchBookmarks** (**查询参数**):boolean
+
+ }}">allowWatchBookmarks
+
+
+- **continue** (**查询参数**):string
+
+ }}">continue
+
+
+- **fieldSelector** (**查询参数**):string
+
+ }}">fieldSelector
+
+
+- **labelSelector** (**查询参数**):string
+
+ }}">labelSelector
+
+
+- **limit** (**查询参数**):integer
+
+ }}">limit
+
+
+- **pretty** (**查询参数**):string
+
+ }}">pretty
+
+
+- **resourceVersion** (**查询参数**):string
+
+ }}">resourceVersion
+
+
+- **resourceVersionMatch** (**查询参数**):string
+
+ }}">resourceVersionMatch
+
+
+- **timeoutSeconds** (**查询参数**):integer
+
+ }}">timeoutSeconds
+
+
+- **watch** (**查询参数**):boolean
+
+ }}">watch
+
+
+#### 响应
+
+200 (}}">NamespaceList ):OK
+
+401:Unauthorized
+
+
+### `create` 创建一个 Namespace
+
+#### HTTP 请求
+
+POST /api/v1/namespaces
+
+#### 参数
+
+- **body**: }}">Namespace ,必需
+
+
+- **dryRun** (**查询参数**):string
+
+ }}">dryRun
+
+
+- **fieldManager** (**查询参数**):string
+
+ }}">fieldManager
+
+
+- **fieldValidation** (**查询参数**):string
+
+ }}">fieldValidation
+
+
+- **pretty** (**查询参数**):string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">Namespace ):OK
+
+201 (}}">Namespace ):Created
+
+202 (}}">Namespace ):Accepted
+
+401:Unauthorized
+
+
+### `update` 替换指定的 Namespace
+
+#### HTTP 请求
+
+PUT /api/v1/namespaces/{name}
+
+#### 参数
+
+
+- **name** (**路径参数**):string,必需
+
+ Namespace 的名称
+
+- **body**: }}">Namespace , 必需
+
+
+- **dryRun** (**查询参数**):string
+
+ }}">dryRun
+
+
+- **fieldManager** (**查询参数**):string
+
+ }}">fieldManager
+
+
+- **fieldValidation** (**查询参数**):string
+
+ }}">fieldValidation
+
+
+- **pretty** (**查询参数**):string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">Namespace ):OK
+
+201 (}}">Namespace ):Created
+
+401:Unauthorized
+
+
+### `update` 替换指定 Namespace 的终结器
+
+#### HTTP 请求
+
+PUT /api/v1/namespaces/{name}/finalize
+
+#### 参数
+
+
+- **name** (**路径参数**):string,必需
+
+ Namespace 的名称
+
+- **body**: }}">Namespace ,必需
+
+
+- **dryRun** (**查询参数**):string
+
+ }}">dryRun
+
+
+- **fieldManager** (**查询参数**):string
+
+ }}">fieldManager
+
+
+- **fieldValidation** (**查询参数**):string
+
+ }}">fieldValidation
+
+
+- **pretty** (**查询参数**):string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">Namespace ):OK
+
+201 (}}">Namespace ):Created
+
+401:Unauthorized
+
+
+### `update` 替换指定 Namespace 的状态
+
+#### HTTP 请求
+
+PUT /api/v1/namespaces/{name}/status
+
+#### 参数
+
+
+- **name** (**路径阐述**):string,必需
+
+ Namespace 的名称
+
+- **body**: }}">Namespace ,必需
+
+
+- **dryRun** (**查询参数**):string
+
+ }}">dryRun
+
+
+- **fieldManager** (**查询参数**):string
+
+ }}">fieldManager
+
+
+- **fieldValidation** (**查询参数**):string
+
+ }}">fieldValidation
+
+
+- **pretty** (**查询参数**):string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">Namespace ):OK
+
+201 (}}">Namespace ):Created
+
+401: Unauthorized
+
+
+### `patch` 部分更新指定的 Namespace
+
+#### HTTP 请求
+
+PATCH /api/v1/namespaces/{name}
+
+#### 参数
+
+
+- **name** (**路径参数**):string,必需
+
+ Namespace 的名称
+
+
+- **body**: }}">Patch ,必需
+
+
+- **dryRun** (**查询参数**):string
+
+ }}">dryRun
+
+
+- **fieldManager** (**查询参数**):string
+
+ }}">fieldManager
+
+
+- **fieldValidation** (**查询参数**):string
+
+ }}">fieldValidation
+
+
+- **force** (**查询参数**):boolean
+
+ }}">force
+
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">Namespace ):OK
+
+201 (}}">Namespace ):Created
+
+401: Unauthorized
+
+
+### `patch` 部分更新指定 Namespace 的状态
+
+#### HTTP 请求
+
+PATCH /api/v1/namespaces/{name}/status
+
+#### 参数
+
+
+- **name** (**路径参数**):string,必需
+
+ Namespace 的名称
+
+
+- **body**: }}">Patch ,必需
+
+
+
+- **dryRun** (**查询参数**):string
+
+ }}">dryRun
+
+
+- **fieldManager** (**查询参数**):string
+
+ }}">fieldManager
+
+
+- **fieldValidation** (**查询参数**):string
+
+ }}">fieldValidation
+
+
+- **force** (**查询参数**): boolean
+
+ }}">force
+
+
+- **pretty** (**查询参数**):string
+
+ }}">pretty
+
+
+#### 响应
+
+
+200 (}}">Namespace ):OK
+
+201 (}}">Namespace ):Created
+
+401:Unauthorized
+
+
+### `delete` 删除一个 Namespace
+
+#### HTTP 请求
+
+DELETE /api/v1/namespaces/{name}
+
+#### 参数
+
+
+- **name** (**路径参数**):string,必需
+
+ Namespace 的名称
+
+- **body**: }}">DeleteOptions
+
+
+- **dryRun** (**查询参数**):string
+
+ }}">dryRun
+
+
+- **gracePeriodSeconds** (*查询参数*):integer
+
+ }}">gracePeriodSeconds
+
+
+- **pretty** (**查询参数**):string
+
+ }}">pretty
+
+
+- **propagationPolicy** (**查询参数**):string
+
+ }}">propagationPolicy
+
+
+#### 响应
+
+200 (}}">Status ):OK
+
+202 (}}">Status ):Accepted
+
+401:Unauthorized
diff --git a/content/zh/docs/reference/kubernetes-api/common-definitions/_index.md b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/_index.md
similarity index 100%
rename from content/zh/docs/reference/kubernetes-api/common-definitions/_index.md
rename to content/zh-cn/docs/reference/kubernetes-api/common-definitions/_index.md
diff --git a/content/zh/docs/reference/kubernetes-api/common-definitions/delete-options.md b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/delete-options.md
similarity index 92%
rename from content/zh/docs/reference/kubernetes-api/common-definitions/delete-options.md
rename to content/zh-cn/docs/reference/kubernetes-api/common-definitions/delete-options.md
index 0ffff678d3..b1790035e3 100644
--- a/content/zh/docs/reference/kubernetes-api/common-definitions/delete-options.md
+++ b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/delete-options.md
@@ -39,7 +39,7 @@ auto_generated: true
`APIVersion` 定义对象表示的版本化模式。
服务器应将已识别的模式转换为最新的内部值,并可能拒绝无法识别的值。
- 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
+ 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
-
+
- **preconditions** (Preconditions)
先决条件必须在执行删除之前完成。如果无法满足这些条件,将返回 409(冲突)状态。
-
+
*执行操作(更新、删除等)之前必须满足先决条件。*
@@ -131,7 +131,7 @@ auto_generated: true
表示是否以及如何执行垃圾收集。可以设置此字段或 `orphanDependents` 字段,但不能同时设置二者。
默认策略由 `metadata.finalizers` 中现有终结器(Finalizer)集合和特定资源的默认策略决定。
- 可接受的值为: `Orphan` - 令依赖对象成为孤儿对象;`Background` - 允许垃圾收集器在后台删除依赖项;`Foreground` - 一个级联策略,前台删除所有依赖项。
+ 可接受的值为:`Orphan` - 令依赖对象成为孤儿对象;`Background` - 允许垃圾收集器在后台删除依赖项;`Foreground` - 一个级联策略,前台删除所有依赖项。
diff --git a/content/zh/docs/reference/kubernetes-api/common-definitions/label-selector.md b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/label-selector.md
similarity index 100%
rename from content/zh/docs/reference/kubernetes-api/common-definitions/label-selector.md
rename to content/zh-cn/docs/reference/kubernetes-api/common-definitions/label-selector.md
diff --git a/content/zh/docs/reference/kubernetes-api/common-definitions/list-meta.md b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/list-meta.md
similarity index 96%
rename from content/zh/docs/reference/kubernetes-api/common-definitions/list-meta.md
rename to content/zh-cn/docs/reference/kubernetes-api/common-definitions/list-meta.md
index 2b4169c3e3..a196b4f8ac 100644
--- a/content/zh/docs/reference/kubernetes-api/common-definitions/list-meta.md
+++ b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/list-meta.md
@@ -71,7 +71,7 @@ ListMeta describes metadata that synthetic resources must have, including lists
标识该对象的服务器内部版本的字符串,客户端可以用该字段来确定对象何时被更改。
该值对客户端是不透明的,并且应该原样传回给服务器。该值由系统填充,只读。
- 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency。
+ 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency 。
name 在命名空间内必须是唯一的。创建资源时需要,尽管某些资源可能允许客户端请求自动地生成适当的名称。
名称主要用于创建幂等性和配置定义。无法更新。
- 更多信息:http://kubernetes.io/docs/user-guide/identifiers#names
+ 更多信息: http://kubernetes.io/docs/user-guide/identifiers#names
- **generateName** (string)
@@ -72,7 +72,7 @@ ObjectMeta 是所有持久化资源必须具有的元数据,其中包括用户
如果指定了此字段并且生成的名称存在,则服务器将不会返回 409 ——相反,它将返回 201 Created 或 500,
原因是 ServerTimeout 指示在分配的时间内找不到唯一名称,客户端应重试(可选,在 Retry-After 标头中指定的时间之后)。
- 仅在未指定 name 时应用。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency
+ 仅在未指定 name 时应用。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency
- **namespace** (string)
@@ -84,7 +84,7 @@ ObjectMeta 是所有持久化资源必须具有的元数据,其中包括用户
namespace 定义了一个值空间,其中每个名称必须唯一。空命名空间相当于 “default” 命名空间,但 “default” 是规范表示。
并非所有对象都需要限定在命名空间中——这些对象的此字段的值将为空。
- 必须是 DNS_LABEL。无法更新。更多信息:http://kubernetes.io/docs/user-guide/namespaces
+ 必须是 DNS_LABEL。无法更新。更多信息: http://kubernetes.io/docs/user-guide/namespaces
- **labels** (map[string]string)
@@ -92,7 +92,7 @@ ObjectMeta 是所有持久化资源必须具有的元数据,其中包括用户
Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels
-->
可用于组织和分类(确定范围和选择)对象的字符串键和值的映射。
- 可以匹配 ReplicationControllers 和 Service 的选择器。更多信息:http://kubernetes.io/docs/user-guide/labels
+ 可以匹配 ReplicationControllers 和 Service 的选择器。更多信息: http://kubernetes.io/docs/user-guide/labels
- **annotations** (map[string]string)
@@ -100,7 +100,7 @@ ObjectMeta 是所有持久化资源必须具有的元数据,其中包括用户
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations
-->
annotations 是一个非结构化的键值映射,存储在资源中,可以由外部工具设置以存储和检索任意元数据。
- 它们不可查询,在修改对象时应保留。更多信息:http://kubernetes.io/docs/user-guide/annotations
+ 它们不可查询,在修改对象时应保留。更多信息: http://kubernetes.io/docs/user-guide/annotations
@@ -251,17 +251,17 @@ ObjectMeta 是所有持久化资源必须具有的元数据,其中包括用户
- **ownerReferences.kind** (string),必选
- 被引用资源的类别。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+ 被引用资源的类别。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- **ownerReferences.name** (string),必选
- 被引用资源的名称。更多信息:http://kubernetes.io/docs/user-guide/identifiers#names
+ 被引用资源的名称。更多信息: http://kubernetes.io/docs/user-guide/identifiers#names
- **ownerReferences.uid** (string),必选
- 被引用资源的 uid。更多信息:http://kubernetes.io/docs/user-guide/identifiers#uids
+ 被引用资源的 uid。更多信息: http://kubernetes.io/docs/user-guide/identifiers#uids
- **ownerReferences.blockOwnerDeletion** (boolean)
@@ -293,7 +293,7 @@ ObjectMeta 是所有持久化资源必须具有的元数据,其中包括用户
不能保证在单独的操作中按发生前的顺序设置。
客户端不得设置此值。它以 RFC3339 形式表示,并采用 UTC。
- 由系统填充。只读。列表为空。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+ 由系统填充。只读。列表为空。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
UID 是该对象在时间和空间上的唯一值。它通常由服务器在成功创建资源时生成,并且不允许使用 PUT 操作更改。
- 由系统填充。只读。更多信息:http://kubernetes.io/docs/user-guide/identifiers#uids
+ 由系统填充。只读。更多信息: http://kubernetes.io/docs/user-guide/identifiers#uids
### 忽略字段 {#Ignored}
diff --git a/content/zh/docs/reference/kubernetes-api/common-definitions/object-reference.md b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/object-reference.md
similarity index 80%
rename from content/zh/docs/reference/kubernetes-api/common-definitions/object-reference.md
rename to content/zh-cn/docs/reference/kubernetes-api/common-definitions/object-reference.md
index 2655586d21..03280cceda 100644
--- a/content/zh/docs/reference/kubernetes-api/common-definitions/object-reference.md
+++ b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/object-reference.md
@@ -84,28 +84,28 @@ ObjectReference包含足够的信息,允许你检查或修改引用的对象
- **fieldPath** (string)
如果引用的是对象的某个对象是整个对象,则该字符串而不是应包含的 JSON/Go 字段有效访问语句,
- 例如`desiredState.manifest.containers[ 2 ]`。例如,如果对象引用针对的是 Pod 中的一个容器,
- 此字段取值类似于:`spec.containers{name}`(`name`指触发的容器的名称),
- 或者如果没有指定容器名称,`spec.containers[ 2 ]`(此Pod中索引为2的容器)。
+ 例如 `desiredState.manifest.containers[ 2 ]`。例如,如果对象引用针对的是 Pod 中的一个容器,
+ 此字段取值类似于:`spec.containers{name}`(`name` 指触发的容器的名称),
+ 或者如果没有指定容器名称,`spec.containers[ 2 ]`(此 Pod 中索引为 2 的容器)。
选择这种只是为了有一些定义好的语法来引用对象的部分。
- **kind** (string)
- 被引用者的类别(kind)。 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md #types-kinds
+ 被引用者的类别(kind)。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- **name** (string)
- 被引用对象的名称。更多信息:https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ 被引用对象的名称。更多信息: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- **namespace** (string)
- 被引用对象的名字空间。更多信息:https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
+ 被引用对象的名字空间。更多信息: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
- **resourceVersion** (string)
- 被引用对象的特定资源版本(如果有)。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
+ 被引用对象的特定资源版本(如果有)。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
- **uid** (string)
- 被引用对象的UID。更多信息:https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
+ 被引用对象的UID。更多信息: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
diff --git a/content/zh/docs/reference/kubernetes-api/common-definitions/patch.md b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/patch.md
similarity index 100%
rename from content/zh/docs/reference/kubernetes-api/common-definitions/patch.md
rename to content/zh-cn/docs/reference/kubernetes-api/common-definitions/patch.md
diff --git a/content/zh/docs/reference/kubernetes-api/common-definitions/quantity.md b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/quantity.md
similarity index 97%
rename from content/zh/docs/reference/kubernetes-api/common-definitions/quantity.md
rename to content/zh-cn/docs/reference/kubernetes-api/common-definitions/quantity.md
index 84ce0dd899..82d129c4ad 100644
--- a/content/zh/docs/reference/kubernetes-api/common-definitions/quantity.md
+++ b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/quantity.md
@@ -68,7 +68,7 @@ The serialization format is:
-->
```
::=
- (注意 可能为空, 例如 的 "" 情形。)
+ (注意 可能为空,例如 的 "" 情形。)
::= 0 | 1 | ... | 9
::= |
::= | . | . | .
@@ -76,7 +76,7 @@ The serialization format is:
::= |
::= | |
::= Ki | Mi | Gi | Ti | Pi | Ei
- (国际单位制度;查阅:http://physics.nist.gov/cuu/Units/binary.html)
+ (国际单位制度;查阅: http://physics.nist.gov/cuu/Units/binary.html)
::= m | "" | k | M | G | T | P | E
(注意,1024 = 1ki 但 1000 = 1k;我没有选择大写。)
::= "e" | "E"
diff --git a/content/zh/docs/reference/kubernetes-api/common-definitions/resource-field-selector.md b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/resource-field-selector.md
similarity index 100%
rename from content/zh/docs/reference/kubernetes-api/common-definitions/resource-field-selector.md
rename to content/zh-cn/docs/reference/kubernetes-api/common-definitions/resource-field-selector.md
diff --git a/content/zh/docs/reference/kubernetes-api/common-definitions/status.md b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/status.md
similarity index 91%
rename from content/zh/docs/reference/kubernetes-api/common-definitions/status.md
rename to content/zh-cn/docs/reference/kubernetes-api/common-definitions/status.md
index 54e8033160..0d3a6de1b6 100644
--- a/content/zh/docs/reference/kubernetes-api/common-definitions/status.md
+++ b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/status.md
@@ -10,7 +10,7 @@ weight: 12
auto_generated: true
---
-
APIVersion 定义对象表示的版本化模式。
服务器应将已识别的模式转换为最新的内部值,并可能拒绝无法识别的值。
- 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
+ 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- **code** (int32)
@@ -60,7 +60,7 @@ guide. You can file document formatting bugs against the
- **details** (StatusDetails)
-
@@ -68,7 +68,7 @@ guide. You can file document formatting bugs against the
此字段是可选的,并且不保证返回的数据符合任何模式,除非由原因类型定义。
-
@@ -88,14 +88,14 @@ guide. You can file document formatting bugs against the
并非所有 StatusReasons 都可以提供详细的原因。
-
*StatusCause 提供有关 api.Status 失败的更多信息,包括遇到多个错误的情况。*
- **details.causes.field** (string)
-
与状态 StatusReason 关联的资源的种类属性。
在某些操作上可能与请求的资源种类不同。
- 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+ 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- **details.name** (string)
@@ -146,7 +146,7 @@ guide. You can file document formatting bugs against the
- **details.retryAfterSeconds** (int32)
-
资源的 UID(当有单个可以描述的资源时)。
- 更多信息:http://kubernetes.io/docs/user-guide/identifiers#uids
+ 更多信息: http://kubernetes.io/docs/user-guide/identifiers#uids
- **kind** (string)
-
标准列表元数据。
- 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+ 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- **reason** (string)
-
- 操作状态。“Success”或“Failure” 之一。
- 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
+ 操作状态。“Success”或“Failure” 之一。
+ 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
diff --git a/content/zh/docs/reference/kubernetes-api/common-definitions/typed-local-object-reference.md b/content/zh-cn/docs/reference/kubernetes-api/common-definitions/typed-local-object-reference.md
similarity index 100%
rename from content/zh/docs/reference/kubernetes-api/common-definitions/typed-local-object-reference.md
rename to content/zh-cn/docs/reference/kubernetes-api/common-definitions/typed-local-object-reference.md
diff --git a/content/zh/docs/reference/kubernetes-api/common-parameters/common-parameters.md b/content/zh-cn/docs/reference/kubernetes-api/common-parameters/common-parameters.md
similarity index 100%
rename from content/zh/docs/reference/kubernetes-api/common-parameters/common-parameters.md
rename to content/zh-cn/docs/reference/kubernetes-api/common-parameters/common-parameters.md
diff --git a/content/zh/docs/reference/kubernetes-api/config-and-storage-resources/_index.md b/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/_index.md
similarity index 100%
rename from content/zh/docs/reference/kubernetes-api/config-and-storage-resources/_index.md
rename to content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/_index.md
diff --git a/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/config-map-v1.md b/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/config-map-v1.md
new file mode 100644
index 0000000000..30a998ce96
--- /dev/null
+++ b/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/config-map-v1.md
@@ -0,0 +1,649 @@
+---
+api_metadata:
+ apiVersion: "v1"
+ import: "k8s.io/api/core/v1"
+ kind: "ConfigMap"
+content_type: "api_reference"
+description: "ConfigMap 包含供 Pod 使用的配置数据。"
+title: "ConfigMap"
+weight: 1
+---
+
+
+`apiVersion: v1`
+
+`import "k8s.io/api/core/v1"`
+
+## ConfigMap {#ConfigMap}
+
+
+ConfigMap 包含供 Pod 使用的配置数据。
+
+
+
+- **apiVersion**: v1
+
+- **kind**: ConfigMap
+
+
+- **metadata** (}}">ObjectMeta )
+
+ 标准的对象元数据。
+ 更多信息:
+ https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+
+
+- **binaryData** (map[string][]byte)
+
+ binaryData 包含二进制数据。
+ 每个键必须由字母、数字、“-”、“_” 或 “.” 组成。
+ binaryData 可以包含不在 UTF-8 范围中的字节序列。
+ binaryData 中存储的键不得与 data 字段中的键重叠,这在验证过程中是强制要求。
+ 使用此字段需要 apiserver 和 kubelet 的版本高于 1.10。
+
+
+- **data** (map[string]string)
+
+ data 包含配置数据。
+ 每个键必须由字母、数字、“-”、“_” 或 “.” 组成。
+ 如果值包含非 UTF-8 字节序列,则必须使用 binaryData 字段。
+ data 中存储的键不得与 binaryData 字段中的键重叠,这在验证过程中是强制要求。
+
+- **immutable** (boolean)
+
+ 如果 immutable 设为 true,
+ 则确保不会更新 ConfigMap 中存储的数据(只能修改对象元数据)。
+ 如果未设为 true,则可以随时修改此字段。
+ 默认为 nil。
+
+## ConfigMapList {#ConfigMapList}
+
+
+ConfigMapList 是包含 ConfigMap 对象列表的资源。
+
+
+
+- **apiVersion**: v1
+
+- **kind**: ConfigMapList
+
+
+- **metadata** (}}">ListMeta )
+
+ 更多信息:
+ https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+
+- **items** ([]}}">ConfigMap ),必需
+
+ items 是 ConfigMap 的列表。
+
+
+## 操作 {#Operations}
+
+
+
+### `get` 读取指定的 ConfigMap
+
+#### HTTP 请求
+
+GET /api/v1/namespaces/{namespace}/configmaps/{name}
+
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ ConfigMap 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">ConfigMap ): OK
+
+401: Unauthorized
+
+
+### `list` 列出或观测类别为 ConfigMap 的对象
+
+#### HTTP 请求
+
+GET /api/v1/namespaces/{namespace}/configmaps
+
+
+#### 参数
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **allowWatchBookmarks** (**查询参数**): boolean
+
+ }}">allowWatchBookmarks
+
+- **continue** (**查询参数**): string
+
+ }}">continue
+
+- **fieldSelector** (**查询参数**): string
+
+ }}">fieldSelector
+
+- **labelSelector** (**查询参数**): string
+
+ }}">labelSelector
+
+- **limit** (**查询参数**): integer
+
+ }}">limit
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **resourceVersion** (**查询参数**): string
+
+ }}">resourceVersion
+
+- **resourceVersionMatch** (**查询参数**): string
+
+ }}">resourceVersionMatch
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+- **watch** (**查询参数**): boolean
+
+ }}">watch
+
+
+#### 响应
+
+200 (}}">ConfigMapList ): OK
+
+401: Unauthorized
+
+
+### `list` 列出或观测类别为 ConfigMap 的对象
+
+#### HTTP 请求
+
+GET /api/v1/configmaps
+
+
+#### 参数
+
+- **allowWatchBookmarks** (**查询参数**): boolean
+
+ }}">allowWatchBookmarks
+
+- **continue** (**查询参数**): string
+
+ }}">continue
+
+- **fieldSelector** (**查询参数**): string
+
+ }}">fieldSelector
+
+- **labelSelector** (**查询参数**): string
+
+ }}">labelSelector
+
+- **limit** (**查询参数**): integer
+
+ }}">limit
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **resourceVersion** (**查询参数**): string
+
+ }}">resourceVersion
+
+- **resourceVersionMatch** (**查询参数**): string
+
+ }}">resourceVersionMatch
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+- **watch** (**查询参数**): boolean
+
+ }}">watch
+
+
+#### 响应
+
+200 (}}">ConfigMapList ): OK
+
+401: Unauthorized
+
+
+### `create` 创建 ConfigMap
+
+#### HTTP 请求
+
+POST /api/v1/namespaces/{namespace}/configmaps
+
+
+#### 参数
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">ConfigMap ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">ConfigMap ): OK
+
+201 (}}">ConfigMap ): Created
+
+202 (}}">ConfigMap ): Accepted
+
+401: Unauthorized
+
+
+### `update` 替换指定的 ConfigMap
+
+#### HTTP 请求
+
+PUT /api/v1/namespaces/{namespace}/configmaps/{name}
+
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ ConfigMap 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">ConfigMap ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">ConfigMap ): OK
+
+201 (}}">ConfigMap ): Created
+
+401: Unauthorized
+
+
+### `patch` 部分更新指定的 ConfigMap
+
+#### HTTP 请求
+
+PATCH /api/v1/namespaces/{namespace}/configmaps/{name}
+
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ ConfigMap 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">Patch ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **force** (**查询参数**): boolean
+
+ }}">force
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">ConfigMap ): OK
+
+201 (}}">ConfigMap ): Created
+
+401: Unauthorized
+
+
+### `delete` 删除 ConfigMap
+
+#### HTTP 请求
+
+DELETE /api/v1/namespaces/{namespace}/configmaps/{name}
+
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ ConfigMap 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">DeleteOptions
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **gracePeriodSeconds** (**查询参数**): integer
+
+ }}">gracePeriodSeconds
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **propagationPolicy** (**查询参数**): string
+
+ }}">propagationPolicy
+
+
+#### 响应
+
+200 (}}">Status ): OK
+
+202 (}}">Status ): Accepted
+
+401: Unauthorized
+
+
+### `deletecollection` 删除 ConfigMap 的集合
+
+#### HTTP 请求
+
+DELETE /api/v1/namespaces/{namespace}/configmaps
+
+
+#### 参数
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **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
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+
+#### 响应
+
+200 (}}">Status ): OK
+
+401: Unauthorized
diff --git a/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/csi-driver-v1.md b/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/csi-driver-v1.md
new file mode 100644
index 0000000000..29011ebe89
--- /dev/null
+++ b/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/csi-driver-v1.md
@@ -0,0 +1,718 @@
+---
+api_metadata:
+ apiVersion: "storage.k8s.io/v1"
+ import: "k8s.io/api/storage/v1"
+ kind: "CSIDriver"
+content_type: "api_reference"
+description: "CSIDriver 抓取集群上部署的容器存储接口(CSI)卷驱动有关的信息。"
+title: "CSIDriver"
+weight: 8
+---
+
+
+`apiVersion: storage.k8s.io/v1`
+
+`import "k8s.io/api/storage/v1"`
+
+## CSIDriver {#CSIDriver}
+
+
+CSIDriver 抓取集群上部署的容器存储接口(CSI)卷驱动有关的信息。
+Kubernetes 挂接/解除挂接控制器使用此对象来决定是否需要挂接。
+Kubelet 使用此对象决定挂载时是否需要传递 Pod 信息。
+CSIDriver 对象未划分命名空间。
+
+
+
+- **apiVersion**: storage.k8s.io/v1
+
+- **kind**: CSIDriver
+
+
+- **metadata** (}}">ObjectMeta )
+
+ 标准的对象元数据。
+ `metadata.name` 表示此对象引用的 CSI 驱动的名称;
+ 它必须与该驱动的 CSI GetPluginName() 调用返回的名称相同。
+ 驱动名称不得超过 63 个字符,以字母、数字([a-z0-9A-Z])开头和结尾,
+ 中间可包含短划线(-)、英文句点(.)、字母和数字。
+ 更多信息:
+ https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+
+- **spec** (}}">CSIDriverSpec ),必需
+
+ CSI 驱动的规约。
+
+## CSIDriverSpec {#CSIDriverSpec}
+
+
+CSIDriverSpec 是 CSIDriver 的规约。
+
+
+
+
+- **attachRequired** (boolean)
+
+ attachRequired 表示这个 CSI 卷驱动需要挂接操作
+ (因为它实现了 CSI ControllerPublishVolume() 方法),
+ Kubernetes 挂接/解除挂接控制器应调用挂接卷接口,
+ 以检查卷挂接(volumeattachment)状态并在继续挂载之前等待卷被挂接。
+ CSI 外部挂接器与 CSI 卷驱动配合使用,并在挂接操作完成时更新 volumeattachment 状态。
+ 如果 CSIDriverRegistry 特性门控被启用且此值指定为 false,将跳过挂接操作。
+ 否则将调用挂接操作。
+
+ 此字段不可变更。
+
+
+- **fsGroupPolicy** (string)
+
+ 定义底层卷是否支持在挂载之前更改卷的所有权和权限。
+ 有关更多详细信息,请参考特定的 FSGroupPolicy 值。
+
+ 此字段不可变更。
+
+ 默认为 ReadWriteOnceWithFSType,这会检查每个卷,以决定 Kubernetes 是否应修改卷的所有权和权限。
+ 采用默认策略时,如果定义了 fstype 且卷的访问模式包含 ReadWriteOnce,将仅应用定义的 fsGroup。
+
+
+- **podInfoOnMount** (boolean)
+
+ 如果设为 true,则 podInfoOnMount 表示在挂载操作期间这个 CSI 卷需要更多的 Pod 信息(例如 podName 和 podUID 等)。
+ 如果设为 false,则挂载时将不传递 Pod 信息。
+ 默认为 false。
+ CSI 驱动将 podInfoOnMount 指定为驱动部署的一部分。
+ 如果为 true,Kubelet 将在 CSI NodePublishVolume() 调用中作为 VolumeContext 传递 Pod 信息。
+ CSI 驱动负责解析和校验作为 VolumeContext 传递进来的信息。
+ 如果 podInfoOnMount 设为 true,将传递以下 VolumeConext。
+ 此列表可能变大,但将使用前缀。
+ - "csi.storage.k8s.io/pod.name": pod.name
+ - "csi.storage.k8s.io/pod.namespace": pod.namespace
+ - "csi.storage.k8s.io/pod.uid": string(pod.UID)
+ - "csi.storage.k8s.io/ephemeral":
+ 如果此卷是 CSIVolumeSource 定义的一个临时内联卷,则为 “true”,否则为 “false”
+
+ “csi.storage.k8s.io/ephemeral” 是 Kubernetes 1.16 中一个新的功能特性。
+ 只有同时支持 “Persistent” 和 “Ephemeral” VolumeLifecycleMode 的驱动,此字段才是必需的。
+ 其他驱动可以保持禁用 Pod 信息或忽略此字段。
+ 由于 Kubernetes 1.15 不支持此字段,所以在这类集群上部署驱动时,只能支持一种模式。
+ 该部署就决定了是哪种模式,例如通过驱动的命令行参数。
+
+ 此字段不可变更。
+
+
+- **requiresRepublish** (boolean)
+
+ requiresRepublish 表示 CSI 驱动想要 `NodePublishVolume` 被周期性地调用,
+ 以反映已挂载卷中的任何可能的变化。
+ 此字段默认为 false。
+
+ 注:成功完成对 NodePublishVolume 的初始调用后,对 NodePublishVolume 的后续调用只应更新卷的内容。
+ 新的挂载点将不会被运行的容器察觉。
+
+
+- **storageCapacity** (boolean)
+
+ 如果设为 true,则 storageCapacity 表示 CSI 卷驱动希望 Pod 调度时考虑存储容量,
+ 驱动部署将通过创建包含容量信息的 CSIStorageCapacity 对象来报告该存储容量。
+
+ 部署驱动时可以立即启用这个检查。
+ 这种情况下,只有此驱动部署已发布某些合适的 CSIStorageCapacity 对象,
+ 才会继续制备新的卷,然后进行绑定。
+
+ 换言之,可以在未设置此字段或此字段为 false 的情况下部署驱动,
+ 并且可以在发布存储容量信息后再修改此字段。
+
+ 此字段在 Kubernetes 1.22 及更早版本中不可变更,但现在可以变更。
+
+
+- **tokenRequests** ([]TokenRequest)
+
+ **原子性:将在合并期间被替换**
+
+ tokenRequests 表示 CSI 驱动需要供挂载卷所用的 Pod 的服务帐户令牌,进行必要的鉴权。
+ Kubelet 将在 CSI NodePublishVolume 调用中传递 VolumeContext 中的令牌。
+ CSI 驱动应解析和校验以下 VolumeContext:
+
+ ```
+ "csi.storage.k8s.io/serviceAccount.tokens": {
+ "": {
+ "token": ,
+ "expirationTimestamp": ,
+ },
+ ...
+ }
+ ```
+
+ 注:每个 tokenRequest 中的受众应该不同,且最多有一个令牌是空字符串。
+ 要在令牌过期后接收一个新的令牌,requiresRepublish 可用于周期性地触发 NodePublishVolume。
+
+
+ **tokenRequest 包含一个服务帐户令牌的参数。**
+
+
+ - **tokenRequests.audience** (string),必需
+
+ audience 是 “TokenRequestSpec” 中令牌的目标受众。
+ 它默认为 kube apiserver 的受众。
+
+ - **tokenRequests.expirationSeconds** (int64)
+
+ expirationSeconds 是 “TokenRequestSpec” 中令牌的有效期。
+ 它具有与 “TokenRequestSpec” 中 “expirationSeconds” 相同的默认值。
+
+
+- **volumeLifecycleModes** ([]string)
+
+ **集合:唯一值将在合并期间被保留**
+
+ volumeLifecycleModes 定义这个 CSI 卷驱动支持哪种类别的卷。
+ 如果列表为空,则默认值为 “Persistent”,这是 CSI 规范定义的用法,
+ 并通过常用的 PV/PVC 机制在 Kubernetes 中实现。
+ 另一种模式是 “Ephemeral”。
+ 在这种模式下,在 Pod 规约中用 CSIVolumeSource 以内联方式定义卷,其生命周期与该 Pod 的生命周期相关联。
+ 驱动必须感知到这一点,因为只有针对这种卷才会接收到 NodePublishVolume 调用。
+ 有关实现此模式的更多信息,请参阅
+ https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html。
+ 驱动可以支持其中一种或多种模式,将来可能会添加更多模式。
+ 此字段处于 beta 阶段。
+
+ 此字段不可变更。
+
+## CSIDriverList {#CSIDriverList}
+
+
+CSIDriverList 是 CSIDriver 对象的集合。
+
+
+
+- **apiVersion**: storage.k8s.io/v1
+
+- **kind**: CSIDriverList
+
+
+- **metadata** (}}">ListMeta )
+
+ 标准的列表元数据。
+ 更多信息:
+ https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+
+- **items** ([]}}">CSIDriver ),必需
+
+ items 是 CSIDriver 的列表。
+
+
+## 操作 {#Operations}
+
+
+
+### `get` 读取指定的 CSIDriver
+
+#### HTTP 请求
+
+GET /apis/storage.k8s.io/v1/csidrivers/{name}
+
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ CSIDriver 的名称
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">CSIDriver ): OK
+
+401: Unauthorized
+
+
+### `list` 列出或观测类别为 CSIDriver 的对象
+
+#### HTTP 请求
+
+GET /apis/storage.k8s.io/v1/csidrivers
+
+
+#### 参数
+
+- **allowWatchBookmarks** (**查询参数**): boolean
+
+ }}">allowWatchBookmarks
+
+- **continue** (**查询参数**): string
+
+ }}">continue
+
+- **fieldSelector** (**查询参数**): string
+
+ }}">fieldSelector
+
+- **labelSelector** (**查询参数**): string
+
+ }}">labelSelector
+
+- **limit** (**查询参数**): integer
+
+ }}">limit
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **resourceVersion** (**查询参数**): string
+
+ }}">resourceVersion
+
+- **resourceVersionMatch** (**查询参数**): string
+
+ }}">resourceVersionMatch
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+- **watch** (**查询参数**): boolean
+
+ }}">watch
+
+
+#### 响应
+
+200 (}}">CSIDriverList ): OK
+
+401: Unauthorized
+
+
+### `create` 创建 CSIDriver
+
+#### HTTP 请求
+
+POST /apis/storage.k8s.io/v1/csidrivers
+
+
+#### 参数
+
+- **body**: }}">CSIDriver ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">CSIDriver ): OK
+
+201 (}}">CSIDriver ): Created
+
+202 (}}">CSIDriver ): Accepted
+
+401: Unauthorized
+
+
+### `update` 替换指定的 CSIDriver
+
+#### HTTP 请求
+
+PUT /apis/storage.k8s.io/v1/csidrivers/{name}
+
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ CSIDriver 的名称
+
+- **body**: }}">CSIDriver ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">CSIDriver ): OK
+
+201 (}}">CSIDriver ): Created
+
+401: Unauthorized
+
+
+### `patch` 部分更新指定的 CSIDriver
+
+#### HTTP 请求
+
+PATCH /apis/storage.k8s.io/v1/csidrivers/{name}
+
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ CSIDriver 的名称
+
+- **body**: }}">Patch ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **force** (**查询参数**): boolean
+
+ }}">force
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">CSIDriver ): OK
+
+201 (}}">CSIDriver ): Created
+
+401: Unauthorized
+
+
+### `delete` 删除 CSIDriver
+
+#### HTTP 请求
+
+DELETE /apis/storage.k8s.io/v1/csidrivers/{name}
+
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ CSIDriver 的名称
+
+- **body**: }}">DeleteOptions
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **gracePeriodSeconds** (**查询参数**): integer
+
+ }}">gracePeriodSeconds
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **propagationPolicy** (**查询参数**): string
+
+ }}">propagationPolicy
+
+
+#### 响应
+
+200 (}}">CSIDriver ): OK
+
+202 (}}">CSIDriver ): Accepted
+
+401: Unauthorized
+
+
+### `deletecollection` 删除 CSIDriver 的集合
+
+#### HTTP 请求
+
+DELETE /apis/storage.k8s.io/v1/csidrivers
+
+
+#### 参数
+
+- **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
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+
+#### 响应
+
+200 (}}">Status ): OK
+
+401: Unauthorized
diff --git a/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/csi-storage-capacity-v1.md b/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/csi-storage-capacity-v1.md
new file mode 100644
index 0000000000..37fb580127
--- /dev/null
+++ b/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/csi-storage-capacity-v1.md
@@ -0,0 +1,685 @@
+---
+api_metadata:
+ apiVersion: "storage.k8s.io/v1"
+ import: "k8s.io/api/storage/v1"
+ kind: "CSIStorageCapacity"
+content_type: "api_reference"
+description: "CSIStorageCapacity 存储一个 CSI GetCapacity 调用的结果。"
+title: "CSIStorageCapacity"
+weight: 10
+---
+
+
+`apiVersion: storage.k8s.io/v1`
+
+`import "k8s.io/api/storage/v1"`
+
+## CSIStorageCapacity {#CSIStorageCapacity}
+
+
+CSIStorageCapacity 存储一个 CSI GetCapacity 调用的结果。
+对于给定的 StorageClass,此结构描述了特定拓扑段中可用的容量。
+当考虑在哪里实例化新的 PersistentVolume 时可以使用此项。
+
+例如,此结构可以描述如下内容:
+
+- “standard” 的 StorageClass 容量为 “1234 GiB”,可用于 “topology.kubernetes.io/zone=us-east1”
+- “localssd” 的 StorageClass 容量为 “10 GiB”,可用于 “kubernetes.io/hostname=knode-abc123”
+
+以下三种情况均暗示了某些组合没有可用的容量:
+
+- 不存在拓扑和存储类名称合适的对象
+- 这种对象存在,但容量未设置
+- 这种对象存在,但容量为零
+
+
+这些对象的制作方可以决定哪种方法更合适。
+
+当 CSI 驱动选择使用 CSIDriverSpec.StorageCapacity 进行容量感知调度时,kube-scheduler 会使用这些对象。
+该调度器将 MaximumVolumeSize 与 pending 卷的请求大小进行比较,以过滤掉不合适的节点。
+如果未设置 MaximumVolumeSize,则回退为与不太精确的容量(Capacity)进行比较。
+如果还是未设置,则该调度器假定容量不足并尝试某些其他节点。
+
+
+
+- **apiVersion**: storage.k8s.io/v1
+
+- **kind**: CSIStorageCapacity
+
+
+- **metadata** (}}">ObjectMeta )
+
+ 标准的对象元数据。
+ 此名称没有特定的含义。
+ 它必须是 DNS 子域名(允许英文句点,最多 253 个字符)。
+ 为了确保与集群上的其他 CSI 驱动没有冲突,建议使用一个生成的名称 csisc-\,
+ 或使用以唯一 CSI 驱动名称结尾的反向域名。
+
+ 这些对象是有命名空间的。
+
+ 更多信息:
+ https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+
+
+- **storageClassName** (string),必需
+
+ 这是已报告容量所应用到的 StorageClass 的名称。
+ 它必须满足与 StorageClass 对象名称相同的要求(非空,DNS 子域名)。
+ 如果该对象不再存在,则 CSIStorageCapacity 对象将被废弃且应由创建者移除。
+ 此字段不可变更。
+
+- **capacity** (}}">Quantity )
+
+ capacity 是 CSI 驱动在其 GetCapacityResponse 中为 GetCapacityRequest 报告的值,其拓扑和参数与之前的字段匹配。
+
+ 该语义目前(CSI 规范 1.2)定义为:可用于制备卷的可用存储容量(单位为字节)。
+ 如果未设置,则该信息目前不可用。
+
+
+- **maximumVolumeSize** (}}">Quantity )
+
+ maximumVolumeSize 是 CSI 驱动在其 GetCapacityResponse 中为 GetCapacityRequest 报告的值,其拓扑和参数与之前的字段匹配。
+
+ 自从 CSI 规范 1.4.0 起,这定义为 `CreateVolumeRequest.capacity_range.required_bytes` 字段中可以使用的最大值,
+ 以便用 GetCapacityRequest 中相同的参数创建一个卷。
+ Kubernetes API 中的相应值是卷声明中的 ResourceRequirements.Requests。
+
+
+- **nodeTopology** (}}">LabelSelector )
+
+ nodeTopology 定义了哪些节点有权访问已报告容量的存储。
+ 如果未设置,则不能从集群中的任意节点访问此存储。
+ 如果留空,则可以从所有节点访问此存储。此字段不可变更。
+
+## CSIStorageCapacityList {#CSIStorageCapacityList}
+
+
+CSIStorageCapacityList 是 CSIStorageCapacity 对象的集合。
+
+
+
+- **apiVersion**: storage.k8s.io/v1
+
+- **kind**: CSIStorageCapacityList
+
+
+- **metadata** (}}">ListMeta )
+
+ 标准的列表元数据。
+ 更多信息:
+ https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+
+- **items** ([]}}">CSIStorageCapacity ),必需
+
+ **映射:有关键名称的唯一值将在合并期间被保留**
+
+ items 是 CSIStorageCapacity 对象的列表。
+
+
+## 操作 {#Operations}
+
+
+
+### `get` 读取指定的 CSIStorageCapacity
+
+#### HTTP 请求
+
+GET /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}
+
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ CSIStorageCapacity 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">CSIStorageCapacity ): OK
+
+401: Unauthorized
+
+
+### `list` 列出或观测类别为 CSIStorageCapacity 的对象
+
+#### HTTP 请求
+
+GET /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities
+
+
+#### 参数
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **allowWatchBookmarks** (**查询参数**): boolean
+
+ }}">allowWatchBookmarks
+
+- **continue** (**查询参数**): string
+
+ }}">continue
+
+- **fieldSelector** (**查询参数**): string
+
+ }}">fieldSelector
+
+- **labelSelector** (**查询参数**): string
+
+ }}">labelSelector
+
+- **limit** (**查询参数**): integer
+
+ }}">limit
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **resourceVersion** (**查询参数**): string
+
+ }}">resourceVersion
+
+- **resourceVersionMatch** (**查询参数**): string
+
+ }}">resourceVersionMatch
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+- **watch** (**查询参数**): boolean
+
+ }}">watch
+
+
+#### 响应
+
+200 (}}">CSIStorageCapacityList ): OK
+
+401: Unauthorized
+
+
+### `list` 列出或观测类别为 CSIStorageCapacity 的对象
+
+#### HTTP 请求
+
+GET /apis/storage.k8s.io/v1/csistoragecapacities
+
+
+#### 参数
+
+- **allowWatchBookmarks** (**查询参数**): boolean
+
+ }}">allowWatchBookmarks
+
+- **continue** (**查询参数**): string
+
+ }}">continue
+
+- **fieldSelector** (**查询参数**): string
+
+ }}">fieldSelector
+
+- **labelSelector** (**查询参数**): string
+
+ }}">labelSelector
+
+- **limit** (**查询参数**): integer
+
+ }}">limit
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **resourceVersion** (**查询参数**): string
+
+ }}">resourceVersion
+
+- **resourceVersionMatch** (**查询参数**): string
+
+ }}">resourceVersionMatch
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+- **watch** (**查询参数**): boolean
+
+ }}">watch
+
+
+#### 响应
+
+200 (}}">CSIStorageCapacityList ): OK
+
+401: Unauthorized
+
+
+### `create` 创建 CSIStorageCapacity
+
+#### HTTP 请求
+
+POST /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities
+
+
+#### 参数
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">CSIStorageCapacity ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">CSIStorageCapacity ): OK
+
+201 (}}">CSIStorageCapacity ): Created
+
+202 (}}">CSIStorageCapacity ): Accepted
+
+401: Unauthorized
+
+
+### `update` 替换指定的 CSIStorageCapacity
+
+#### HTTP 请求
+
+PUT /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}
+
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ CSIStorageCapacity 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">CSIStorageCapacity ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">CSIStorageCapacity ): OK
+
+201 (}}">CSIStorageCapacity ): Created
+
+401: Unauthorized
+
+
+### `patch` 部分更新指定的 CSIStorageCapacity
+
+#### HTTP 请求
+
+PATCH /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}
+
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ CSIStorageCapacity 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">Patch ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **force** (**查询参数**): boolean
+
+ }}">force
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">CSIStorageCapacity ): OK
+
+201 (}}">CSIStorageCapacity ): Created
+
+401: Unauthorized
+
+
+### `delete` 删除 CSIStorageCapacity
+
+#### HTTP 请求
+
+DELETE /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities/{name}
+
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ CSIStorageCapacity 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">DeleteOptions
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **gracePeriodSeconds** (**查询参数**): integer
+
+ }}">gracePeriodSeconds
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **propagationPolicy** (**查询参数**): string
+
+ }}">propagationPolicy
+
+
+#### 响应
+
+200 (}}">Status ): OK
+
+202 (}}">Status ): Accepted
+
+401: Unauthorized
+
+
+### `deletecollection` 删除 CSIStorageCapacity 的集合
+
+#### HTTP 请求
+
+DELETE /apis/storage.k8s.io/v1/namespaces/{namespace}/csistoragecapacities
+
+
+#### 参数
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **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
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+
+#### 响应
+
+200 (}}">Status ): OK
+
+401: Unauthorized
diff --git a/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/secret-v1.md b/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/secret-v1.md
new file mode 100644
index 0000000000..0e6a10abf8
--- /dev/null
+++ b/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/secret-v1.md
@@ -0,0 +1,657 @@
+---
+api_metadata:
+ apiVersion: "v1"
+ import: "k8s.io/api/core/v1"
+ kind: "Secret"
+content_type: "api_reference"
+description: "Secret 包含某些类别的秘密数据。"
+title: "Secret"
+weight: 2
+---
+
+
+`apiVersion: v1`
+
+`import "k8s.io/api/core/v1"`
+
+## Secret {#Secret}
+
+Secret 包含某些类别的秘密数据。
+data 字段值的总字节必须小于 MaxSecretSize 字节。
+
+
+
+- **apiVersion**: v1
+
+- **kind**: Secret
+
+
+- **metadata** (}}">ObjectMeta )
+
+ 标准的对象元数据。
+ 更多信息:
+ https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+
+- **data** (map[string][]byte)
+
+ data 包含秘密数据。
+ 每个键必须由字母、数字、“-”、“_” 或 “.” 组成。
+ 秘密数据的序列化格式是 base64 编码的字符串,表示此处的任意(可能是非字符串)数据值。
+ 请参阅 https://tools.ietf.org/html/rfc4648#section-4
+
+
+- **immutable** (boolean)
+
+ 如果 immutable 设为 true,则确保不会更新 Secret 中存储的数据(只能修改对象元数据)。
+ 如果未设为 true,则可以随时修改此字段。
+ 默认为 nil。
+
+- **stringData** (map[string]string)
+
+ stringData 允许指定字符串格式的非二进制秘密数据。
+ 为了方便起见,它作为只写输入字段提供。
+ 写入时将所有键和值合并到 data 字段,且覆盖任何现有的值。
+ 从 API 读取时绝不会输出 stringData 字段。
+
+- **type** (string)
+
+ 用于满足程序化方式处理秘密数据。
+ 更多信息:
+ https://kubernetes.io/zh/docs/concepts/configuration/secret/#secret-types
+
+## SecretList {#SecretList}
+
+
+SecretList 是 Secret 的列表。
+
+
+
+- **apiVersion**: v1
+
+- **kind**: SecretList
+
+
+- **metadata** (}}">ListMeta )
+
+ 标准的列表元数据。
+ 更多信息:
+ https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+
+- **items** ([]}}">Secret ),必需
+
+ items 是 Secret 对象的列表。
+ 更多信息:
+ https://kubernetes.io/zh/docs/concepts/configuration/secret
+
+
+## 操作 {#Operations}
+
+
+
+### `get` 读取指定的 Secret
+
+#### HTTP 请求
+
+GET /api/v1/namespaces/{namespace}/secrets/{name}
+
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ Secret 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">Secret ): OK
+
+401: Unauthorized
+
+
+### `list` 列出或观测类别为 Secret 的对象
+
+#### HTTP 请求
+
+GET /api/v1/namespaces/{namespace}/secrets
+
+
+#### 参数
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **allowWatchBookmarks** (**查询参数**): boolean
+
+ }}">allowWatchBookmarks
+
+- **continue** (**查询参数**): string
+
+ }}">continue
+
+- **fieldSelector** (**查询参数**): string
+
+ }}">fieldSelector
+
+- **labelSelector** (**查询参数**): string
+
+ }}">labelSelector
+
+- **limit** (**查询参数**): integer
+
+ }}">limit
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **resourceVersion** (**查询参数**): string
+
+ }}">resourceVersion
+
+- **resourceVersionMatch** (**查询参数**): string
+
+ }}">resourceVersionMatch
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+- **watch** (**查询参数**): boolean
+
+ }}">watch
+
+
+#### 响应
+
+200 (}}">SecretList ): OK
+
+401: Unauthorized
+
+
+### `list` 列出或观测类别为 Secret 的对象
+
+#### HTTP 请求
+
+GET /api/v1/secrets
+
+
+#### 参数
+
+- **allowWatchBookmarks** (**查询参数**): boolean
+
+ }}">allowWatchBookmarks
+
+- **continue** (**查询参数**): string
+
+ }}">continue
+
+- **fieldSelector** (**查询参数**): string
+
+ }}">fieldSelector
+
+- **labelSelector** (**查询参数**): string
+
+ }}">labelSelector
+
+- **limit** (**查询参数**): integer
+
+ }}">limit
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **resourceVersion** (**查询参数**): string
+
+ }}">resourceVersion
+
+- **resourceVersionMatch** (**查询参数**): string
+
+ }}">resourceVersionMatch
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+- **watch** (**查询参数**): boolean
+
+ }}">watch
+
+
+#### 响应
+
+200 (}}">SecretList ): OK
+
+401: Unauthorized
+
+
+### `create` 创建 Secret
+
+#### HTTP 请求
+
+POST /api/v1/namespaces/{namespace}/secrets
+
+
+#### 参数
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">Secret ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">Secret ): OK
+
+201 (}}">Secret ): Created
+
+202 (}}">Secret ): Accepted
+
+401: Unauthorized
+
+
+### `update` 替换指定的 Secret
+
+#### HTTP 请求
+
+PUT /api/v1/namespaces/{namespace}/secrets/{name}
+
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ Secret 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">Secret ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">Secret ): OK
+
+201 (}}">Secret ): Created
+
+401: Unauthorized
+
+
+### `patch` 部分更新指定的 Secret
+
+#### HTTP 请求
+
+PATCH /api/v1/namespaces/{namespace}/secrets/{name}
+
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ Secret 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">Patch ,必需
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **fieldManager** (**查询参数**): string
+
+ }}">fieldManager
+
+- **fieldValidation** (**查询参数**): string
+
+ }}">fieldValidation
+
+- **force** (**查询参数**): boolean
+
+ }}">force
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">Secret ): OK
+
+201 (}}">Secret ): Created
+
+401: Unauthorized
+
+
+### `delete` 删除 Secret
+
+#### HTTP 请求
+
+DELETE /api/v1/namespaces/{namespace}/secrets/{name}
+
+
+#### 参数
+
+- **name** (**路径参数**): string,必需
+
+ Secret 的名称
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **body**: }}">DeleteOptions
+
+- **dryRun** (**查询参数**): string
+
+ }}">dryRun
+
+- **gracePeriodSeconds** (**查询参数**): integer
+
+ }}">gracePeriodSeconds
+
+- **pretty** (**查询参数**): string
+
+ }}">pretty
+
+- **propagationPolicy** (**查询参数**): string
+
+ }}">propagationPolicy
+
+
+#### 响应
+
+200 (}}">Status ): OK
+
+202 (}}">Status ): Accepted
+
+401: Unauthorized
+
+
+### `deletecollection` 删除 Secret 的集合
+
+#### HTTP 请求
+
+DELETE /api/v1/namespaces/{namespace}/secrets
+
+
+#### 参数
+
+- **namespace** (**路径参数**): string,必需
+
+ }}">namespace
+
+- **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
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+
+#### 响应
+
+200 (}}">Status ): OK
+
+401: Unauthorized
diff --git a/content/zh/docs/reference/kubernetes-api/extend-resources/_index.md b/content/zh-cn/docs/reference/kubernetes-api/extend-resources/_index.md
similarity index 100%
rename from content/zh/docs/reference/kubernetes-api/extend-resources/_index.md
rename to content/zh-cn/docs/reference/kubernetes-api/extend-resources/_index.md
diff --git a/content/zh/docs/reference/kubernetes-api/policy-resources/_index.md b/content/zh-cn/docs/reference/kubernetes-api/policy-resources/_index.md
similarity index 100%
rename from content/zh/docs/reference/kubernetes-api/policy-resources/_index.md
rename to content/zh-cn/docs/reference/kubernetes-api/policy-resources/_index.md
diff --git a/content/zh/docs/reference/kubernetes-api/service-resources/_index.md b/content/zh-cn/docs/reference/kubernetes-api/service-resources/_index.md
similarity index 100%
rename from content/zh/docs/reference/kubernetes-api/service-resources/_index.md
rename to content/zh-cn/docs/reference/kubernetes-api/service-resources/_index.md
diff --git a/content/zh/docs/reference/kubernetes-api/workload-resources/_index.md b/content/zh-cn/docs/reference/kubernetes-api/workload-resources/_index.md
similarity index 100%
rename from content/zh/docs/reference/kubernetes-api/workload-resources/_index.md
rename to content/zh-cn/docs/reference/kubernetes-api/workload-resources/_index.md
diff --git a/content/zh-cn/docs/reference/kubernetes-api/workload-resources/controller-revision-v1.md b/content/zh-cn/docs/reference/kubernetes-api/workload-resources/controller-revision-v1.md
new file mode 100644
index 0000000000..d29eda09df
--- /dev/null
+++ b/content/zh-cn/docs/reference/kubernetes-api/workload-resources/controller-revision-v1.md
@@ -0,0 +1,1069 @@
+---
+api_metadata:
+ apiVersion: "apps/v1"
+ import: "k8s.io/api/apps/v1"
+ kind: "ControllerRevision"
+content_type: "api_reference"
+description: "ControllerRevision 实现了状态数据的不可变快照。"
+title: "ControllerRevision"
+weight: 7
+auto_generated: false
+---
+
+
+
+
+`apiVersion: apps/v1`
+
+`import "k8s.io/api/apps/v1"`
+
+
+## ControllerRevision {#ControllerRevision}
+
+
+ControllerRevision 实现了状态数据的不可变快照。
+客户端负责序列化和反序列化对象,包含对象内部状态。
+成功创建 ControllerRevision 后,将无法对其进行更新。
+API 服务器将无法成功验证所有尝试改变 data 字段的请求。
+但是,可以删除 ControllerRevisions。
+请注意,由于 DaemonSet 和 StatefulSet 控制器都使用它来进行更新和回滚,所以这个对象是 beta 版。
+但是,它可能会在未来版本中更改名称和表示形式,客户不应依赖其稳定性。
+它主要供控制器内部使用。
+
+
+
+
+- **apiVersion**: apps/v1
+
+
+- **kind**: ControllerRevision
+
+
+- **metadata** (}}">ObjectMeta )
+
+ 标准的对象元数据。
+ 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+
+
+- **revision** (int64),必需
+
+ revision 表示 data 表示的状态的修订。
+
+
+- **data** (RawExtension)
+
+ data 是状态的序列化表示。
+
+
+
+ *RawExtension 用于以外部版本来保存扩展数据。
+
+
+ 要使用它,请生成一个字段,在外部、版本化结构中以 RawExtension 作为其类型,在内部结构中以 Object 作为其类型。
+
+
+ // 内部包:
+ type MyAPIObject struct {
+ runtime.TypeMeta `json:",inline"`
+ MyPlugin runtime.Object `json:"myPlugin"`
+ }
+ type PluginA struct {
+ AOption string `json:"aOption"`
+ }
+
+
+ // 外部包:
+ type MyAPIObject struct {
+ runtime.TypeMeta `json:",inline"`
+ MyPlugin runtime.RawExtension `json:"myPlugin"`
+ }
+ type PluginA struct {
+ AOption string `json:"aOption"`
+ }
+
+
+ // 在网络上,JSON 看起来像这样:
+ {
+ "kind":"MyAPIObject",
+ "apiVersion":"v1",
+ "myPlugin": {
+ "kind":"PluginA",
+ "aOption":"foo",
+ },
+ }
+
+
+ 那么会发生什么?
+ 解码首先使用 json 或 yaml 将序列化数据解组到你的外部 MyAPIObject 中。
+ 这会导致原始 JSON 被存储下来,但不会被解包。
+ 下一步是复制(使用 pkg/conversion)到内部结构中。
+ runtime 包的 DefaultScheme 安装了转换函数,它将解析存储在 RawExtension 中的 JSON,
+ 将其转换为正确的对象类型,并将其存储在 Object 中。
+ (TODO:如果对象是未知类型,将创建并存储一个 `runtime.Unknown`对象。)*
+
+
+## ControllerRevisionList {#ControllerRevisionList}
+
+ControllerRevisionList 是一个包含 ControllerRevision 对象列表的资源。
+
+
+
+
+- **apiVersion**: apps/v1
+
+
+- **kind**: ControllerRevisionList
+
+
+- **metadata** (}}">ListMeta )
+
+ 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+
+
+- **items** ([]}}">ControllerRevision ),必需
+
+ items 是 ControllerRevisions 的列表
+
+
+## 操作 {#Operations}
+
+
+
+
+### `get` 读取特定的 ControllerRevision
+
+
+#### HTTP 请求
+
+GET /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}
+
+
+#### 参数
+
+
+- **name** (**路径参数**):string,必需
+
+ ControllerRevision 的名称
+
+
+- **namespace** (**路径参数**):string,必需
+
+ }}">namespace
+
+
+- **pretty** (**查询参数**):string
+
+ }}">pretty
+
+
+#### 响应
+
+
+200 (}}">ControllerRevision ): OK
+
+401: Unauthorized
+
+
+### `list` 列出或监视 ControllerRevision 类别的对象
+
+
+#### HTTP 请求
+
+GET /apis/apps/v1/namespaces/{namespace}/controllerrevisions
+
+
+#### 参数
+
+
+- **namespace** (**路径参数**):string,必需
+
+ }}">namespace
+
+
+- **allowWatchBookmarks** (**查询参数**): boolean
+
+ }}">allowWatchBookmarks
+
+
+- **continue** (**查询参数**):string
+
+ }}">continue
+
+
+- **fieldSelector** (**查询参数**):string
+
+ }}">fieldSelector
+
+
+- **labelSelector** (**查询参数**):string
+
+ }}">labelSelector
+
+
+- **limit** (**查询参数**)): integer
+
+ }}">limit
+
+
+- **pretty** (**查询参数**):string
+
+ }}">pretty
+
+
+- **resourceVersion** (**查询参数**):string
+
+ }}">resourceVersion
+
+
+- **resourceVersionMatch** (**查询参数**):string
+
+ }}">resourceVersionMatch
+
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+
+- **watch** (**查询参数**): boolean
+
+ }}">watch
+
+
+#### 响应
+
+200 (}}">ControllerRevisionList ): OK
+
+401: Unauthorized
+
+
+### `list` 列出或监视 ControllerRevision 类别的对象
+
+
+#### HTTP 请求
+
+GET /apis/apps/v1/controllerrevisions
+
+
+#### 参数
+
+
+- **allowWatchBookmarks** (**查询参数**): boolean
+
+ }}">allowWatchBookmarks
+
+
+- **continue** (**查询参数**):string
+
+ }}">continue
+
+
+- **fieldSelector** (**查询参数**):string
+
+ }}">fieldSelector
+
+
+- **labelSelector** (**查询参数**):string
+
+ }}">labelSelector
+
+
+- **limit** (**查询参数**): integer
+
+ }}">limit
+
+
+- **pretty** (**查询参数**):string
+
+ }}">pretty
+
+
+- **resourceVersion** (**查询参数**):string
+
+ }}">resourceVersion
+
+
+- **resourceVersionMatch** (**查询参数**):string
+
+ }}">resourceVersionMatch
+
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+
+- **watch** (**查询参数**): boolean
+
+ }}">watch
+
+
+#### 响应
+
+200 (}}">ControllerRevisionList ): OK
+
+401: Unauthorized
+
+
+### `create` 创建一个 ControllerRevision
+
+
+#### HTTP 请求
+
+POST /apis/apps/v1/namespaces/{namespace}/controllerrevisions
+
+
+#### 参数
+
+
+- **namespace** (**路径参数**):string,必需
+
+ }}">namespace
+
+
+- **body**: }}">ControllerRevision ,必需
+
+
+- **dryRun** (**查询参数**):string
+
+ }}">dryRun
+
+
+- **fieldManager** (**查询参数**):string
+
+ }}">fieldManager
+
+
+- **fieldValidation** (**查询参数**):string
+
+ }}">fieldValidation
+
+
+- **pretty** (**查询参数**):string
+
+ }}">pretty
+
+
+#### 响应
+
+200 (}}">ControllerRevision ): OK
+
+201 (}}">ControllerRevision ): Created
+
+202 (}}">ControllerRevision ): Accepted
+
+401: Unauthorized
+
+
+### `update` 替换特定的 ControllerRevision
+
+
+#### HTTP 参数
+
+PUT /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}
+
+
+#### 参数
+
+
+- **name** (**路径参数**):string,必需
+
+ ControllerRevision 的名称
+
+
+- **namespace** (**路径参数**):string,必需
+
+ }}">namespace
+
+
+- **body**: }}">ControllerRevision ,必需
+
+
+- **dryRun** (**查询参数**):string
+
+ }}">dryRun
+
+
+- **fieldManager** (**查询参数**):string
+
+ }}">fieldManager
+
+
+- **fieldValidation** (**查询参数**):string
+
+ }}">fieldValidation
+
+
+- **pretty** (**查询参数**):string
+
+ }}">pretty
+
+
+
+#### 响应
+
+200 (}}">ControllerRevision ): OK
+
+201 (}}">ControllerRevision ): Created
+
+401: Unauthorized
+
+
+### `patch` 部分更新特定的 ControllerRevision
+
+
+#### HTTP 请求
+
+PATCH /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}
+
+
+#### 参数
+
+
+- **name** (**路径参数**):string,必需
+
+ ControllerRevision 的名称
+
+
+- **namespace** (**路径参数**):string,必需
+
+ }}">namespace
+
+
+- **body**: }}">Patch ,必需
+
+
+- **dryRun** (**查询参数**):string
+
+ }}">dryRun
+
+
+- **fieldManager** (**查询参数**):string
+
+ }}">fieldManager
+
+
+- **fieldValidation** (**查询参数**):string
+
+ }}">fieldValidation
+
+
+- **force** (**查询参数**): boolean
+
+ }}">force
+
+
+- **pretty** (**查询参数**):string
+
+ }}">pretty
+
+
+
+#### 响应
+
+200 (}}">ControllerRevision ): OK
+
+201 (}}">ControllerRevision ): Created
+
+401: Unauthorized
+
+
+### `delete` 删除一个 ControllerRevision
+
+
+#### HTTP 请求
+
+DELETE /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}
+
+
+#### 参数
+
+
+- **name** (**路径参数**):string,必需
+
+ ControllerRevision 的名称
+
+
+- **namespace** (**路径参数**):string,必需
+
+ }}">namespace
+
+
+- **body**: }}">DeleteOptions
+
+
+- **dryRun** (**查询参数**):string
+
+ }}">dryRun
+
+
+- **gracePeriodSeconds** (**查询参数**): integer
+
+ }}">gracePeriodSeconds
+
+
+- **pretty** (**查询参数**):string
+
+ }}">pretty
+
+
+- **propagationPolicy** (**查询参数**):string
+
+ }}">propagationPolicy
+
+
+
+#### 响应
+
+200 (}}">Status ): OK
+
+202 (}}">Status ): Accepted
+
+401: Unauthorized
+
+
+### `deletecollection` 删除 ControllerRevision 集合
+
+
+#### HTTP 请求
+
+DELETE /apis/apps/v1/namespaces/{namespace}/controllerrevisions
+
+
+#### 参数
+
+
+- **namespace** (**路径参数**):string,必需
+
+ }}">namespace
+
+
+- **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
+
+
+- **timeoutSeconds** (**查询参数**): integer
+
+ }}">timeoutSeconds
+
+
+
+#### 响应
+
+200 (}}">Status ): OK
+
+401: Unauthorized
+
diff --git a/content/zh/docs/reference/kubernetes-api/workload-resources/priority-class-v1.md b/content/zh-cn/docs/reference/kubernetes-api/workload-resources/priority-class-v1.md
similarity index 89%
rename from content/zh/docs/reference/kubernetes-api/workload-resources/priority-class-v1.md
rename to content/zh-cn/docs/reference/kubernetes-api/workload-resources/priority-class-v1.md
index 3c75e674ca..52fc887ab9 100644
--- a/content/zh/docs/reference/kubernetes-api/workload-resources/priority-class-v1.md
+++ b/content/zh-cn/docs/reference/kubernetes-api/workload-resources/priority-class-v1.md
@@ -60,14 +60,14 @@ PriorityClass 定义了从优先级类名到优先级数值的映射。
- **metadata** (}}">ObjectMeta )
标准对象的元数据。
- 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+ 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-- **value** (int32),必需
+- **value** (int32),必需
此优先级的值。这是 Pod 在其 Pod 规约中有此类名称时收到的实际优先级。
@@ -133,7 +133,7 @@ PriorityClassList 是优先级类的集合。
-->
- **metadata** (}}">ListMeta )
- 标准列表元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+ 标准列表元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-- **name** (*路径参数*): string,必需
+- **name** (**路径参数**): string,必需
PriorityClass 名称
@@ -186,7 +186,7 @@ GET /apis/scheduling.k8s.io/v1/priorityclasses/{name}
}}">pretty
-->
-- **pretty** (*查询参数*): string
+- **pretty** (**查询参数**):string
}}">pretty
@@ -227,7 +227,7 @@ GET /apis/scheduling.k8s.io/v1/priorityclasses
}}">allowWatchBookmarks
-->
-- **allowWatchBookmarks** (*查询参数*): boolean
+- **allowWatchBookmarks** (**查询参数**):boolean
}}">allowWatchBookmarks
@@ -236,7 +236,7 @@ GET /apis/scheduling.k8s.io/v1/priorityclasses
}}">continue
-->
-- **continue** (*查询参数*): string
+- **continue** (**查询参数**):string
}}">continue
@@ -245,7 +245,7 @@ GET /apis/scheduling.k8s.io/v1/priorityclasses
}}">fieldSelector
-->
-- **fieldSelector** (*查询参数*): string
+- **fieldSelector** (**查询参数**):string
}}">fieldSelector
@@ -254,7 +254,7 @@ GET /apis/scheduling.k8s.io/v1/priorityclasses
}}">labelSelector
-->
-- **labelSelector** (*查询参数*): string
+- **labelSelector** (**查询参数**):string
}}">labelSelector
@@ -263,7 +263,7 @@ GET /apis/scheduling.k8s.io/v1/priorityclasses
}}">limit
-->
-- **limit** (*查询参数*): integer
+- **limit** (**查询参数**):integer
}}">limit
@@ -272,7 +272,7 @@ GET /apis/scheduling.k8s.io/v1/priorityclasses
}}">pretty
-->
-- **pretty** (*查询参数*): string
+- **pretty** (**查询参数**):string
}}">pretty
@@ -281,7 +281,7 @@ GET /apis/scheduling.k8s.io/v1/priorityclasses
}}">resourceVersion
-->
-- **resourceVersion** (*查询参数*): string
+- **resourceVersion** (**查询参数**):string
}}">resourceVersion
@@ -290,7 +290,7 @@ GET /apis/scheduling.k8s.io/v1/priorityclasses
}}">resourceVersionMatch
-->
-- **resourceVersionMatch** (*查询参数*): string
+- **resourceVersionMatch** (**查询参数**):string
}}">resourceVersionMatch
@@ -299,7 +299,7 @@ GET /apis/scheduling.k8s.io/v1/priorityclasses
}}">timeoutSeconds
-->
-- **timeoutSeconds** (*查询参数*): integer
+- **timeoutSeconds** (**查询参数**):integer
}}">timeoutSeconds
@@ -308,7 +308,7 @@ GET /apis/scheduling.k8s.io/v1/priorityclasses
}}">watch
-->
-- **watch** (*查询参数*): boolean
+- **watch** (**查询参数**):boolean
}}">watch
@@ -354,7 +354,7 @@ POST /apis/scheduling.k8s.io/v1/priorityclasses
}}">dryRun
-->
-- **dryRun** (*查询参数*): string
+- **dryRun** (**查询参数**):string
}}">dryRun
@@ -363,7 +363,7 @@ POST /apis/scheduling.k8s.io/v1/priorityclasses
}}">fieldManager
-->
-- **fieldManager** (*查询参数*): string
+- **fieldManager** (**查询参数**):string
}}">fieldManager
@@ -372,7 +372,7 @@ POST /apis/scheduling.k8s.io/v1/priorityclasses
}}">fieldValidation
-->
-- **fieldValidation** (*查询参数*): string
+- **fieldValidation** (**查询参数**):string
}}">fieldValidation
@@ -381,7 +381,7 @@ POST /apis/scheduling.k8s.io/v1/priorityclasses
}}">pretty
-->
-- **pretty** (*查询参数*): string
+- **pretty** (**查询参数**):string
}}">pretty
@@ -430,7 +430,7 @@ PUT /apis/scheduling.k8s.io/v1/priorityclasses/{name}
name of the PriorityClass
-->
-- **name** (*路径参数*): string,必需
+- **name** (*路径参数*): string,必需
PriorityClass 名称
@@ -444,7 +444,7 @@ PUT /apis/scheduling.k8s.io/v1/priorityclasses/{name}
}}">dryRun
-->
-- **dryRun** (*查询参数*): string
+- **dryRun** (**查询参数**):string
}}">dryRun
@@ -453,7 +453,7 @@ PUT /apis/scheduling.k8s.io/v1/priorityclasses/{name}
}}">fieldManager
-->
-- **fieldManager** (*查询参数*): string
+- **fieldManager** (**查询参数**):string
}}">fieldManager
@@ -462,7 +462,7 @@ PUT /apis/scheduling.k8s.io/v1/priorityclasses/{name}
}}">fieldValidation
-->
-- **fieldValidation** (*查询参数*): string
+- **fieldValidation** (**查询参数**):string
}}">fieldValidation
@@ -471,7 +471,7 @@ PUT /apis/scheduling.k8s.io/v1/priorityclasses/{name}
}}">pretty
-->
-- **pretty** (*查询参数*): string
+- **pretty** (**查询参数**):string
}}">pretty
@@ -518,7 +518,7 @@ PATCH /apis/scheduling.k8s.io/v1/priorityclasses/{name}
name of the PriorityClass
-->
-- **name** (*路径参数*): string,必须
+- **name** (*路径参数*): string,必须
PriorityClass 名称
@@ -532,7 +532,7 @@ PATCH /apis/scheduling.k8s.io/v1/priorityclasses/{name}
}}">dryRun
-->
-- **dryRun** (*查询参数*): string
+- **dryRun** (**查询参数**):string
}}">dryRun
@@ -541,7 +541,7 @@ PATCH /apis/scheduling.k8s.io/v1/priorityclasses/{name}
}}">fieldManager
-->
-- **fieldManager** (*查询参数*): string
+- **fieldManager** (**查询参数**):string
}}">fieldManager
@@ -550,7 +550,7 @@ PATCH /apis/scheduling.k8s.io/v1/priorityclasses/{name}
}}">fieldValidation
-->
-- **fieldValidation** (*查询参数*): string
+- **fieldValidation** (**查询参数**):string
}}">fieldValidation
@@ -559,7 +559,7 @@ PATCH /apis/scheduling.k8s.io/v1/priorityclasses/{name}
}}">force
-->
-- **force** (*查询参数*): boolean
+- **force** (**查询参数**):boolean
}}">force
@@ -568,7 +568,7 @@ PATCH /apis/scheduling.k8s.io/v1/priorityclasses/{name}
}}">pretty
-->
-- **pretty** (*查询参数*): string
+- **pretty** (**查询参数**):string
}}">pretty
@@ -613,7 +613,7 @@ Parameters
name of the PriorityClass
-->
-- **name** (*路径参数*): string,必需
+- **name** (*路径参数*): string,必需
PriorityClass 名称。
@@ -627,7 +627,7 @@ Parameters
}}">dryRun
-->
-- **dryRun** (*查询参数*): string
+- **dryRun** (**查询参数**):string
}}">dryRun
@@ -636,7 +636,7 @@ Parameters
}}">gracePeriodSeconds
-->
-- **gracePeriodSeconds** (*查询参数*): integer
+- **gracePeriodSeconds** (**查询参数**):integer
}}">gracePeriodSeconds
@@ -645,7 +645,7 @@ Parameters
}}">pretty
-->
-- **pretty** (*查询参数*): string
+- **pretty** (**查询参数**):string
}}">pretty
@@ -654,7 +654,7 @@ Parameters
}}">propagationPolicy
-->
-- **propagationPolicy** (*查询参数*): string
+- **propagationPolicy** (**查询参数**):string
}}">propagationPolicy
@@ -702,7 +702,7 @@ DELETE /apis/scheduling.k8s.io/v1/priorityclasses
}}">continue
-->
-- **continue** (*查询参数*): string
+- **continue** (**查询参数**):string
}}">continue
@@ -711,7 +711,7 @@ DELETE /apis/scheduling.k8s.io/v1/priorityclasses
}}">dryRun
-->
-- **dryRun** (*查询参数*): string
+- **dryRun** (**查询参数**):string
}}">dryRun
@@ -720,7 +720,7 @@ DELETE /apis/scheduling.k8s.io/v1/priorityclasses
}}">fieldSelector
-->
-- **fieldSelector** (*查询参数*): string
+- **fieldSelector** (**查询参数**):string
}}">fieldSelector
@@ -729,7 +729,7 @@ DELETE /apis/scheduling.k8s.io/v1/priorityclasses
}}">gracePeriodSeconds
-->
-- **gracePeriodSeconds** (*查询参数*): integer
+- **gracePeriodSeconds** (**查询参数**):integer
}}">gracePeriodSeconds
@@ -738,7 +738,7 @@ DELETE /apis/scheduling.k8s.io/v1/priorityclasses
}}">labelSelector
-->
-- **labelSelector** (*查询参数*): string
+- **labelSelector** (**查询参数**):string
}}">labelSelector
@@ -747,7 +747,7 @@ DELETE /apis/scheduling.k8s.io/v1/priorityclasses
}}">limit
-->
-- **limit** (*查询参数*): integer
+- **limit** (**查询参数**):integer
}}">limit
@@ -756,7 +756,7 @@ DELETE /apis/scheduling.k8s.io/v1/priorityclasses
}}">pretty
-->
-- **pretty** (*查询参数*): string
+- **pretty** (**查询参数**):string
}}">pretty
@@ -765,7 +765,7 @@ DELETE /apis/scheduling.k8s.io/v1/priorityclasses
}}">propagationPolicy
-->
-- **propagationPolicy** (*查询参数*): string
+- **propagationPolicy** (**查询参数**):string
}}">propagationPolicy
@@ -774,7 +774,7 @@ DELETE /apis/scheduling.k8s.io/v1/priorityclasses
}}">resourceVersion
-->
-- **resourceVersion** (*查询参数*): string
+- **resourceVersion** (**查询参数**):string
}}">resourceVersion
@@ -783,7 +783,7 @@ DELETE /apis/scheduling.k8s.io/v1/priorityclasses
}}">resourceVersionMatch
-->
-- **resourceVersionMatch** (*查询参数*): string
+- **resourceVersionMatch** (**查询参数**):string
}}">resourceVersionMatch
@@ -792,7 +792,7 @@ DELETE /apis/scheduling.k8s.io/v1/priorityclasses
}}">timeoutSeconds
-->
-- **timeoutSeconds** (*查询参数*): integer
+- **timeoutSeconds** (**查询参数**):integer
}}">timeoutSeconds
@@ -808,4 +808,3 @@ DELETE /apis/scheduling.k8s.io/v1/priorityclasses
200 (}}">Status ): OK
401: Unauthorized
-
diff --git a/content/zh/docs/reference/labels-annotations-taints/_index.md b/content/zh-cn/docs/reference/labels-annotations-taints/_index.md
similarity index 97%
rename from content/zh/docs/reference/labels-annotations-taints/_index.md
rename to content/zh-cn/docs/reference/labels-annotations-taints/_index.md
index bf8e31e9a5..f44be98ad3 100644
--- a/content/zh/docs/reference/labels-annotations-taints/_index.md
+++ b/content/zh-cn/docs/reference/labels-annotations-taints/_index.md
@@ -668,6 +668,44 @@ Kubernetes uses this label to differentiate multiple Services. Used currently fo
Kubernetes 使用这个标签来区分多个服务。目前仅用于 `ELB` (弹性负载均衡器)。
+
+### kubernetes.io/service-account.name
+
+示例:`kubernetes.io/service-account.name: "sa-name"`
+
+用于:Secret
+
+这个注解记录了令牌(存储在 `kubernetes.io/service-account-token` 类型的 Secret 中)所代表的
+ServiceAccount 的{{}}。
+
+
+### kubernetes.io/service-account.uid
+
+示例:`kubernetes.io/service-account.uid: da68f9c6-9d26-11e7-b84e-002dc52800da`
+
+用于:Secret
+
+该注解记录了令牌(存储在 `kubernetes.io/service-account-token` 类型的 Secret 中)所代表的
+ServiceAccount 的{{}}。
+
- [警告] 如果要使用的 Kubernetes 版本(由 `--kubernetes-version` 标志指定)比 kubeadm CLI
版本至少高一个小版本。
@@ -180,12 +175,7 @@ Kubeadm 在启动 init 之前执行一组预检,目的是验证先决条件并
- 如果在 linux上运行:
- [错误] 如果内核早于最低要求的版本
- [错误] 如果未设置所需的 cgroups 子系统
- - 如果使用 docker:
- - [警告/错误] 如果 Docker 服务不存在、被禁用或未激活。
- - [错误] 如果 Docker 端点不存在或不起作用
- - [警告] 如果 docker 版本不在经过验证的 docker 版本列表中
- - 如果使用其他 cri 引擎:
- - [错误] 如果 crictl 套接字未应答
+- [错误] 如果 CRI 端点未应答
- `--insecure-port=0` 禁止到 API 服务器不安全的连接
- `--enable-bootstrap-token-auth=true` 启用 `BootstrapTokenAuthenticator` 身份验证模块。
- 更多细节请参见 [TLS 引导](/zh/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/)。
+ 更多细节请参见 [TLS 引导](/zh/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/)。
- `--allow-privileged` 设为 `true`(诸如 kube-proxy 这些组件有此要求)
- `--requestheader-client-ca-file` 设为 `front-proxy-ca.crt`
@@ -618,7 +608,7 @@ The static Pod manifest for the controller manager is affected by following para
- `--controllers` 为 TLS 引导程序启用所有默认控制器以及 `BootstrapSigner` 和
`TokenCleaner` 控制器。详细信息请参阅
- [TLS 引导](/zh/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/)
+ [TLS 引导](/zh/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/)
- `--use-service-account-credentials` 设为 `true`
- 使用先前步骤中生成的证书的标志:
@@ -745,18 +735,20 @@ As soon as the control plane is available, kubeadm executes following actions:
一旦控制平面可用,kubeadm 将执行以下操作:
-- 给节点打上 `node-role.kubernetes.io/master=""` 标签,标记其为控制平面
-- 给节点打上 `node-role.kubernetes.io/master:NoSchedule` 污点
+- 给节点打上 `node-role.kubernetes.io/control-plane=""` 标签,标记其为控制平面
+- 给节点打上 `node-role.kubernetes.io/master:NoSchedule` 和 `node-role.kubernetes.io/control-plane:NoSchedule` 污点
请注意:
+1. `node-role.kubernetes.io/master` 污点是已废弃的,将会在 kubeadm 1.25 版本中移除
1. 可以使用 [`kubeadm init phase mark-control-plane`](/zh/docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-mark-control-plane)
命令单独触发控制平面标记
@@ -1026,14 +1018,12 @@ cluster startup problems.
1. `kubeadm join` 预检基本上是 `kubeadm init` 预检的一个子集
-2. 从 1.9 开始,kubeadm 为 CRI 通用的功能提供了更好的支持;在这种情况下,
- Docker 特定的控制参数将跳过或替换为 crictl 中与之相似的控制参数。
+2. 从 1.24 开始,kubeadm 使用 crictl 与所有已知的 CRI 端点进行通信。
3. 从 1.9 开始,kubeadm 支持加入在 Windows 上运行的节点;在这种情况下,
将跳过 Linux 特定的控制参数。
4. 在任何情况下,用户都可以通过 `--ignore-preflight-errors` 选项跳过
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-alpha.md b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-alpha.md
similarity index 100%
rename from content/zh/docs/reference/setup-tools/kubeadm/kubeadm-alpha.md
rename to content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-alpha.md
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-certs.md b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-certs.md
similarity index 100%
rename from content/zh/docs/reference/setup-tools/kubeadm/kubeadm-certs.md
rename to content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-certs.md
diff --git a/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-config.md b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-config.md
new file mode 100644
index 0000000000..8c82949cb8
--- /dev/null
+++ b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-config.md
@@ -0,0 +1,90 @@
+---
+title: kubeadm config
+content_type: concept
+weight: 50
+---
+
+
+
+在 `kubeadm init` 执行期间,kubeadm 将 `ClusterConfiguration` 对象上传
+到你的集群的 `kube-system` 名字空间下名为 `kubeadm-config` 的 ConfigMap 对象中。
+然后在 `kubeadm join`、`kubeadm reset` 和 `kubeadm upgrade` 执行期间读取此配置。
+
+
+你可以使用 `kubeadm config print` 命令打印默认静态配置,
+kubeadm 运行 `kubeadm init` and `kubeadm join` 时将使用此配置。
+
+
+{{< note >}}
+此命令的输出旨在作为示例。你必须手动编辑此命令的输出来适配你的设置。
+删除你不确定的字段,kubeadm 将通过检查主机来尝试在运行时给它们设默认值。
+{{< /note >}}
+
+
+更多有关 `init` 和 `join` 的信息请浏览[使用带配置文件的 kubeadm init](/zh/docs/reference/setup-tools/kubeadm/kubeadm-init/#config-file)
+或[使用带配置文件的 kubeadm join](/zh/docs/reference/setup-tools/kubeadm/kubeadm-join/#config-file)。
+
+
+有关使用 kubeadm 的配置 API 的更多信息,
+请浏览[使用 kubeadm API 来自定义组件](/zh/docs/setup/production-environment/tools/kubeadm/control-plane-flags)。
+
+
+你可以使用 `kubeadm config migrate` 来转换旧配置文件,
+把其中已弃用的 API 版本更新为受支持的 API 版本。
+
+
+`kubeadm config images list` 和 `kubeadm config images pull` 可以用来列出和拉取 kubeadm 所需的镜像。
+
+
+## kubeadm config print {#cmd-config-print}
+{{< include "generated/kubeadm_config_print.md" >}}
+
+## kubeadm config print init-defaults {#cmd-config-print-init-defaults}
+{{< include "generated/kubeadm_config_print_init-defaults.md" >}}
+
+## kubeadm config print join-defaults {#cmd-config-print-join-defaults}
+{{< include "generated/kubeadm_config_print_join-defaults.md" >}}
+
+## kubeadm config migrate {#cmd-config-migrate}
+{{< include "generated/kubeadm_config_migrate.md" >}}
+
+## kubeadm config images list {#cmd-config-images-list}
+{{< include "generated/kubeadm_config_images_list.md" >}}
+
+## kubeadm config images pull {#cmd-config-images-pull}
+{{< include "generated/kubeadm_config_images_pull.md" >}}
+
+## {{% heading "whatsnext" %}}
+
+
+
+* [kubeadm upgrade](/zh/docs/reference/setup-tools/kubeadm/kubeadm-upgrade/)
+ 将 Kubernetes 集群升级到更新版本 [kubeadm upgrade]
+
+
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init-phase.md b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-init-phase.md
similarity index 100%
rename from content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init-phase.md
rename to content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-init-phase.md
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-init.md
similarity index 71%
rename from content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md
rename to content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-init.md
index 6914bdee27..2c37c25435 100644
--- a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-init.md
+++ b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-init.md
@@ -102,7 +102,7 @@ following steps:
7. 为了使得节点能够遵照[启动引导令牌](/zh/docs/reference/access-authn-authz/bootstrap-tokens/)
- 和 [TLS 启动引导](/zh/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/)
+ 和 [TLS 启动引导](/zh/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/)
这两份文档中描述的机制加入到集群中,kubeadm 会执行所有的必要配置:
- 创建一个 ConfigMap 提供添加集群节点所需的信息,并为该 ConfigMap 设置相关的 RBAC 访问规则。
@@ -207,6 +207,13 @@ What this example would do is write the manifest files for the control plane and
这允许你修改文件,然后使用 `--skip-phases` 跳过这些阶段。
通过调用最后一个命令,你将使用自定义清单文件创建一个控制平面节点。
+{{< feature-state for_k8s_version="v1.22" state="beta" >}}
+
+
+或者,你可以使用 `InitConfiguration` 下的 `skipPhases` 字段。
+
@@ -239,8 +246,8 @@ The default configuration can be printed out using the
If your configuration is not using the latest version it is **recommended** that you migrate using
the [kubeadm config migrate](/docs/reference/setup-tools/kubeadm/kubeadm-config/) command.
-For more information on the fields and usage of the configuration you can navigate to our API reference
-page and pick a version from [the list](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm#section-directories).
+For more information on the fields and usage of the configuration you can navigate to our
+[API reference page](/docs/reference/config-api/kubeadm-config.v1beta3/).
-->
可以使用 [kubeadm config print](/zh/docs/reference/setup-tools/kubeadm/kubeadm-config/)
命令打印出默认配置。
@@ -249,10 +256,119 @@ page and pick a version from [the list](https://pkg.go.dev/k8s.io/kubernetes/cmd
**推荐**使用 [kubeadm config migrate](/zh/docs/reference/setup-tools/kubeadm/kubeadm-config/)
命令进行迁移。
-有关配置的字段和用法的更多信息,
-你可以访问 API 参考页面并从
-[列表](https://pkg.go.dev/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm#section-directories)
-中选择一个版本。
+关于配置的字段和用法的更多信息,你可以访问 [API 参考页面](/zh/docs/reference/config-api/kubeadm-config.v1beta3/)。
+
+
+### 使用 kubeadm init 时设置特性门控 {#feature-gates}
+
+
+Kubeadm 支持一组独有的特性门控,只能在 `kubeadm init` 创建集群期间使用。
+这些特性可以控制集群的行为。特性门控会在毕业到 GA 后被移除。
+
+
+你可以使用 `--feature-gates` 标志来为 `kubeadm init` 设置特性门控,
+或者你可以在用 `--config` 传递[配置文件](/zh/docs/reference/config-api/kubeadm-config.v1beta3/#kubeadm-k8s-io-v1beta3-ClusterConfiguration)
+时添加条目到 `featureGates` 字段中去。
+
+
+直接传递 [Kubernetes 核心组件的特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates)给 kubeadm 是不支持的。
+相反,可以通过[使用 kubeadm API 的自定义组件](/zh/docs/setup/production-environment/tools/kubeadm/control-plane-flags/)来传递。
+
+
+特性门控的列表:
+
+{{< table caption="kubeadm feature gates" >}}
+特性 | 默认值 | Alpha | Beta
+:-------|:--------|:------|:-----
+`PublicKeysECDSA` | `false` | 1.19 | -
+`RootlessControlPlane` | `false` | 1.22 | -
+`UnversionedKubeletConfigMap` | `true` | 1.22 | 1.23
+{{< /table >}}
+
+
+{{< note >}}
+一旦特性门控变成了 GA,那它将会从这个列表中移除,因为它的值会被默认锁定为 `true` 。
+{{< /note >}}
+
+
+特性门控的描述:
+
+
+`PublicKeysECDSA`
+: 可用于创建集群时使用 ECDSA 证书而不是默认 RSA 算法。
+支持用 `kubeadm certs renew` 更新现有 ECDSA 证书,
+但你不能在集群运行期间或升级期间切换 RSA 和 ECDSA 算法。
+
+
+`RootlessControlPlane`
+: 设置此标志来配置 kubeadm 所部署的控制平面组件中的静态 Pod 容器
+`kube-apiserver`、`kube-controller-manager`、`kube-scheduler` 和 `etcd` 以非 root 用户身份运行。
+如果未设置该标志,则这些组件以 root 身份运行。
+你可以在升级到更新版本的 Kubernetes 之前更改此特性门控的值。
+
+
+`UnversionedKubeletConfigMap`
+: 此标志控制 kubeadm 存储 kubelet 配置数据的 {{}} 的名称。
+在未指定此标志或设置为 `true` 的情况下,此 ConfigMap 被命名为 `kubelet-config`。
+如果将此标志设置为 `false`,则此 ConfigMap 的名称会包括 Kubernetes 的主要版本和次要版本(例如:`kubelet-config-{{< skew currentVersion >}}`)。
+Kubeadm 会确保用于读写 ConfigMap 的 RBAC 规则适合你设置的值。
+当 kubeadm 写入此 ConfigMap 时(在 `kubeadm init` 或 `kubeadm upgrade apply` 期间),
+kubeadm 根据 `UnversionedKubeletConfigMap` 的设置值来执行操作。
+当读取此 ConfigMap 时(在 `kubeadm join`、`kubeadm reset`、`kubeadm upgrade ...` 期间),
+kubeadm 尝试首先使用无版本(后缀)的 ConfigMap 名称;
+如果不成功,kubeadm 将回退到使用该 ConfigMap 的旧(带版本号的)名称。
+
+
+{{< note >}}
+设置 `UnversionedKubeletConfigMap` 为 `false` 是被支持的特性,但该特性**已被弃用**。
+{{< /note >}}
+
+
+
+### 在没有互联网连接的情况下运行 kubeadm {#without-internet-connection}
+
+
+要在没有互联网连接的情况下运行 kubeadm,你必须提前拉取所需的控制平面镜像。
+
+
+你可以使用 `kubeadm config images` 子命令列出并拉取镜像:
+
+```shell
+kubeadm config images list
+kubeadm config images pull
+```
+
+
+你可以通过 `--config` 把 [kubeadm 配置文件](#config-file) 传递给上述命令来控制 `kubernetesVersion` 和 `imageRepository` 字段。
+
+
+kubeadm 需要的所有默认 `k8s.gcr.io` 镜像都支持多种硬件体系结构。
+
@@ -306,23 +453,44 @@ You can override this behavior by using [kubeadm with a configuration file](#con
允许的自定义功能有:
+* 提供影响镜像版本的 `kubernetesVersion`。
* 使用其他的 `imageRepository` 来代替 `k8s.gcr.io`。
-* 将 `useHyperKubeImage` 设置为 `true`,使用 HyperKube 镜像。
-* 为 etcd 或 DNS 附件提供特定的 `imageRepository` 和 `imageTag`。
+* 为 etcd 或 CoreDNS 提供特定的 `imageRepository` 和 `imageTag`。
-
-请注意配置文件中的配置项 `kubernetesVersion` 或者命令行参数 `--kubernetes-version`
-会影响到镜像的版本。
+由于向后兼容的原因,`imageRepository` 可能会有所不同。
+例如,某镜像的子路径可能是 `k8s.gcr.io/subpath/image`,
+但使用自定义仓库时默认为 `my.customrepository.io/image`。
+
+
+确保将镜像推送到 kubeadm 可以使用的自定义仓库的路径中,你必须:
+
+
+* 使用 `kubeadm config images {list|pull}` 从 `k8s.gcr.io` 的默认路径中拉取镜像。
+* 将镜像推送到 `kubeadm config images list --config=config.yaml` 的路径,
+其中 `config.yaml` 包含自定义的 `imageRepository` 和/或用于 etcd 和 CoreDNS 的 `imageTag`。
+* 将相同的 `config.yaml` 传递给 `kubeadm init`。
+
-### 在没有互联网连接的情况下运行 kubeadm
-
-
-要在没有互联网连接的情况下运行 kubeadm,你必须提前拉取所需的控制平面镜像。
-
-
-你可以使用 `kubeadm config images` 子命令列出并拉取镜像:
-
-```shell
-kubeadm config images list
-kubeadm config images pull
-```
-
-
-kubeadm 需要的所有镜像,例如 `k8s.gcr.io/kube-*`、`k8s.gcr.io/etcd` 和 `k8s.gcr.io/pause`
-都支持多种架构。
-
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-join-phase.md b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-join-phase.md
similarity index 100%
rename from content/zh/docs/reference/setup-tools/kubeadm/kubeadm-join-phase.md
rename to content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-join-phase.md
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-join.md b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-join.md
similarity index 76%
rename from content/zh/docs/reference/setup-tools/kubeadm/kubeadm-join.md
rename to content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-join.md
index 9b0fc237d9..d14cb9d5f8 100644
--- a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-join.md
+++ b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-join.md
@@ -1,12 +1,17 @@
---
+title: kubeadm join
+content_type: concept
+weight: 30
+---
+
+
### join 工作流 {#join-workflow}
-
-`kubeadm join` 初始化 Kubernetes 工作节点并将其加入集群。
-该操作过程包含下面几个步骤:
+`kubeadm join` 初始化 Kubernetes 工作节点或控制平面节点并将其添加到集群中。
+对于工作节点,该操作包括以下步骤:
2. 一旦知道集群信息,kubelet 就可以开始 TLS 引导过程。
-
+
TLS 引导程序使用共享令牌与 Kubernetes API 服务器进行临时的身份验证,以提交证书签名请求 (CSR);
默认情况下,控制平面自动对该 CSR 请求进行签名。
-
3. 最后,kubeadm 配置本地 kubelet 使用分配给节点的确定标识连接到 API 服务器。
-
### 使用 kubeadm 的 join phase 命令 {#join-phases}
-
Kubeadm 允许你使用 `kubeadm join phase` 分阶段将节点加入集群。
-
-要查看阶段和子阶段的有序列表,可以调用 `kubeadm join --help`。
+要查看阶段和子阶段的有序列表,可以调用 `kubeadm join --help`。
该列表将位于帮助屏幕的顶部,每个阶段旁边都有一个描述。
注意,通过调用 `kubeadm join`,所有阶段和子阶段都将按照此确切顺序执行。
-
有些阶段具有唯一的标志,因此,如果要查看可用选项列表,请添加 `--help`,例如:
@@ -104,13 +109,13 @@ Some phases have unique flags, so if you want to have a look at the list of avai
kubeadm join phase kubelet-start --help
```
-
-类似于 [kubeadm init phase](/zh/docs/reference/setup-tools/kubeadm/kubeadm-init/#init-phases)命令,
+类似于 [kubeadm init phase](/zh/docs/reference/setup-tools/kubeadm/kubeadm-init/#init-phases) 命令,
`kubeadm join phase` 允许你使用 `--skip-phases` 标志跳过阶段列表。
例如:
@@ -129,9 +134,9 @@ Alternatively, you can use the `skipPhases` field in `JoinConfiguration`.
-### 发现要信任的集群 CA
+### 发现要信任的集群 CA {#discovering-what-cluster-ca-to-trust}
-
-#### 带 CA 锁定模式的基于令牌的发现
+#### 带 CA 锁定模式的基于令牌的发现 {#token-based-discovery-with-ca-pinning}
-
-这是 Kubernetes 1.8 及以上版本中的默认模式。
-在这种模式下,kubeadm 下载集群配置(包括根CA)并使用令牌验证它,
+这是 kubeadm 的默认模式。
+在这种模式下,kubeadm 下载集群配置(包括根 CA)并使用令牌验证它,
并且会验证根 CA 的公钥与所提供的哈希是否匹配,
以及 API 服务器证书在根 CA 下是否有效。
@@ -162,7 +167,7 @@ The CA key hash has the format `sha256:`. By default, the hash
CA 键哈希格式为 `sha256:`。
默认情况下,在 `kubeadm init` 最后打印的 `kubeadm join` 命令
或者 `kubeadm token create --print-join-command` 的输出信息中返回哈希值。
-它使用标准格式 (请参考 [RFC7469](https://tools.ietf.org/html/rfc7469#section-2.4))
+它使用标准格式(请参考 [RFC7469](https://tools.ietf.org/html/rfc7469#section-2.4))
并且也能通过第三方工具或者制备系统进行计算。
例如,使用 OpenSSL CLI:
@@ -171,7 +176,7 @@ openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outfor
```
**`kubeadm join` 命令示例**
@@ -193,7 +198,7 @@ For control-plane nodes:
kubeadm join --discovery-token abcdef.1234567890abcdef --discovery-token-ca-cert-hash sha256:1234..cdef --control-plane 1.2.3.4:6443
```
-
@@ -204,52 +209,52 @@ if the `kubeadm init` command was called with `--upload-certs`.
**优势:**
-- 允许引导节点安全地发现主节点的信任根,即使其他工作节点或网络受到损害。
+- 允许引导节点安全地发现控制平面节点的信任根,即使其他工作节点或网络受到损害。
- 方便手动执行,因为所需的所有信息都可放到一个 `kubeadm join` 命令中。
-
**劣势:**
-- CA 哈希通常在主节点被提供之前是不知道的,这使得构建使用 kubeadm 的自动化配置工具更加困难。
- 通过预先生成CA,你可以解除这个限制。
+- CA 哈希通常在控制平面节点被提供之前是不知道的,这使得构建使用 kubeadm 的自动化配置工具更加困难。
+ 通过预先生成 CA,你可以解除这个限制。
-
-#### 无 CA 锁定模式的基于令牌的发现
+#### 无 CA 锁定模式的基于令牌的发现 {#token-based-discovery-without-ca-pinning}
-
-_这是 Kubernetes 1.7 和早期版本_中的默认设置;使用时要注意一些重要的补充说明。
-此模式仅依赖于对称令牌来签名(HMAC-SHA256)发现信息,这些发现信息为主节点建立信任根。
-在 Kubernetes 1.8 及以上版本中仍然可以使用 `--discovery-token-unsafe-skip-ca-verification`
-参数,但是如果可能的话,你应该考虑使用一种其他模式。
+此模式仅依靠对称令牌来签署 (HMAC-SHA256) 为控制平面建立信任根的发现信息。
+要使用该模式,加入节点必须使用
+`--discovery-token-unsafe-skip-ca-verification`
+跳过 CA 公钥的哈希验证。
+如果可以,你应该考虑使用其他模式。
**`kubeadm join` 命令示例**
@@ -262,7 +267,7 @@ kubeadm join --token abcdef.1234567890abcdef --discovery-token-unsafe-skip-ca-ve
- Still protects against many network-level attacks.
-- The token can be generated ahead of time and shared with the master and
+- The token can be generated ahead of time and shared with the control-plane node and
worker nodes, which can then bootstrap in parallel without coordination. This
allows it to be used in many provisioning scenarios.
-->
@@ -271,7 +276,7 @@ kubeadm join --token abcdef.1234567890abcdef --discovery-token-unsafe-skip-ca-ve
- 仍然可以防止许多网络级攻击。
-- 可以提前生成令牌并与主节点和工作节点共享,这样主节点和工作节点就可以并行引导而无需协调。
+- 可以提前生成令牌并与控制平面节点和工作节点共享,这样控制平面节点和工作节点就可以并行引导而无需协调。
这允许它在许多配置场景中使用。
**劣势**
- 如果攻击者能够通过某些漏洞窃取引导令牌,那么他们可以使用该令牌(连同网络级访问)
- 为其它处于引导过程中的节点提供假冒的主节点。
+ 为其它处于引导过程中的节点提供假冒的控制平面节点。
在你的环境中,这可能是一个适当的折衷方法,也可能不是。
-#### 基于 HTTPS 或文件发现
+#### 基于 HTTPS 或文件发现 {#file-or-https-based-discovery}
-
-这种方案提供了一种带外方式在主节点和引导节点之间建立信任根。
+这种方案提供了一种带外方式在控制平面节点和引导节点之间建立信任根。
如果使用 kubeadm 构建自动配置,请考虑使用此模式。
发现文件的格式为常规的 Kubernetes
[kubeconfig](/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) 文件。
@@ -314,42 +319,47 @@ In case the discovery file does not contain credentials, the TLS discovery token
-->
**`kubeadm join` 命令示例:**
-- `kubeadm join --discovery-file path/to/file.conf` (本地文件)
+
+- `kubeadm join --discovery-file path/to/file.conf`(本地文件)
+
+- `kubeadm join --discovery-file https://url/file.conf`(远程 HTTPS URL)
**优势:**
-- 允许引导节点安全地发现主节点的信任根,即使网络或其他工作节点受到损害。
+- 允许引导节点安全地发现控制平面节点的信任根,即使网络或其他工作节点受到损害。
**劣势:**
-- 要求你有某种方法将发现信息从主节点传送到引导节点。
- 例如,这可以通过云提供商或驱动工具实现。
- 该文件中的信息不是加密的,而是需要 HTTPS 或等效文件来保证其完整性。
+- 要求你有某种方法将发现信息从控制平面节点传送到引导节点。
+ 如果发现文件包含凭据,你必须对其保密并通过安全通道进行传输。
+ 这可能通过你的云提供商或供应工具来实现。
### 确保你的安装更加安全 {#securing-more}
-
@@ -359,9 +369,9 @@ Kubeadm 的默认值可能不适用于所有人。
-#### 关闭节点客户端证书的自动批准
+#### 关闭节点客户端证书的自动批准 {#turning-off-auto-approval-of-node-client-certificates}
-
-这迫使工作流只有在运行了 kubectl 证书批准后,kubeadm join 才能成功。
+这迫使工作流只有在运行了 `kubectl certificate approve` 后,`kubeadm join` 才能成功。
-#### 关闭对集群信息 ConfigMap 的公开访问
+#### 关闭对集群信息 ConfigMap 的公开访问 {#turning-off-public-access-to-the-cluster-info-configmap}
-
-为了实现使用令牌作为唯一验证信息的加入工作流,默认情况下会公开带有验证主节点标识
-所需数据的 ConfigMap。
+为了实现使用令牌作为唯一验证信息的加入工作流,默认情况下会公开带有验证控制平面节点标识所需数据的 ConfigMap。
虽然此 ConfigMap 中没有私有数据,但一些用户可能希望无论如何都关闭它。
这样做需要禁用 `kubeadm join` 工作流的 `--discovery-token` 参数。
以下是实现步骤:
-
* 从 API 服务器获取 `cluster-info` 文件:
@@ -488,16 +497,18 @@ users: []
-这些命令应该在执行 `kubeadm init` 之后、在`kubeadm join` 之前执行。
+这些命令应该在执行 `kubeadm init` 之后、在 `kubeadm join` 之前执行。
-
-### 使用带有配置文件的 kubeadm join
+### 使用带有配置文件的 kubeadm join {#config-file}
{{< caution >}}
-
-配置文件目前是 alpha 功能,在将来的版本中可能会变动。
+
+配置文件目前是 beta 功能,在将来的版本中可能会变动。
{{< /caution >}}
-可以用配置文件替代命令行参数的方法配置 `kubeadm join`,一些高级功能也只有在使用配置文件时才可选用。
+可以用配置文件替代命令行参数的方法配置 `kubeadm join`,一些进阶功能也只有在使用配置文件时才可选用。
该文件通过 `--config` 参数来传递,并且文件中必须包含 `JoinConfiguration` 结构。
在某些情况下,不允许将 `--config` 与其他标志混合使用。
-
* [kubeadm init](/zh/docs/reference/setup-tools/kubeadm/kubeadm-init/)
- 初始化 Kubernetes 主节点
+ 初始化 Kubernetes 控制平面节点
* [kubeadm token](/zh/docs/reference/setup-tools/kubeadm/kubeadm-token/)
管理 `kubeadm join` 的令牌
* [kubeadm reset](/zh/docs/reference/setup-tools/kubeadm/kubeadm-reset/)
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-kubeconfig.md b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-kubeconfig.md
similarity index 100%
rename from content/zh/docs/reference/setup-tools/kubeadm/kubeadm-kubeconfig.md
rename to content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-kubeconfig.md
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-reset-phase.md b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-reset-phase.md
similarity index 100%
rename from content/zh/docs/reference/setup-tools/kubeadm/kubeadm-reset-phase.md
rename to content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-reset-phase.md
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-reset.md b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-reset.md
similarity index 100%
rename from content/zh/docs/reference/setup-tools/kubeadm/kubeadm-reset.md
rename to content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-reset.md
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-token.md b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-token.md
similarity index 100%
rename from content/zh/docs/reference/setup-tools/kubeadm/kubeadm-token.md
rename to content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-token.md
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-upgrade-phase.md b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-upgrade-phase.md
similarity index 100%
rename from content/zh/docs/reference/setup-tools/kubeadm/kubeadm-upgrade-phase.md
rename to content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-upgrade-phase.md
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-upgrade.md b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-upgrade.md
similarity index 100%
rename from content/zh/docs/reference/setup-tools/kubeadm/kubeadm-upgrade.md
rename to content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-upgrade.md
diff --git a/content/zh/docs/reference/setup-tools/kubeadm/kubeadm-version.md b/content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-version.md
similarity index 100%
rename from content/zh/docs/reference/setup-tools/kubeadm/kubeadm-version.md
rename to content/zh-cn/docs/reference/setup-tools/kubeadm/kubeadm-version.md
diff --git a/content/zh/docs/reference/tools/_index.md b/content/zh-cn/docs/reference/tools/_index.md
similarity index 100%
rename from content/zh/docs/reference/tools/_index.md
rename to content/zh-cn/docs/reference/tools/_index.md
diff --git a/content/zh/docs/reference/tools/map-crictl-dockercli.md b/content/zh-cn/docs/reference/tools/map-crictl-dockercli.md
similarity index 100%
rename from content/zh/docs/reference/tools/map-crictl-dockercli.md
rename to content/zh-cn/docs/reference/tools/map-crictl-dockercli.md
diff --git a/content/zh/docs/reference/using-api/_index.md b/content/zh-cn/docs/reference/using-api/_index.md
similarity index 100%
rename from content/zh/docs/reference/using-api/_index.md
rename to content/zh-cn/docs/reference/using-api/_index.md
diff --git a/content/zh/docs/reference/using-api/api-concepts.md b/content/zh-cn/docs/reference/using-api/api-concepts.md
similarity index 99%
rename from content/zh/docs/reference/using-api/api-concepts.md
rename to content/zh-cn/docs/reference/using-api/api-concepts.md
index 729eefae64..4207a1624f 100644
--- a/content/zh/docs/reference/using-api/api-concepts.md
+++ b/content/zh-cn/docs/reference/using-api/api-concepts.md
@@ -1347,7 +1347,7 @@ This table explains the behavior of **list** requests with various combinations
| `resourceVersionMatch=NotOlderThan` | _limit unset_ | Invalid | Any | Not older than |
| `resourceVersionMatch=NotOlderThan` | limit=\, _continue unset_ | Invalid | Any | Not older than |
-{{< /table >}}
+{{* /table */>}}
-->
{{< table caption="list 操作的 resourceVersionMatch 与分页参数" >}}
diff --git a/content/zh/docs/reference/using-api/client-libraries.md b/content/zh-cn/docs/reference/using-api/client-libraries.md
similarity index 100%
rename from content/zh/docs/reference/using-api/client-libraries.md
rename to content/zh-cn/docs/reference/using-api/client-libraries.md
diff --git a/content/zh/docs/reference/using-api/deprecation-guide.md b/content/zh-cn/docs/reference/using-api/deprecation-guide.md
similarity index 97%
rename from content/zh/docs/reference/using-api/deprecation-guide.md
rename to content/zh-cn/docs/reference/using-api/deprecation-guide.md
index f088f3453a..e06737c7ca 100644
--- a/content/zh/docs/reference/using-api/deprecation-guide.md
+++ b/content/zh-cn/docs/reference/using-api/deprecation-guide.md
@@ -221,14 +221,17 @@ The **policy/v1beta1** API version of PodDisruptionBudget will no longer be serv
**policy/v1beta1** API 版本中的 PodSecurityPolicy 将不会在 v1.25 中提供,
并且 PodSecurityPolicy 准入控制器也会被删除。
-PodSecurityPolicy 的替换方案仍在讨论过程中,不过当前的用法可以迁移到
-[第三方准入性质的 Webhook](/zh/docs/reference/access-authn-authz/extensible-admission-controllers/)。
+迁移到 [Pod 安全准入](/zh/docs/concepts/security/pod-security-admission/)或[第三方准入 webhook](/zh/docs/reference/access-authn-authz/extensible-admission-controllers/)。
+有关迁移指南,请参阅[从 PodSecurityPolicy 迁移到内置 PodSecurity 准入控制器](/zh/docs/tasks/configure-pod-container/migrate-from-psp/)。
+有关弃用的更多信息,请参阅 [PodSecurityPolicy 弃用:过去、现在和未来](/zh/blog/2021/04/06/podsecuritypolicy-deprecation-past-present-and-future/)。
#### RuntimeClass {#runtimeclass-v125}
diff --git a/content/zh/docs/reference/using-api/deprecation-policy.md b/content/zh-cn/docs/reference/using-api/deprecation-policy.md
similarity index 100%
rename from content/zh/docs/reference/using-api/deprecation-policy.md
rename to content/zh-cn/docs/reference/using-api/deprecation-policy.md
diff --git a/content/zh/docs/reference/using-api/health-checks.md b/content/zh-cn/docs/reference/using-api/health-checks.md
similarity index 100%
rename from content/zh/docs/reference/using-api/health-checks.md
rename to content/zh-cn/docs/reference/using-api/health-checks.md
diff --git a/content/zh/docs/reference/using-api/server-side-apply.md b/content/zh-cn/docs/reference/using-api/server-side-apply.md
similarity index 99%
rename from content/zh/docs/reference/using-api/server-side-apply.md
rename to content/zh-cn/docs/reference/using-api/server-side-apply.md
index 762b038ef5..dbd455f276 100644
--- a/content/zh/docs/reference/using-api/server-side-apply.md
+++ b/content/zh-cn/docs/reference/using-api/server-side-apply.md
@@ -220,7 +220,8 @@ this occurs, the applier has 3 options to resolve the conflicts:
* **覆盖前值,成为唯一的管理器:** 如果打算覆盖该值(或应用者是一个自动化部件,比如控制器),
- 应用者应该设置查询参数 `force` 为 true,然后再发送一次请求。
+ 应用者应该设置查询参数 `force` 为 true(在 kubectl 中,可以通过在
+ apply 命令中使用 `--force-conflicts` 标志来完成),然后再发送一次请求。
这将强制操作成功,改变字段的值,从所有其他管理器的 managedFields 条目中删除指定字段。
* **不覆盖前值,放弃管理权:** 如果应用者不再关注该字段的值,
diff --git a/content/zh/docs/setup/_index.md b/content/zh-cn/docs/setup/_index.md
similarity index 100%
rename from content/zh/docs/setup/_index.md
rename to content/zh-cn/docs/setup/_index.md
diff --git a/content/zh/docs/setup/best-practices/_index.md b/content/zh-cn/docs/setup/best-practices/_index.md
similarity index 100%
rename from content/zh/docs/setup/best-practices/_index.md
rename to content/zh-cn/docs/setup/best-practices/_index.md
diff --git a/content/zh/docs/setup/best-practices/certificates.md b/content/zh-cn/docs/setup/best-practices/certificates.md
similarity index 72%
rename from content/zh/docs/setup/best-practices/certificates.md
rename to content/zh-cn/docs/setup/best-practices/certificates.md
index bb96a887f6..7391e49ace 100644
--- a/content/zh/docs/setup/best-practices/certificates.md
+++ b/content/zh-cn/docs/setup/best-practices/certificates.md
@@ -1,7 +1,5 @@
---
title: PKI 证书和要求
-reviewers:
-- sig-cluster-lifecycle
content_type: concept
weight: 40
---
@@ -18,7 +16,7 @@ weight: 40
Kubernetes 需要 PKI 证书才能进行基于 TLS 的身份验证。如果你是使用
@@ -33,13 +31,13 @@ Kubernetes 需要 PKI 证书才能进行基于 TLS 的身份验证。如果你
Kubernetes requires PKI for the following operations:
-->
-## 集群是如何使用证书的
+## 集群是如何使用证书的 {#how-certificates-are-used-by-your-cluster}
Kubernetes 需要 PKI 才能执行以下操作:
* Kubelet 的客户端证书,用于 API 服务器身份验证
-* Kubelet [服务端证书](/zh/docs/reference/command-line-tools-reference/kubelet-tls-bootstrapping/#client-and-serving-certificates),
+* Kubelet [服务端证书](/zh/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/#client-and-serving-certificates),
用于 API 服务器与 Kubelet 的会话
* API 服务器端点的证书
* 集群管理员的客户端证书,用于 API 服务器身份认证
@@ -61,7 +59,7 @@ Kubernetes 需要 PKI 才能执行以下操作:
* [前端代理](/zh/docs/tasks/extend-kubernetes/configure-aggregation-layer/) 的客户端及服务端证书
{{< note >}}
只有当你运行 kube-proxy 并要支持
@@ -79,7 +77,7 @@ etcd 还实现了双向 TLS 来对客户端和对其他对等节点进行身份
If you install Kubernetes with kubeadm, most certificates are stored in `/etc/kubernetes/pki`. All paths in this documentation are relative to that directory, with the exception of user account certificates which kubeadm places in `/etc/kubernetes`.
-->
-## 证书存放的位置
+## 证书存放的位置 {#where-certificates-are-stored}
假如通过 kubeadm 安装 Kubernetes,大多数证书都存储在 `/etc/kubernetes/pki`。
本文档中的所有路径都是相对于该目录的,但用户账户证书除外,kubeadm 将其放在 `/etc/kubernetes` 中。
@@ -90,7 +88,7 @@ If you install Kubernetes with kubeadm, most certificates are stored in `/etc/ku
If you don't want kubeadm to generate the required certificates, you can create them using a single root CA or by providing all certificates. See [Certificates](/docs/tasks/administer-cluster/certificates/) for details on creating your own certificate authority.
See [Certificate Management with kubeadm](/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/) for more on managing certificates.
-->
-## 手动配置证书
+## 手动配置证书 {#configure-certificates-manually}
如果你不想通过 kubeadm 生成这些必需的证书,你可以使用一个单一的根 CA
来创建这些证书或者直接提供所有证书。
@@ -102,14 +100,14 @@ See [Certificate Management with kubeadm](/docs/tasks/administer-cluster/kubeadm
You can create a single root CA, controlled by an administrator. This root CA can then create multiple intermediate CAs, and delegate all further creation to Kubernetes itself.
-->
-### 单根 CA
+### 单根 CA {#single-root-ca}
你可以创建一个单根 CA,由管理员控制器它。该根 CA 可以创建多个中间 CA,并将所有进一步的创建委托给 Kubernetes。
-### 所有的证书
+### 所有的证书 {#all-certificates}
如果你不想将 CA 的私钥拷贝至你的集群中,你也可以自己生成全部的证书。
需要这些证书:
-| 默认 CN | 父级 CA | O (位于 Subject 中) | 类型 | 主机 (SAN) |
+
+| 默认 CN | 父级 CA | O (位于 Subject 中) | 类型 | 主机 (SAN) |
|-------------------------------|---------------------------|----------------|----------------------------------------|---------------------------------------------|
| kube-etcd | etcd-ca | | server, client | ``, ``, `localhost`, `127.0.0.1` |
| kube-etcd-peer | etcd-ca | | server, client | ``, ``, `localhost`, `127.0.0.1` |
@@ -165,7 +174,8 @@ Required certificates:
| front-proxy-client | kubernetes-front-proxy-ca | | client | |
-### 证书路径
+### 证书路径 {#certificate-paths}
-证书应放置在建议的路径中(以便 [kubeadm](/zh/docs/reference/setup-tools/kubeadm/)使用)。无论使用什么位置,都应使用给定的参数指定路径。
+证书应放置在建议的路径中(以便 [kubeadm](/zh/docs/reference/setup-tools/kubeadm/)
+使用)。无论使用什么位置,都应使用给定的参数指定路径。
+
| 默认 CN | 建议的密钥路径 | 建议的证书路径 | 命令 | 密钥参数 | 证书参数 |
|------------------------------|------------------------------|-----------------------------|----------------|------------------------------|-------------------------------------------|
| etcd-ca | etcd/ca.key | etcd/ca.crt | kube-apiserver | | --etcd-cafile |
@@ -241,6 +271,12 @@ Same considerations apply for the service account key pair:
-->
注意事项同样适用于服务帐户密钥对:
+
| 私钥路径 | 公钥路径 | 命令 | 参数 |
|------------------------------|-----------------------------|-------------------------|--------------------------------------|
| sa.key | | kube-controller-manager | --service-account-private-key-file |
@@ -282,10 +318,18 @@ The following example illustrates the file paths [from the previous tables](/doc
You must manually configure these administrator account and service accounts:
-->
-## 为用户帐户配置证书
+## 为用户帐户配置证书 {#configure-certificates-for-user-accounts}
你必须手动配置以下管理员帐户和服务帐户:
+
| 文件名 | 凭据名称 | 默认 CN | O (位于 Subject 中) |
|-------------------------|----------------------------|--------------------------------|---------------------|
| admin.conf | default-admin | kubernetes-admin | system:masters |
diff --git a/content/zh/docs/setup/best-practices/cluster-large.md b/content/zh-cn/docs/setup/best-practices/cluster-large.md
similarity index 100%
rename from content/zh/docs/setup/best-practices/cluster-large.md
rename to content/zh-cn/docs/setup/best-practices/cluster-large.md
diff --git a/content/zh/docs/setup/best-practices/enforcing-pod-security-standards.md b/content/zh-cn/docs/setup/best-practices/enforcing-pod-security-standards.md
similarity index 100%
rename from content/zh/docs/setup/best-practices/enforcing-pod-security-standards.md
rename to content/zh-cn/docs/setup/best-practices/enforcing-pod-security-standards.md
diff --git a/content/zh/docs/setup/best-practices/multiple-zones.md b/content/zh-cn/docs/setup/best-practices/multiple-zones.md
similarity index 100%
rename from content/zh/docs/setup/best-practices/multiple-zones.md
rename to content/zh-cn/docs/setup/best-practices/multiple-zones.md
diff --git a/content/zh/docs/setup/best-practices/node-conformance.md b/content/zh-cn/docs/setup/best-practices/node-conformance.md
similarity index 60%
rename from content/zh/docs/setup/best-practices/node-conformance.md
rename to content/zh-cn/docs/setup/best-practices/node-conformance.md
index 71e97ac73a..9fe0ce0d90 100644
--- a/content/zh/docs/setup/best-practices/node-conformance.md
+++ b/content/zh-cn/docs/setup/best-practices/node-conformance.md
@@ -1,16 +1,12 @@
---
-reviewers:
-- Random-Liu
title: 校验节点设置
weight: 30
---
{{< toc >}}
@@ -18,13 +14,16 @@ weight: 30
-## 节点一致性测试
+## 节点一致性测试 {#node-conformance-test}
-*节点一致性测试* 是一个容器化的测试框架,提供了针对节点的系统验证和功能测试。
+**节点一致性测试** 是一个容器化的测试框架,提供了针对节点的系统验证和功能测试。
+测试验证节点是否满足 Kubernetes 的最低要求;通过测试的节点有资格加入 Kubernetes 集群。
-## 节点的前提条件
+## 节点的前提条件 {#node-prerequisite}
要运行节点一致性测试,节点必须满足与标准 Kubernetes 节点相同的前提条件。节点至少应安装以下守护程序:
@@ -51,7 +52,7 @@ To run node conformance test, a node must satisfy the same prerequisites as asta
-## 运行节点一致性测试
+## 运行节点一致性测试 {#running-node-conformance-test}
-1. 得出 kubelet 的 `--kubeconfig` 的值;例如:`--kubeconfig=/var/lib/kubelet/config.yaml`.
- 由于测试框架启动了本地控制平面来测试 kubelet, 因此使用 `http://localhost:8080`
+1. 得出 kubelet 的 `--kubeconfig` 的值;例如:`--kubeconfig=/var/lib/kubelet/config.yaml`。
+ 由于测试框架启动了本地控制平面来测试 kubelet,因此使用 `http://localhost:8080`
作为API 服务器的 URL。
一些其他的 kubelet 命令行参数可能会被用到:
- * `--cloud-provider`: 如果使用 `--cloud-provider=gce`,需要移除这个参数
- 来运行测试。
+ * `--cloud-provider`:如果使用 `--cloud-provider=gce`,需要移除这个参数来运行测试。
2. 使用以下命令运行节点一致性测试:
@@ -91,45 +99,48 @@ To run the node conformance test, perform the following steps:
-## 针对其他硬件体系结构运行节点一致性测试
+## 针对其他硬件体系结构运行节点一致性测试 {#running-node-conformance-test-for-other-architectures}
Kubernetes 也为其他硬件体系结构的系统提供了节点一致性测试的 Docker 镜像:
-| 架构 | 镜像 | |
-| ----- | :-------------: | ---- |
-| amd64 | node-test-amd64 | |
-| arm | node-test-arm | |
-| arm64 | node-test-arm64 | |
+ 架构 | 镜像 |
+--------|:-----------------:|
+ amd64 | node-test-amd64 |
+ arm | node-test-arm |
+ arm64 | node-test-arm64 |
-## 运行特定的测试
+## 运行特定的测试 {#running-selected-test}
要运行特定测试,请使用你希望运行的测试的特定表达式覆盖环境变量 `FOCUS`。
```shell
sudo docker run -it --rm --privileged --net=host \
- -v /:/rootfs:ro -v $CONFIG_DIR:$CONFIG_DIR -v $LOG_DIR:/var/result \
- -e FOCUS=MirrorPod \ # Only run MirrorPod test
-k8s.gcr.io/node-test:0.2
+ -v /:/rootfs:ro -v $CONFIG_DIR:$CONFIG_DIR -v $LOG_DIR:/var/result \
+ -e FOCUS=MirrorPod \ # Only run MirrorPod test
+ k8s.gcr.io/node-test:0.2
```
要跳过特定的测试,请使用你希望跳过的测试的常规表达式覆盖环境变量 `SKIP`。
@@ -138,35 +149,37 @@ To skip specific tests, overwrite the environment variable `SKIP` with theregula
sudo docker run -it --rm --privileged --net=host \
-v /:/rootfs:ro -v $CONFIG_DIR:$CONFIG_DIR -v $LOG_DIR:/var/result \
-e SKIP=MirrorPod \ # Run all conformance tests but skip MirrorPod test
-k8s.gcr.io/node-test:0.2
+ k8s.gcr.io/node-test:0.2
```
-->
```shell
sudo docker run -it --rm --privileged --net=host \
-v /:/rootfs:ro -v $CONFIG_DIR:$CONFIG_DIR -v $LOG_DIR:/var/result \
-e SKIP=MirrorPod \ # 运行除 MirrorPod 测试外的所有一致性测试内容
-k8s.gcr.io/node-test:0.2
+ k8s.gcr.io/node-test:0.2
```
-节点一致性测试是[节点端到端测试](https://github.com/kubernetes/community/blob/{{< param "githubbranch" >}}/contributors/devel/e2e-node-tests.md)的容器化版本。
+节点一致性测试是[节点端到端测试](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/e2e-node-tests.md)的容器化版本。
默认情况下,它会运行所有一致性测试。
-理论上,只要合理地配置容器和挂载所需的卷,就可以运行任何的节点端到端测试用例。 但是这里**强烈建议只运行一致性测试**,因为运行非一致性测试需要很多复杂的配置。
+理论上,只要合理地配置容器和挂载所需的卷,就可以运行任何的节点端到端测试用例。但是这里**强烈建议只运行一致性测试**,因为运行非一致性测试需要很多复杂的配置。
-## 注意
+## 注意事项 {#caveats}
-* 测试会在节点上遗留一些 Docker 镜像, 包括节点一致性测试本身的镜像和功能测试相关的镜像。
+* 测试会在节点上遗留一些 Docker 镜像,包括节点一致性测试本身的镜像和功能测试相关的镜像。
* 测试会在节点上遗留一些死的容器。这些容器是在功能测试的过程中创建的。
\ No newline at end of file
diff --git a/content/zh/docs/setup/learning-environment/_index.md b/content/zh-cn/docs/setup/learning-environment/_index.md
similarity index 100%
rename from content/zh/docs/setup/learning-environment/_index.md
rename to content/zh-cn/docs/setup/learning-environment/_index.md
diff --git a/content/zh/docs/setup/production-environment/_index.md b/content/zh-cn/docs/setup/production-environment/_index.md
similarity index 100%
rename from content/zh/docs/setup/production-environment/_index.md
rename to content/zh-cn/docs/setup/production-environment/_index.md
diff --git a/content/zh-cn/docs/setup/production-environment/container-runtimes.md b/content/zh-cn/docs/setup/production-environment/container-runtimes.md
new file mode 100644
index 0000000000..971752fd0b
--- /dev/null
+++ b/content/zh-cn/docs/setup/production-environment/container-runtimes.md
@@ -0,0 +1,500 @@
+---
+title: 容器运行时
+content_type: concept
+weight: 20
+---
+
+
+
+
+
+你需要在集群内每个节点上安装一个
+{{< glossary_tooltip text="容器运行时" term_id="container-runtime" >}}
+以使 Pod 可以运行在上面。本文概述了所涉及的内容并描述了与节点设置相关的任务。
+
+
+
+
+Kubernetes {{< skew currentVersion >}} 要求你使用符合{{}} (CRI)的运行时。
+
+有关详细信息,请参阅 [CRI 版本支持](#cri-versions)。
+本页简要介绍在 Kubernetes 中几个常见的容器运行时的用法。
+
+- [containerd](#containerd)
+- [CRI-O](#cri-o)
+- [Docker Engine](#docker)
+- [Mirantis Container Runtime](#mcr)
+
+
+ {{< note >}}
+提示:v1.24 之前的 Kubernetes 版本包括与 Docker Engine 的直接集成,使用名为 _dockershim_ 的组件。
+这种特殊的直接整合不再是 Kubernetes 的一部分
+(这次删除被作为 v1.20 发行版本的一部分[宣布](/zh/blog/2020/12/08/kubernetes-1-20-release-announcement/#dockershim-deprecation))。
+你可以阅读[检查 Dockershim 弃用是否会影响你](/zh/docs/tasks/administer-cluster/migrating-from-dockershim/check-if-dockershim-deprecation-affects-you/)
+以了解此删除可能会如何影响你。
+要了解如何使用 dockershim 进行迁移,请参阅[从 dockershim 迁移](/zh/docs/tasks/administer-cluster/migrating-from-dockershim/)。
+
+如果你正在运行 v{{< skew currentVersion >}} 以外的 Kubernetes 版本,检查该版本的文档。
+{{< /note >}}
+
+
+
+
+## 安装和配置先决条件
+
+以下步骤将通用设置应用于 Linux 上的 Kubernetes 节点。
+
+如果你确定不需要某个特定设置,则可以跳过它。
+
+有关更多信息,请参阅[网络插件要求](/zh/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/#network-plugin-requirements)
+或特定容器运行时的文档。
+
+
+
+### 转发 IPv4 并让 iptables 看到桥接流量
+
+通过运行 `lsmod | grep br_netfilter` 来验证 `br_netfilter` 模块是否已加载。
+
+若要显式加载此模块,请运行 `sudo modprobe br_netfilter`。
+
+为了让 Linux 节点的 iptables 能够正确查看桥接流量,请确认 `sysctl` 配置中的
+`net.bridge.bridge-nf-call-iptables` 设置为 1。 例如:
+
+
+
+```bash
+cat <
+## Cgroup 驱动程序
+
+
+在 Linux 上,{{}}用于限制分配给进程的资源。
+
+当某个 Linux 系统发行版使用 [systemd](https://www.freedesktop.org/wiki/Software/systemd/)
+作为其初始化系统时,初始化进程会生成并使用一个 root 控制组(`cgroup`),并充当 cgroup 管理器。
+Systemd 与 cgroup 集成紧密,并将为每个 systemd 单元分配一个 cgroup。
+你也可以配置容器运行时和 kubelet 使用 `cgroupfs`。
+连同 systemd 一起使用 `cgroupfs` 意味着将有两个不同的 cgroup 管理器。
+
+
+单个 cgroup 管理器将简化分配资源的视图,并且默认情况下将对可用资源和使用
+中的资源具有更一致的视图。
+当有两个管理器共存于一个系统中时,最终将对这些资源产生两种视图。
+在此领域人们已经报告过一些案例,某些节点配置让 kubelet 和 docker 使用
+`cgroupfs`,而节点上运行的其余进程则使用 systemd; 这类节点在资源压力下
+会变得不稳定。
+
+
+更改设置,令容器运行时和 kubelet 使用 `systemd` 作为 cgroup 驱动,以此使系统更为稳定。
+对于 Docker, 设置 `native.cgroupdriver=systemd` 选项。
+
+
+注意:更改已加入集群的节点的 cgroup 驱动是一项敏感的操作。
+如果 kubelet 已经使用某 cgroup 驱动的语义创建了 pod,更改运行时以使用
+别的 cgroup 驱动,当为现有 Pods 重新创建 PodSandbox 时会产生错误。
+重启 kubelet 也可能无法解决此类问题。
+如果你有切实可行的自动化方案,使用其他已更新配置的节点来替换该节点,
+或者使用自动化方案来重新安装。
+
+
+### Cgroup v2 {#cgroup-v2}
+
+Cgroup v2 是 cgroup Linux API 的下一个版本。与 cgroup v1 不同的是,
+Cgroup v2 只有一个层次结构,而不是每个控制器有一个不同的层次结构。
+
+
+新版本对 cgroup v1 进行了多项改进,其中一些改进是:
+
+- 更简洁、更易于使用的 API
+- 可将安全子树委派给容器
+- 更新的功能,如压力失速信息(Pressure Stall Information)
+
+
+尽管内核支持混合配置,即其中一些控制器由 cgroup v1 管理,另一些由 cgroup v2 管理,
+Kubernetes 仅支持使用同一 cgroup 版本来管理所有控制器。
+
+如果 systemd 默认不使用 cgroup v2,你可以通过在内核命令行中添加
+`systemd.unified_cgroup_hierarchy=1` 来配置系统去使用它。
+
+
+
+```shell
+# 此示例适用于使用 DNF 包管理器的 Linux 操作系统
+# 你的系统可能使用不同的方法来设置 Linux 内核使用的命令行。
+sudo dnf install -y grubby && \
+ sudo grubby \
+ --update-kernel=ALL \
+ --args="systemd.unified_cgroup_hierarchy=1"
+```
+
+
+如果更改内核的命令行,则必须重新启动节点才能使更改生效。
+
+切换到 cgroup v2 时,用户体验不应有任何明显差异,
+除非用户直接在节点上或在容器内访问 cgroup 文件系统。
+为了使用它,CRI 运行时也必须支持 cgroup v2。
+
+
+### 将 kubeadm 托管的集群迁移到 `systemd` 驱动
+
+
+如果你希望将现有的由 kubeadm 管理的集群迁移到 `systemd` cgroup 驱动程序,
+请按照[配置 cgroup 驱动程序](/zh/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver/)操作。
+
+## CRI 版本支持 {#cri-versions}
+
+你的容器运行时必须至少支持容器运行时接口的 v1alpha2。
+
+Kubernetes {{< skew currentVersion >}} 默认使用 v1 的 CRI API。如果容器运行时不支持 v1 API,
+则 kubelet 会回退到使用(已弃用的)v1alpha2 API。
+
+
+## 容器运行时
+
+{{% thirdparty-content %}}
+
+### containerd
+
+
+本节概述了使用 containerd 作为 CRI 运行时的必要步骤。
+
+使用以下命令在系统上安装 Containerd:
+
+
+
+按照[开始使用 containerd](https://github.com/containerd/containerd/blob/main/docs/getting-started.md) 的说明进行操作。
+创建有效的配置文件 `config.toml` 后返回此步骤。
+
+{{< tabs name="Finding your config.toml file" >}}
+{{% tab name="Linux" %}}
+
+你可以在路径 `/etc/containerd/config.toml` 下找到此文件。
+{{% /tab %}}
+{{< tab name="Windows" >}}
+
+你可以在路径 `C:\Program Files\containerd\config.toml` 下找到此文件。
+{{< /tab >}}
+{{< /tabs >}}
+
+
+在 Linux 上,containerd 的默认 CRI 套接字是 `/run/containerd/containerd.sock`。
+在 Windows 上,默认 CRI 端点是 `npipe://./pipe/containerd-containerd`。
+
+#### 配置 `systemd` cgroup 驱动程序 {#containerd-systemd}
+
+
+结合 `runc` 使用 `systemd` cgroup 驱动,在 `/etc/containerd/config.toml` 中设置
+
+```
+[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
+ ...
+ [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
+ SystemdCgroup = true
+```
+
+
+如果你应用此更改,请确保重新启动 containerd:
+
+```shell
+sudo systemctl restart containerd
+```
+
+
+当使用 kubeadm 时,请手动配置
+[kubelet 的 cgroup 驱动](/zh/docs/tasks/administer-cluster/kubeadm/configure-cgroup-driver/#configuring-the-kubelet-cgroup-driver).
+
+### CRI-O
+
+
+本节包含安装 CRI-O 作为容器运行时的必要步骤。
+
+
+
+要安装 CRI-O,请按照 [CRI-O 安装说明](https://github.com/cri-o/cri-o/blob/main/install.md#readme)执行操作。
+
+
+
+#### cgroup 驱动程序
+
+
+
+CRI-O 默认使用 systemd cgroup 驱动程序,这对你来说可能工作得很好。要切换到 `cgroupfs` cgroup 驱动程序,
+请编辑 `/etc/crio/crio.conf` 或在 `/etc/crio/crio.conf.d/02-cgroup-manager.conf` 中放置一个插入式配置 ,例如:
+
+
+```toml
+[crio.runtime]
+conmon_cgroup = "pod"
+cgroup_manager = "cgroupfs"
+```
+
+
+
+你还应该注意到 `conmon_cgroup` 被更改,当使用 CRI-O 和 `cgroupfs` 时,必须将其设置为值 `pod`。
+通常需要保持 kubelet 的 cgroup 驱动配置(通常通过 kubeadm 完成)和 CRI-O 同步。
+
+
+对于 CRI-O,CRI 套接字默认为 `/var/run/crio/crio.sock`。
+
+### Docker Engine {#docker}
+
+
+
+{{< note >}}
+以下操作假设你使用 [`cri-dockerd`](https://github.com/Mirantis/cri-dockerd) 适配器来将
+Docker Engine 与 Kubernetes 集成。
+{{< /note >}}
+
+
+
+1. 在你的每个节点上,遵循[安装 Docker 引擎](https://docs.docker.com/engine/install/#server)指南为你的
+ Linux 发行版安装 Docker。
+
+
+2. 按照源代码仓库中的说明安装 [`cri-dockerd`](https://github.com/Mirantis/cri-dockerd)。
+
+
+
+对于 `cri-dockerd`,默认情况下,CRI 套接字是 `/run/cri-dockerd.sock`。
+
+### Mirantis 容器运行时 {#mcr}
+
+
+[Mirantis Container Runtime](https://docs.mirantis.com/mcr/20.10/overview.html) (MCR) 是一种商用容器运行时,以前称为 Docker 企业版。
+你可以使用 MCR 中包含的开源 [`cri-dockerd`](https://github.com/Mirantis/cri-dockerd) 组件将 Mirantis Container Runtime 与 Kubernetes 一起使用。
+
+
+要了解有关如何安装 Mirantis Container Runtime 的更多信息,请访问 [MCR 部署指南](https://docs.mirantis.com/mcr/20.10/install.html)。
+
+检查名为 `cri-docker.socket` 的 systemd 单元以找出 CRI 套接字的路径。
+
+## {{% heading "whatsnext" %}}
+
+
+
+除了容器运行时,你的集群还需要有效的[网络插件](/zh/docs/concepts/cluster-administration/networking/#how-to-implement-the-kubernetes-networking-model)。
+
+
diff --git a/content/zh/docs/setup/production-environment/tools/_index.md b/content/zh-cn/docs/setup/production-environment/tools/_index.md
similarity index 100%
rename from content/zh/docs/setup/production-environment/tools/_index.md
rename to content/zh-cn/docs/setup/production-environment/tools/_index.md
diff --git a/content/zh/docs/setup/production-environment/tools/kops.md b/content/zh-cn/docs/setup/production-environment/tools/kops.md
similarity index 100%
rename from content/zh/docs/setup/production-environment/tools/kops.md
rename to content/zh-cn/docs/setup/production-environment/tools/kops.md
diff --git a/content/zh/docs/setup/production-environment/tools/kubeadm/_index.md b/content/zh-cn/docs/setup/production-environment/tools/kubeadm/_index.md
similarity index 100%
rename from content/zh/docs/setup/production-environment/tools/kubeadm/_index.md
rename to content/zh-cn/docs/setup/production-environment/tools/kubeadm/_index.md
diff --git a/content/zh/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md b/content/zh-cn/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md
similarity index 100%
rename from content/zh/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md
rename to content/zh-cn/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md
diff --git a/content/zh/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm.md b/content/zh-cn/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm.md
similarity index 91%
rename from content/zh/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm.md
rename to content/zh-cn/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm.md
index e6fa988fc8..cb8fac642f 100644
--- a/content/zh/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm.md
+++ b/content/zh-cn/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm.md
@@ -1,11 +1,8 @@
---
-reviewers:
-- sig-cluster-lifecycle
title: 使用 kubeadm 创建集群
content_type: task
weight: 30
---
-
- 使用 `kubeadm`,你能创建一个符合最佳实践的最小化 Kubernetes 集群。事实上,你可以使用 `kubeadm` 配置一个通过 [Kubernetes 一致性测试](https://kubernetes.io/blog/2017/10/software-conformance-certification) 的集群。
+
+使用 `kubeadm`,你能创建一个符合最佳实践的最小化 Kubernetes 集群。
+事实上,你可以使用 `kubeadm` 配置一个通过
+[Kubernetes 一致性测试](https://kubernetes.io/blog/2017/10/software-conformance-certification)的集群。
`kubeadm` 还支持其他集群生命周期功能,
-例如 [启动引导令牌](/zh/docs/reference/access-authn-authz/bootstrap-tokens/) 和集群升级。
+例如[启动引导令牌](/zh/docs/reference/access-authn-authz/bootstrap-tokens/)和集群升级。
-[Kubernetes 版本及版本偏差策略](/zh/docs/setup/release/version-skew-policy/#supported-versions) 适用于 `kubeadm` 以及整个 Kubernetes。
+[Kubernetes 版本及版本偏差策略](/zh/docs/setup/release/version-skew-policy/#supported-versions)适用于 `kubeadm` 以及整个 Kubernetes。
查阅该策略以了解支持哪些版本的 Kubernetes 和 `kubeadm`。
该页面是为 Kubernetes {{< param "version" >}} 编写的。
@@ -103,7 +107,7 @@ Any commands under `kubeadm alpha` are, by definition, supported on an alpha lev
-## 目标
+## 目标 {#objectives}
-## 操作指南
+## 操作指南 {#instructions}
-### 主机准备
+### 主机准备 {#preparing-the-hosts}
-### 准备所需的容器镜像
+### 准备所需的容器镜像 {#preparing-the-required-container-images}
-### 初始化控制平面节点
+### 初始化控制平面节点 {#initializing-your-control-plane-node}
-### 关于 apiserver-advertise-address 和 ControlPlaneEndpoint 的注意事项
+### 关于 apiserver-advertise-address 和 ControlPlaneEndpoint 的注意事项 {#considerations-about-apiserver-advertise-address-and-controlplaneendpoint}
-### 更多信息
+### 更多信息 {#more-information}
-要使用配置文件配置 `kubeadm init` 命令,请参见[带配置文件使用 kubeadm init](/zh/docs/reference/setup-tools/kubeadm/kubeadm-init/#config-file)。
+要使用配置文件配置 `kubeadm init` 命令,
+请参见[带配置文件使用 kubeadm init](/zh/docs/reference/setup-tools/kubeadm/kubeadm-init/#config-file)。
-要自定义控制平面组件,包括可选的对控制平面组件和 etcd 服务器的活动探针提供 IPv6 支持,请参阅[自定义参数](/zh/docs/setup/production-environment/tools/kubeadm/control-plane-flags/)。
+要自定义控制平面组件,包括可选的对控制平面组件和 etcd 服务器的活动探针提供 IPv6 支持,
+请参阅[自定义参数](/zh/docs/setup/production-environment/tools/kubeadm/control-plane-flags/)。
-请参阅实现 [Kubernetes 网络模型](/zh/docs/concepts/cluster-administration/networking/#how-to-implement-the-kubernetes-networking-model) 的附加组件列表。
+请参阅实现 [Kubernetes 网络模型](/zh/docs/concepts/cluster-administration/networking/#how-to-implement-the-kubernetes-networking-model)的附加组件列表。
-### 控制平面节点隔离
+### 控制平面节点隔离 {#control-plane-node-isolation}
* SSH 到机器
* 成为 root (例如 `sudo su -`)
-* 运行 `kubeadm init` 输出的命令。例如:
+* 运行 `kubeadm init` 输出的命令,例如:
-```bash
-kubeadm join --token : --discovery-token-ca-cert-hash sha256:
-```
+ ```bash
+ kubeadm join --token