Commit 3572ed18 authored by Brendan Burns's avatar Brendan Burns

Addressed comments.

parent ae885217
...@@ -237,8 +237,8 @@ Examples: ...@@ -237,8 +237,8 @@ Examples:
$ cat pod.json | kubectl update -f - $ cat pod.json | kubectl update -f -
<update a pod based on the json passed into stdin> <update a pod based on the json passed into stdin>
$ kubectl update pods my-pod --patch='{ "labels": { "foo": "bar" } }' $ kubectl update pods my-pod --patch='{ "apiVersion": "v1beta1", "desiredState": { "manifest": [{ "cpu": 100 }]}}'
<update a pod by downloading it, applying the patch, then updating> <update a pod by downloading it, applying the patch, then updating, requires apiVersion be specified>
Usage: Usage:
``` ```
...@@ -264,7 +264,7 @@ Usage: ...@@ -264,7 +264,7 @@ Usage:
--match-server-version=false: Require server version to match client version --match-server-version=false: Require server version to match client version
-n, --namespace="": If present, the namespace scope for this CLI request. -n, --namespace="": If present, the namespace scope for this CLI request.
--ns-path="/home/username/.kubernetes_ns": Path to the namespace info file that holds the namespace context to use for CLI requests. --ns-path="/home/username/.kubernetes_ns": Path to the namespace info file that holds the namespace context to use for CLI requests.
--patch="": A JSON document to override the existing resource. The resource is downloaded, then patched with the JSON, the re-updated --patch="": A JSON document to override the existing resource. The resource is downloaded, then patched with the JSON, the updated
-s, --server="": The address of the Kubernetes API server -s, --server="": The address of the Kubernetes API server
--stderrthreshold=2: logs at or above this threshold go to stderr --stderrthreshold=2: logs at or above this threshold go to stderr
--token="": Bearer token for authentication to the API server. --token="": Bearer token for authentication to the API server.
......
...@@ -39,8 +39,8 @@ Examples: ...@@ -39,8 +39,8 @@ Examples:
$ cat pod.json | kubectl update -f - $ cat pod.json | kubectl update -f -
<update a pod based on the json passed into stdin> <update a pod based on the json passed into stdin>
$ kubectl update pods my-pod --patch='{ "labels": { "foo": "bar" } }' $ kubectl update pods my-pod --patch='{ "apiVersion": "v1beta1", "desiredState": { "manifest": [{ "cpu": 100 }]}}'
<update a pod by downloading it, applying the patch, then updating>`, <update a pod by downloading it, applying the patch, then updating, requires apiVersion be specified>`,
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
filename := GetFlagString(cmd, "filename") filename := GetFlagString(cmd, "filename")
patch := GetFlagString(cmd, "patch") patch := GetFlagString(cmd, "patch")
...@@ -60,7 +60,7 @@ Examples: ...@@ -60,7 +60,7 @@ Examples:
}, },
} }
cmd.Flags().StringP("filename", "f", "", "Filename or URL to file to use to update the resource") cmd.Flags().StringP("filename", "f", "", "Filename or URL to file to use to update the resource")
cmd.Flags().String("patch", "", "A JSON document to override the existing resource. The resource is downloaded, then patched with the JSON, the re-updated") cmd.Flags().String("patch", "", "A JSON document to override the existing resource. The resource is downloaded, then patched with the JSON, the updated")
return cmd return cmd
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment