Skip to content

Commit b8d1814

Browse files
authored
Merge pull request #26208 from ydFu/update-replicatset
Update workloads/controllers/replicationcontroller.md and replicaset.md
2 parents 8b391b1 + f3692a3 commit b8d1814

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

content/zh/docs/concepts/workloads/controllers/replicaset.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,15 +472,15 @@ curl -X DELETE 'localhost:8080/apis/apps/v1/namespaces/default/replicasets/fron
472472
<!--
473473
### Deleting just a ReplicaSet
474474

475-
You can delete a ReplicaSet without affecting any of its pods using [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete) with the `-cascade=false` option.
475+
You can delete a ReplicaSet without affecting any of its Pods using [`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete) with the `--cascade=orphan` option.
476476
When using the REST API or the `client-go` library, you must set `propagationPolicy` to `Orphan`.
477477
For example:
478478
-->
479479
### 只删除 ReplicaSet
480480

481-
你可以只删除 ReplicaSet 而不影响它的 Pod,方法是使用
481+
你可以只删除 ReplicaSet 而不影响它的 Pods,方法是使用
482482
[`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete)
483-
命令并设置 `--cascade=false` 选项。
483+
命令并设置 `--cascade=orphan` 选项。
484484

485485
当使用 REST API 或 `client-go` 库时,你必须将 `propagationPolicy` 设置为 `Orphan`。
486486
例如:

content/zh/docs/concepts/workloads/controllers/replicationcontroller.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ Run the example job by downloading the example file and then running this comman
9797
```shell
9898
kubectl apply -f https://k8s.io/examples/controllers/replication.yaml
9999
```
100+
<!--
101+
The output is similar to this:
102+
-->
103+
输出类似于:
100104
```
101105
replicationcontroller/nginx created
102106
```
@@ -109,6 +113,10 @@ Check on the status of the ReplicationController using this command:
109113
```shell
110114
kubectl describe replicationcontrollers/nginx
111115
```
116+
<!--
117+
The output is similar to this:
118+
-->
119+
输出类似于:
112120
```
113121
Name: nginx
114122
Namespace: default
@@ -155,6 +163,10 @@ pods=$(kubectl get pods --selector=app=nginx --output=jsonpath={.items..metadata
155163
echo $pods
156164
```
157165

166+
<!--
167+
The output is similar to this:
168+
-->
169+
输出类似于:
158170
```
159171
nginx-3ntk0 nginx-4ok8v nginx-qrm3m
160172
```

0 commit comments

Comments
 (0)