Update workloads/controllers/replicationcontroller.md and replicaset.md
* sync with english version in workloads/controllers/replicationcontroller.md and replicaset.md Signed-off-by: ydFu <ader.ydfu@gmail.com>
This commit is contained in:
@@ -472,15 +472,15 @@ curl -X DELETE 'localhost:8080/apis/apps/v1/namespaces/default/replicasets/fron
|
||||
<!--
|
||||
### Deleting just a ReplicaSet
|
||||
|
||||
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.
|
||||
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.
|
||||
When using the REST API or the `client-go` library, you must set `propagationPolicy` to `Orphan`.
|
||||
For example:
|
||||
-->
|
||||
### 只删除 ReplicaSet
|
||||
|
||||
你可以只删除 ReplicaSet 而不影响它的 Pod,方法是使用
|
||||
你可以只删除 ReplicaSet 而不影响它的 Pods,方法是使用
|
||||
[`kubectl delete`](/docs/reference/generated/kubectl/kubectl-commands#delete)
|
||||
命令并设置 `--cascade=false` 选项。
|
||||
命令并设置 `--cascade=orphan` 选项。
|
||||
|
||||
当使用 REST API 或 `client-go` 库时,你必须将 `propagationPolicy` 设置为 `Orphan`。
|
||||
例如:
|
||||
|
||||
@@ -97,6 +97,10 @@ Run the example job by downloading the example file and then running this comman
|
||||
```shell
|
||||
kubectl apply -f https://k8s.io/examples/controllers/replication.yaml
|
||||
```
|
||||
<!--
|
||||
The output is similar to this:
|
||||
-->
|
||||
输出类似于:
|
||||
```
|
||||
replicationcontroller/nginx created
|
||||
```
|
||||
@@ -109,6 +113,10 @@ Check on the status of the ReplicationController using this command:
|
||||
```shell
|
||||
kubectl describe replicationcontrollers/nginx
|
||||
```
|
||||
<!--
|
||||
The output is similar to this:
|
||||
-->
|
||||
输出类似于:
|
||||
```
|
||||
Name: nginx
|
||||
Namespace: default
|
||||
@@ -155,6 +163,10 @@ pods=$(kubectl get pods --selector=app=nginx --output=jsonpath={.items..metadata
|
||||
echo $pods
|
||||
```
|
||||
|
||||
<!--
|
||||
The output is similar to this:
|
||||
-->
|
||||
输出类似于:
|
||||
```
|
||||
nginx-3ntk0 nginx-4ok8v nginx-qrm3m
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user