Kubectl patch command accepts a filename param
This commit is contained in:
@@ -45,7 +45,7 @@ JSON and YAML formats are accepted.
|
||||
Please refer to the models in https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/HEAD/docs/api-reference/definitions.html to find if a field is mutable.
|
||||
|
||||
```
|
||||
kubectl patch TYPE NAME -p PATCH
|
||||
kubectl patch (-f FILENAME | TYPE NAME) -p PATCH
|
||||
```
|
||||
|
||||
### Examples
|
||||
@@ -55,6 +55,9 @@ kubectl patch TYPE NAME -p PATCH
|
||||
# Partially update a node using strategic merge patch
|
||||
kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}'
|
||||
|
||||
# Partially update a node identified by the type and name specified in "node.json" using strategic merge patch
|
||||
kubectl patch -f node.json -p '{"spec":{"unschedulable":true}}'
|
||||
|
||||
# Update a container's image; spec.containers[*].name is required because it's a merge key
|
||||
kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve-hostname","image":"new image"}]}}'
|
||||
```
|
||||
@@ -62,6 +65,7 @@ kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve
|
||||
### Options
|
||||
|
||||
```
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to update
|
||||
-h, --help[=false]: help for patch
|
||||
-o, --output="": Output mode. Use "-o name" for shorter output (resource/name).
|
||||
-p, --patch="": The patch to be applied to the resource JSON file.
|
||||
@@ -100,7 +104,7 @@ kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-12 21:51:38.836855054 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-08-13 02:12:21.577994505 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
Reference in New Issue
Block a user