Command

Kubernetes Delete a Resource by Manifest Command

The Kubernetes command to delete a resource by manifest is kubectl delete -f ./pod.json.

Quick Answer

Command
kubectl delete -f ./pod.json
KubernetesCommand

Delete a Resource by Manifest

Type this command
kubectl delete -f ./pod.json

Deletes a pod using the type and name in pod.json.

Learn More

How to delete a resource by manifest in Kubernetes

  1. Open the terminal or command interface for Kubernetes.
  2. Type kubectl delete -f ./pod.json, replace any placeholders, and run it.

Kubernetes Delete a Resource by Manifest Command

Run kubectl delete -f ./pod.json.

Related Commands

Frequently asked questions

What is the Kubernetes command to delete a resource by manifest?

Run kubectl delete -f ./pod.json.

Where do I type this Kubernetes command?

Type it in the terminal or command-line interface used by Kubernetes.

Does this Kubernetes command work on Mac and Windows?

Yes. The command text is the same on both platforms when the tool is installed.

Official source · How we verify