Options (5)
booleanEdit a pod in the default namespace
Example:
kubectl edit {{[po|pods]}}/{{pod_name}}booleanEdit a deployment in the default namespace
Example:
kubectl edit {{[deploy|deployment]}}/{{deployment_name}}booleanEdit a service in the default namespace
Example:
kubectl edit {{[svc|service]}}/{{service_name}}-n, --namespacebooleanEdit all entries of a given resource in a given namespace
Example:
kubectl edit {{resource}} {{[-n|--namespace]}} {{namespace}}-o, --outputbooleanEdit a resource in JSON format
Example:
kubectl edit {{resource}}/{{resource_name}} {{[-o|--output]}} jsonExamples (6)
Edit a pod in the default namespace
kubectl edit [po|pods]/pod_nameEdit a deployment in the default namespace
kubectl edit [deploy|deployment]/deployment_nameEdit a service in the default namespace
kubectl edit [svc|service]/service_nameEdit all entries of a given resource in a given namespace
kubectl edit resource [-n|--namespace] namespaceEdit a resource using a specific editor
KUBE_EDITOR=nano kubectl edit resource/resource_nameEdit a resource in JSON format
kubectl edit resource/resource_name [-o|--output] jsonmade by @shridhargupta | data from tldr-pages