Command

Kubernetes Edit a Resource Command

The Kubernetes command to edit a resource is kubectl edit svc/docker-registry.

Quick Answer

Command
kubectl edit svc/docker-registry
KubernetesCommand

Edit a Resource

Type this command
kubectl edit svc/docker-registry

Opens the resource in your default editor.

Learn More

How to edit a resource in Kubernetes

  1. Open the terminal or command interface for Kubernetes.
  2. Type kubectl edit svc/docker-registry, replace any placeholders, and run it.

Kubernetes Edit a Resource Command

Run kubectl edit svc/docker-registry.

Related Commands

Frequently asked questions

What is the Kubernetes command to edit a resource?

Run kubectl edit svc/docker-registry.

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