Skip to content

Commit 0ed0a0c

Browse files
authored
Merge pull request #30110 from sftim/20211016_add_now_delete_to_cheat_sheet
Add immediate pod deletion to cheat sheet
2 parents 0f4eb18 + 5799a8c commit 0ed0a0c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

content/en/docs/reference/kubectl/cheatsheet.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,11 @@ kubectl scale --replicas=5 rc/foo rc/bar rc/baz # Scale multip
289289
## Deleting resources
290290

291291
```bash
292-
kubectl delete -f ./pod.json # Delete a pod using the type and name specified in pod.json
293-
kubectl delete pod,service baz foo # Delete pods and services with same names "baz" and "foo"
294-
kubectl delete pods,services -l name=myLabel # Delete pods and services with label name=myLabel
295-
kubectl -n my-ns delete pod,svc --all # Delete all pods and services in namespace my-ns,
292+
kubectl delete -f ./pod.json # Delete a pod using the type and name specified in pod.json
293+
kubectl delete pod unwanted --now # Delete a pod with no grace period
294+
kubectl delete pod,service baz foo # Delete pods and services with same names "baz" and "foo"
295+
kubectl delete pods,services -l name=myLabel # Delete pods and services with label name=myLabel
296+
kubectl -n my-ns delete pod,svc --all # Delete all pods and services in namespace my-ns,
296297
# Delete all pods matching the awk pattern1 or pattern2
297298
kubectl get pods -n mynamespace --no-headers=true | awk '/pattern1|pattern2/{print $1}' | xargs kubectl delete -n mynamespace pod
298299
```

0 commit comments

Comments
 (0)