KubernetesCommand
Delete All Pods in a Namespace
Type this command
kubectl -n my-ns delete pod,svc --allDeletes every pod and service in a namespace.
Tip: The -n flag names the namespace; --all deletes every pod and service in it.
The Kubernetes command to delete all pods in a namespace is kubectl -n my-ns delete pod,svc --all.
kubectl -n my-ns delete pod,svc --allkubectl -n my-ns delete pod,svc --allDeletes every pod and service in a namespace.
Tip: The -n flag names the namespace; --all deletes every pod and service in it.
Tip: The -n flag names the namespace; --all deletes every pod and service in it.
Run kubectl -n my-ns delete pod,svc --all.
Run kubectl -n my-ns delete pod,svc --all.
Type it in the terminal or command-line interface used by Kubernetes.
Yes. The command text is the same on both platforms when the tool is installed.