mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-04 18:52:38 +00:00
Merge pull request #3537 from brendandburns/cli
Add inline JSON patching to kubectl update ...
This commit is contained in:
@@ -236,6 +236,9 @@ Examples:
|
||||
|
||||
$ cat pod.json | kubectl update -f -
|
||||
<update a pod based on the json passed into stdin>
|
||||
|
||||
$ kubectl update pods my-pod --patch='{ "apiVersion": "v1beta1", "desiredState": { "manifest": [{ "cpu": 100 }]}}'
|
||||
<update a pod by downloading it, applying the patch, then updating, requires apiVersion be specified>
|
||||
|
||||
Usage:
|
||||
```
|
||||
@@ -261,6 +264,7 @@ Usage:
|
||||
--match-server-version=false: Require server version to match client version
|
||||
-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.
|
||||
--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
|
||||
--stderrthreshold=2: logs at or above this threshold go to stderr
|
||||
--token="": Bearer token for authentication to the API server.
|
||||
@@ -882,10 +886,13 @@ Examples:
|
||||
|
||||
$ kubectl run-container nginx --image=dockerfile/nginx --dry-run
|
||||
<just print the corresponding API objects, don't actually send them to the apiserver>
|
||||
|
||||
$ kubectl run-container nginx --image=dockerfile/nginx --overrides='{ "apiVersion": "v1beta1", "desiredState": { ... } }'
|
||||
<start a single instance of nginx, but overload the desired state with a partial set of values parsed from JSON
|
||||
|
||||
Usage:
|
||||
```
|
||||
kubectl run-container <name> --image=<image> [--replicas=replicas] [--dry-run=<bool>] [flags]
|
||||
kubectl run-container <name> --image=<image> [--replicas=replicas] [--dry-run=<bool>] [--overrides=<inline-json>] [flags]
|
||||
|
||||
Available Flags:
|
||||
--alsologtostderr=false: log to standard error as well as files
|
||||
@@ -913,6 +920,7 @@ Usage:
|
||||
--ns-path="/home/username/.kubernetes_ns": Path to the namespace info file that holds the namespace context to use for CLI requests.
|
||||
-o, --output="": Output format: json|yaml|template|templatefile
|
||||
--output-version="": Output the formatted object with the given version (default api-version)
|
||||
--overrides="": An inline JSON override for the generated object. If this is non-empty, it is parsed used to override the generated object. Requires that the object supply a valid apiVersion field.
|
||||
-r, --replicas=1: Number of replicas to create for this container. Default 1
|
||||
-s, --server="": The address of the Kubernetes API server
|
||||
--stderrthreshold=2: logs at or above this threshold go to stderr
|
||||
|
Reference in New Issue
Block a user