Refdocs for 1.2 import
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
---
|
||||
layout: docwithnav
|
||||
title: "kubectl patch"
|
||||
---
|
||||
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
|
||||
|
||||
|
||||
@@ -9,7 +5,7 @@ title: "kubectl patch"
|
||||
|
||||
## kubectl patch
|
||||
|
||||
Update field(s) of a resource by stdin.
|
||||
Update field(s) of a resource using strategic merge patch.
|
||||
|
||||
### Synopsis
|
||||
|
||||
@@ -18,18 +14,15 @@ Update field(s) of a resource using strategic merge patch
|
||||
|
||||
JSON and YAML formats are accepted.
|
||||
|
||||
Please refer to the models in http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html to find if a field is mutable.
|
||||
Please refer to the models in https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/blob/release-1.2/docs/api-reference/v1/definitions.html to find if a field is mutable.
|
||||
|
||||
```
|
||||
{% raw %}
|
||||
kubectl patch (-f FILENAME | TYPE NAME) -p PATCH
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```
|
||||
{% raw %}
|
||||
|
||||
# Partially update a node using strategic merge patch
|
||||
kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}'
|
||||
@@ -39,27 +32,28 @@ 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"}]}}'
|
||||
{% endraw %}
|
||||
|
||||
# Update a container's image using a json patch with positional arrays
|
||||
kubectl patch pod valid-pod -type='json' -p='[{"op": "replace", "path": "/spec/containers/0/image", "value":"new image"}]'
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
{% raw %}
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to update
|
||||
-o, --output="": Output mode. Use "-o name" for shorter output (resource/name).
|
||||
-p, --patch="": The patch to be applied to the resource JSON file.
|
||||
{% endraw %}
|
||||
--record[=false]: Record current kubectl command in the resource annotation.
|
||||
--type="strategic": The type of patch being provided; one of [json merge strategic]
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
{% raw %}
|
||||
--alsologtostderr[=false]: log to standard error as well as files
|
||||
--api-version="": The API version to use when talking to the server
|
||||
--certificate-authority="": Path to a cert. file for the certificate authority.
|
||||
--client-certificate="": Path to a client key file for TLS.
|
||||
--client-certificate="": Path to a client certificate file for TLS.
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
--cluster="": The name of the kubeconfig cluster to use
|
||||
--context="": The name of the kubeconfig context to use
|
||||
@@ -79,14 +73,13 @@ kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve
|
||||
--username="": Username for basic authentication to the API server.
|
||||
--v=0: log level for V logs
|
||||
--vmodule=: comma-separated list of pattern=N settings for file-filtered logging
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
### SEE ALSO
|
||||
|
||||
* [kubectl](kubectl.html) - kubectl controls the Kubernetes cluster manager
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-11-27 14:20:04.942303171 +0000 UTC
|
||||
###### Auto generated by spf13/cobra on 12-Feb-2016
|
||||
|
||||
|
||||
|
||||
@@ -98,4 +91,3 @@ kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user