Tidy garbage collection controller page (#14856)
* Tidy code blocks * Reword for better readability
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
ca9e44ff9c
commit
dee06de26a
@@ -45,7 +45,7 @@ kubectl get pods --output=yaml
|
|||||||
|
|
||||||
The output shows that the Pod owner is a ReplicaSet named `my-repset`:
|
The output shows that the Pod owner is a ReplicaSet named `my-repset`:
|
||||||
|
|
||||||
```shell
|
```yaml
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
@@ -61,7 +61,7 @@ metadata:
|
|||||||
```
|
```
|
||||||
|
|
||||||
{{< note >}}
|
{{< note >}}
|
||||||
Cross-namespace owner references is disallowed by design. This means:
|
Cross-namespace owner references are disallowed by design. This means:
|
||||||
1) Namespace-scoped dependents can only specify owners in the same namespace,
|
1) Namespace-scoped dependents can only specify owners in the same namespace,
|
||||||
and owners that are cluster-scoped.
|
and owners that are cluster-scoped.
|
||||||
2) Cluster-scoped dependents can only specify cluster-scoped owners, but not
|
2) Cluster-scoped dependents can only specify cluster-scoped owners, but not
|
||||||
@@ -124,8 +124,8 @@ Here's an example that deletes dependents in background:
|
|||||||
```shell
|
```shell
|
||||||
kubectl proxy --port=8080
|
kubectl proxy --port=8080
|
||||||
curl -X DELETE localhost:8080/apis/apps/v1/namespaces/default/replicasets/my-repset \
|
curl -X DELETE localhost:8080/apis/apps/v1/namespaces/default/replicasets/my-repset \
|
||||||
-d '{"kind":"DeleteOptions","apiVersion":"v1","propagationPolicy":"Background"}' \
|
-d '{"kind":"DeleteOptions","apiVersion":"v1","propagationPolicy":"Background"}' \
|
||||||
-H "Content-Type: application/json"
|
-H "Content-Type: application/json"
|
||||||
```
|
```
|
||||||
|
|
||||||
Here's an example that deletes dependents in foreground:
|
Here's an example that deletes dependents in foreground:
|
||||||
@@ -133,8 +133,8 @@ Here's an example that deletes dependents in foreground:
|
|||||||
```shell
|
```shell
|
||||||
kubectl proxy --port=8080
|
kubectl proxy --port=8080
|
||||||
curl -X DELETE localhost:8080/apis/apps/v1/namespaces/default/replicasets/my-repset \
|
curl -X DELETE localhost:8080/apis/apps/v1/namespaces/default/replicasets/my-repset \
|
||||||
-d '{"kind":"DeleteOptions","apiVersion":"v1","propagationPolicy":"Foreground"}' \
|
-d '{"kind":"DeleteOptions","apiVersion":"v1","propagationPolicy":"Foreground"}' \
|
||||||
-H "Content-Type: application/json"
|
-H "Content-Type: application/json"
|
||||||
```
|
```
|
||||||
|
|
||||||
Here's an example that orphans dependents:
|
Here's an example that orphans dependents:
|
||||||
@@ -142,8 +142,8 @@ Here's an example that orphans dependents:
|
|||||||
```shell
|
```shell
|
||||||
kubectl proxy --port=8080
|
kubectl proxy --port=8080
|
||||||
curl -X DELETE localhost:8080/apis/apps/v1/namespaces/default/replicasets/my-repset \
|
curl -X DELETE localhost:8080/apis/apps/v1/namespaces/default/replicasets/my-repset \
|
||||||
-d '{"kind":"DeleteOptions","apiVersion":"v1","propagationPolicy":"Orphan"}' \
|
-d '{"kind":"DeleteOptions","apiVersion":"v1","propagationPolicy":"Orphan"}' \
|
||||||
-H "Content-Type: application/json"
|
-H "Content-Type: application/json"
|
||||||
```
|
```
|
||||||
|
|
||||||
kubectl also supports cascading deletion.
|
kubectl also supports cascading deletion.
|
||||||
|
|||||||
Reference in New Issue
Block a user