@@ -6,7 +6,7 @@ api_metadata:
66content_type : " api_reference"
77description : " Deployment 使得 Pod 和 ReplicaSet 能够进行声明式更新。"
88title : " Deployment"
9- weight : 6
9+ weight : 7
1010---
1111<!--
1212api_metadata:
@@ -16,7 +16,7 @@ api_metadata:
1616content_type: "api_reference"
1717description: "Deployment enables declarative updates for Pods and ReplicaSets."
1818title: "Deployment"
19- weight: 6
19+ weight: 7
2020auto_generated: true
2121-->
2222
@@ -88,7 +88,7 @@ DeploymentSpec 定义 Deployment 预期行为的规约。
8888
8989- ** template** (<a href="{{< ref "../workload-resources/pod-template-v1#PodTemplateSpec" >}}">PodTemplateSpec</a >),必需
9090
91- template 描述将要创建的 Pod。` template.spec.restartPolicy `
91+ ` template ` 描述将要创建的 Pod。` template.spec.restartPolicy `
9292 唯一被允许的值是 ` Always ` 。
9393
9494<!--
@@ -132,19 +132,11 @@ DeploymentSpec 定义 Deployment 预期行为的规约。
132132 - **strategy.type** (string)
133133
134134 Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate.
135-
136- Possible enum values:
137- - `"Recreate"` Kill all existing pods before creating new ones.
138- - `"RollingUpdate"` Replace the old ReplicaSets by new one using rolling update i.e gradually scale down the old ReplicaSets and scale up the new one.
139135 -->
140136 - ** strategy.type** (string)
141137
142138 部署的类型。取值可以是 “Recreate” 或 “RollingUpdate”。默认为 RollingUpdate。
143139
144- 可能的枚举值:
145- - ` "Recreate" ` :在创建新实例之前杀死所有现有的 Pod。
146- - ` "RollingUpdate" ` :使用滚动更新替换旧的 ReplicaSet,即逐渐缩小旧的 ReplicaSet 并扩大新的 ReplicaSet。
147-
148140 <!--
149141 - **strategy.rollingUpdate** (RollingUpdateDeployment)
150142
@@ -173,7 +165,7 @@ DeploymentSpec 定义 Deployment 预期行为的规约。
173165 - ** strategy.rollingUpdate.maxSurge** (IntOrString)
174166
175167 超出预期的 Pod 数量之后可以调度的最大 Pod 数量。该值可以是一个绝对数(例如:
176- 5)或一个预期 Pod 的百分比(例如:10%)。如果 MaxUnavailable 为 0,则此字段不能为 0。
168+ 5)或一个预期 Pod 的百分比(例如:10%)。如果 ` maxUnavailable ` 为 0,则此字段不能为 0。
177169 通过向上取整计算得出一个百分比绝对数。默认为 25%。例如:当此值设为 30% 时,
178170 如果滚动更新启动,则可以立即对 ReplicaSet 扩容,从而使得新旧 Pod 总数不超过预期 Pod 数量的 130%。
179171 一旦旧 Pod 被杀死,则可以再次对新的 ReplicaSet 扩容,
@@ -197,7 +189,7 @@ DeploymentSpec 定义 Deployment 预期行为的规约。
197189
198190 更新期间可能不可用的最大 Pod 数量。该值可以是一个绝对数(例如:
199191 5)或一个预期 Pod 的百分比(例如:10%)。通过向下取整计算得出一个百分比绝对数。
200- 如果 MaxSurge 为 0,则此字段不能为 0。默认为 25%。
192+ 如果 ` maxSurge ` 为 0,则此字段不能为 0。默认为 25%。
201193 例如:当此字段设为 30%,则在滚动更新启动时 ReplicaSet 可以立即缩容为预期 Pod 数量的 70%。
202194 一旦新的 Pod 就绪,ReplicaSet 可以再次缩容,接下来对新的 ReplicaSet 扩容,
203195 确保更新期间任何时间可用的 Pod 总数至少是预期 Pod 数量的 70%。
@@ -440,18 +432,19 @@ DeploymentList 是 Deployment 的列表。
440432
441433- ** items** ([ ] <a href="{{< ref "../workload-resources/deployment-v1#Deployment" >}}">Deployment</a >),必需
442434
443- items 是 Deployment 的列表。
435+ ` items ` 是 Deployment 的列表。
444436
445437<!--
446438## Operations {#Operations}
447- <hr>
448- ### `get` read the specified Deployment
449- #### HTTP Request
450439-->
451440## 操作 {#Operations}
452441
453442<hr >
454443
444+ <!--
445+ ### `get` read the specified Deployment
446+ #### HTTP Request
447+ -->
455448### ` get ` 读取指定的 Deployment
456449
457450#### HTTP 请求
@@ -550,6 +543,7 @@ GET /apis/apps/v1/namespaces/{namespace}/deployments
550543- **resourceVersion** (*in query*): string
551544- **resourceVersionMatch** (*in query*): string
552545- **sendInitialEvents** (*in query*): boolean
546+ - **shardSelector** (*in query*): string
553547- **timeoutSeconds** (*in query*): integer
554548- **watch** (*in query*): boolean
555549-->
@@ -572,35 +566,39 @@ GET /apis/apps/v1/namespaces/{namespace}/deployments
572566 <a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector</a >
573567
574568- ** labelSelector** (** 查询参数** ): string
575-
569+
576570 <a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector</a >
577571
578572- ** limit** (** 查询参数** ): integer
579-
573+
580574 <a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit</a >
581575
582576- ** pretty** (** 查询参数** ): string
583-
577+
584578 <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a >
585579
586580- ** resourceVersion** (** 查询参数** ): string
587-
581+
588582 <a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion</a >
589583
590584- ** resourceVersionMatch** (** 查询参数** ): string
591-
585+
592586 <a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch</a >
593587
594588- ** sendInitialEvents** (** 查询参数** ): boolean
595589
596590 <a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a >
597591
592+ - ** shardSelector** (** 查询参数** ): string
593+
594+ <a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a >
595+
598596- ** timeoutSeconds** (** 查询参数** ): integer
599-
597+
600598 <a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a >
601599
602600- ** watch** (** 查询参数** ): boolean
603-
601+
604602 <a href="{{< ref "../common-parameters/common-parameters#watch" >}}">watch</a >
605603
606604<!--
@@ -633,53 +631,58 @@ GET /apis/apps/v1/deployments
633631- **resourceVersion** (*in query*): string
634632- **resourceVersionMatch** (*in query*): string
635633- **sendInitialEvents** (*in query*): boolean
634+ - **shardSelector** (*in query*): string
636635- **timeoutSeconds** (*in query*): integer
637636- **watch** (*in query*): boolean
638637-->
639638#### 参数
640639
641640- ** allowWatchBookmarks** (** 查询参数** ): boolean
642-
641+
643642 <a href="{{< ref "../common-parameters/common-parameters#allowWatchBookmarks" >}}">allowWatchBookmarks</a >
644643
645644- ** continue** (** 查询参数** ): string
646-
645+
647646 <a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue</a >
648647
649648- ** fieldSelector** (** 查询参数** ): string
650-
649+
651650 <a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector</a >
652651
653652- ** labelSelector** (** 查询参数** ): string
654-
653+
655654 <a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector</a >
656655
657656- ** limit** (** 查询参数** ): integer
658-
657+
659658 <a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit</a >
660659
661660- ** pretty** (** 查询参数** ): string
662-
661+
663662 <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a >
664663
665664- ** resourceVersion** (** 查询参数** ): string
666-
665+
667666 <a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion</a >
668667
669668- ** resourceVersionMatch** (** 查询参数** ): string
670-
669+
671670 <a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch</a >
672671
673672- ** sendInitialEvents** (** 查询参数** ): boolean
674673
675674 <a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a >
675+
676+ - ** shardSelector** (** 查询参数** ): string
677+
678+ <a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a >
676679
677680- ** timeoutSeconds** (** 查询参数** ): integer
678-
681+
679682 <a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a >
680683
681684- ** watch** (** 查询参数** ): boolean
682-
685+
683686 <a href="{{< ref "../common-parameters/common-parameters#watch" >}}">watch</a >
684687
685688<!--
@@ -713,25 +716,25 @@ POST /apis/apps/v1/namespaces/{namespace}/deployments
713716#### 参数
714717
715718- ** namespace** (** 路径参数** ): string,必需
716-
719+
717720 <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a >
718721
719722- ** body** : <a href="{{< ref "../workload-resources/deployment-v1#Deployment" >}}">Deployment</a >,必需
720723
721724- ** dryRun** (** 查询参数** ): string
722-
725+
723726 <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a >
724727
725728- ** fieldManager** (** 查询参数** ): string
726-
729+
727730 <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager</a >
728731
729732- ** fieldValidation** (** 查询参数** ): string
730-
733+
731734 <a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a >
732735
733736- ** pretty** (** 查询参数** ): string
734-
737+
735738 <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a >
736739
737740<!--
@@ -771,29 +774,29 @@ PUT /apis/apps/v1/namespaces/{namespace}/deployments/{name}
771774#### 参数
772775
773776- ** name** (** 路径参数** ): string,必需
774-
777+
775778 Deployment 的名称。
776779
777780- ** namespace** (** 路径参数** ): string,必需
778-
781+
779782 <a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a >
780783
781784- ** body** : <a href="{{< ref "../workload-resources/deployment-v1#Deployment" >}}">Deployment</a >,必需
782785
783786- ** dryRun** (** 查询参数** ): string
784-
787+
785788 <a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun</a >
786789
787790- ** fieldManager** (** 查询参数** ): string
788-
791+
789792 <a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager</a >
790793
791794- ** fieldValidation** (** 查询参数** ): string
792-
795+
793796 <a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a >
794797
795798- ** pretty** (** 查询参数** ): string
796-
799+
797800 <a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a >
798801
799802<!--
@@ -831,7 +834,7 @@ PUT /apis/apps/v1/namespaces/{namespace}/deployments/{name}/status
831834#### 参数
832835
833836- ** name** (** 路径参数** ): string,必需
834-
837+
835838 Deployment 的名称。
836839
837840- ** namespace** (** 路径参数** ): string,必需
@@ -1088,6 +1091,7 @@ DELETE /apis/apps/v1/namespaces/{namespace}/deployments
10881091- **resourceVersion** (*in query*): string
10891092- **resourceVersionMatch** (*in query*): string
10901093- **sendInitialEvents** (*in query*): boolean
1094+ - **shardSelector** (*in query*): string
10911095- **timeoutSeconds** (*in query*): integer
10921096-->
10931097#### 参数
@@ -1146,6 +1150,10 @@ DELETE /apis/apps/v1/namespaces/{namespace}/deployments
11461150
11471151 <a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a >
11481152
1153+ - ** shardSelector** (** 查询参数** ): string
1154+
1155+ <a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a >
1156+
11491157- ** timeoutSeconds** (** 查询参数** ): integer
11501158
11511159 <a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a >
0 commit comments