LinuxCommandLibrary

kubectl-edit

opens a resource's configuration in your default editor

TLDR

Edit deployment in editor

$ kubectl edit deployment [name]
copy
Edit pod
$ kubectl edit pod [pod-name]
copy
Edit with specific editor
$ EDITOR=nano kubectl edit deployment [name]
copy
Edit resource in YAML format
$ kubectl edit deployment [name] -o yaml
copy

SYNOPSIS

kubectl edit type/name [options]

DESCRIPTION

kubectl edit opens a resource's configuration in your default editor. Changes are applied when you save and exit. The resource is validated before applying. Set EDITOR or KUBE_EDITOR environment variable to change the editor.

PARAMETERS

-o, --output format

Edit format (yaml, json).
-n, --namespace name
Kubernetes namespace.
--record
Record command in resource annotation.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community