mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-05 06:55:45 +00:00
Update cheatsheets
This commit is contained in:
29
kubectl-edit
Normal file
29
kubectl-edit
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# kubectl edit
|
||||
|
||||
> Edit Kubernetes resources.
|
||||
> More information: <https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#edit>.
|
||||
|
||||
- Edit a pod:
|
||||
|
||||
`kubectl edit pod/{{pod_name}}`
|
||||
|
||||
- Edit a deployment:
|
||||
|
||||
`kubectl edit deployment/{{deployment_name}}`
|
||||
|
||||
- Edit a service:
|
||||
|
||||
`kubectl edit svc/{{service_name}}`
|
||||
|
||||
- Edit a resource using a specific editor:
|
||||
|
||||
`KUBE_EDITOR={{nano}} kubectl edit {{resource}}/{{resource_name}}`
|
||||
|
||||
- Edit a resource in JSON format:
|
||||
|
||||
`kubectl edit {{resource}}/{{resource_name}} --output json`
|
||||
Reference in New Issue
Block a user