direct people to api-reference/definitions.html to find out if a field is mutable through kubectl replace/patch

This commit is contained in:
Chao Xu
2015-07-13 13:46:51 -07:00
parent b280549930
commit 17cd3cf392
6 changed files with 30 additions and 5 deletions

View File

@@ -42,6 +42,8 @@ Update field(s) of a resource using strategic merge patch
JSON and YAML formats are accepted.
Please refer to the models in https://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/HEAD/docs/api-reference/definitions.html to find if a field is mutable.
```
kubectl patch RESOURCE NAME -p PATCH
```
@@ -52,6 +54,9 @@ kubectl patch RESOURCE NAME -p PATCH
// Partially update a node using strategic merge patch
kubectl patch node k8s-node-1 -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"}]}}'
```
### Options
@@ -95,7 +100,7 @@ kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}'
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-07-14 00:11:42.956026887 +0000 UTC
###### Auto generated by spf13/cobra at 2015-08-01 00:12:16.314479678 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->

View File

@@ -42,6 +42,8 @@ Replace a resource by filename or stdin.
JSON and YAML formats are accepted.
Please refer to the models in https://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/HEAD/docs/api-reference/definitions.html to find if a field is mutable.
```
kubectl replace -f FILENAME
```
@@ -104,7 +106,7 @@ kubectl replace --force -f ./pod.json
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-07-16 22:39:16.132838722 +0000 UTC
###### Auto generated by spf13/cobra at 2015-08-01 00:12:16.314376117 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->