[en] update en docs to use recommended labels
This commit is contained in:
@@ -50,10 +50,10 @@ For example:
|
||||
kubectl delete -f <file.yaml> --cascade=orphan
|
||||
```
|
||||
|
||||
By passing `--cascade=orphan` to `kubectl delete`, the Pods managed by the StatefulSet are left behind even after the StatefulSet object itself is deleted. If the pods have a label `app=myapp`, you can then delete them as follows:
|
||||
By passing `--cascade=orphan` to `kubectl delete`, the Pods managed by the StatefulSet are left behind even after the StatefulSet object itself is deleted. If the pods have a label `app.kubernetes.io/name=MyApp`, you can then delete them as follows:
|
||||
|
||||
```shell
|
||||
kubectl delete pods -l app=myapp
|
||||
kubectl delete pods -l app.kubernetes.io/name=MyApp
|
||||
```
|
||||
|
||||
### Persistent Volumes
|
||||
@@ -70,13 +70,13 @@ To delete everything in a StatefulSet, including the associated pods, you can ru
|
||||
|
||||
```shell
|
||||
grace=$(kubectl get pods <stateful-set-pod> --template '{{.spec.terminationGracePeriodSeconds}}')
|
||||
kubectl delete statefulset -l app=myapp
|
||||
kubectl delete statefulset -l app.kubernetes.io/name=MyApp
|
||||
sleep $grace
|
||||
kubectl delete pvc -l app=myapp
|
||||
kubectl delete pvc -l app.kubernetes.io/name=MyApp
|
||||
|
||||
```
|
||||
|
||||
In the example above, the Pods have the label `app=myapp`; substitute your own label as appropriate.
|
||||
In the example above, the Pods have the label `app.kubernetes.io/name=MyApp`; substitute your own label as appropriate.
|
||||
|
||||
### Force deletion of StatefulSet pods
|
||||
|
||||
|
||||
Reference in New Issue
Block a user