Merge pull request #116512 from aditya-K2/docs-edit

update `kubectl edit` documentation

Kubernetes-commit: 0471518d500fd181c93ffc3fa67765abd6dddff9
This commit is contained in:
Kubernetes Publisher 2023-04-25 18:18:15 -07:00
commit 2ea3808528
3 changed files with 8 additions and 4 deletions

4
go.mod
View File

@ -33,7 +33,7 @@ require (
k8s.io/api v0.0.0-20230425174508-34a8caec8792
k8s.io/apimachinery v0.0.0-20230425174017-478f0974b2e7
k8s.io/cli-runtime v0.0.0-20230425185849-b5c1ebe353ed
k8s.io/client-go v0.0.0-20230425175111-b26f379fe1e8
k8s.io/client-go v0.0.0-20230425180616-6c514ab3ffc5
k8s.io/component-base v0.0.0-20230425180508-25833dc857cd
k8s.io/component-helpers v0.0.0-20230425181106-6f40a0f5eeff
k8s.io/klog/v2 v2.90.1
@ -97,7 +97,7 @@ replace (
k8s.io/api => k8s.io/api v0.0.0-20230425174508-34a8caec8792
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230425174017-478f0974b2e7
k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20230425185849-b5c1ebe353ed
k8s.io/client-go => k8s.io/client-go v0.0.0-20230425175111-b26f379fe1e8
k8s.io/client-go => k8s.io/client-go v0.0.0-20230425180616-6c514ab3ffc5
k8s.io/code-generator => k8s.io/code-generator v0.0.0-20230425173437-fcf383781ba5
k8s.io/component-base => k8s.io/component-base v0.0.0-20230425180508-25833dc857cd
k8s.io/component-helpers => k8s.io/component-helpers v0.0.0-20230425181106-6f40a0f5eeff

4
go.sum
View File

@ -546,8 +546,8 @@ k8s.io/apimachinery v0.0.0-20230425174017-478f0974b2e7 h1:kc4xpkjTIwj4xzt2kaydYo
k8s.io/apimachinery v0.0.0-20230425174017-478f0974b2e7/go.mod h1:8pvYyRbWovK8tOF+ubfyUBX6aGREZx9m61vDDA9aDTU=
k8s.io/cli-runtime v0.0.0-20230425185849-b5c1ebe353ed h1:0wR7H7zLMFIdc69UjxUa/DwzOUxJDfwkrRUaQ/XdRc0=
k8s.io/cli-runtime v0.0.0-20230425185849-b5c1ebe353ed/go.mod h1:aGzUf6KSNDn0w5QFeMTFhFMkLk0otyDH3sevbMKj7kg=
k8s.io/client-go v0.0.0-20230425175111-b26f379fe1e8 h1:7GcOltVNtdBJimMQW44pnJYxZQuNqtvurfzJz5krcXA=
k8s.io/client-go v0.0.0-20230425175111-b26f379fe1e8/go.mod h1:mOtwcrxgBPCkq+D7sTFzZU6AtYLwM5e3yb7ZOL8Jo4A=
k8s.io/client-go v0.0.0-20230425180616-6c514ab3ffc5 h1:tbzR21/s+ZwDPnhanVzRFEhfCkxQGNPP2vDrQJWCRdM=
k8s.io/client-go v0.0.0-20230425180616-6c514ab3ffc5/go.mod h1:mOtwcrxgBPCkq+D7sTFzZU6AtYLwM5e3yb7ZOL8Jo4A=
k8s.io/component-base v0.0.0-20230425180508-25833dc857cd h1:B08ilgekcDw06evInMZEb3QBb3P56QwiiZ+0GgY42nY=
k8s.io/component-base v0.0.0-20230425180508-25833dc857cd/go.mod h1:/xqjhhBDsK5gm+edxsyMtzFn22ruDQedvXFBEH3IfmA=
k8s.io/component-helpers v0.0.0-20230425181106-6f40a0f5eeff h1:dpmVZyRMay/1cq1AzMZOlAx/HONVd3Uk2jNAlZPKLig=

View File

@ -35,6 +35,10 @@ var (
The edit command allows you to directly edit any API resource you can retrieve via the
command-line tools. It will open the editor defined by your KUBE_EDITOR, or EDITOR
environment variables, or fall back to 'vi' for Linux or 'notepad' for Windows.
When attempting to open the editor, it will first attempt to use the shell
that has been defined in the 'SHELL' environment variable. If this is not defined,
the default shell will be used, which is '/bin/bash' for Linux or 'cmd' for Windows.
You can edit multiple objects, although changes are applied one at a time. The command
accepts file names as well as command-line arguments, although the files you point to must
be previously saved versions of resources.