Skip to content

Commit

Permalink
Merge pull request kubernetes#26581 from caesarxuchao/continue-25746
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

fix kubectl patch example

Based on kubernetes#25746, fix the kubectl example.

cc @tobstarr
  • Loading branch information
k8s-merge-robot committed Jun 2, 2016
2 parents a270581 + 216649b commit 8c66ffb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/man/man1/kubectl-patch.1
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ kubectl patch \-f node.json \-p '{"spec":{"unschedulable":true}}'
kubectl patch pod valid\-pod \-p '{"spec":{"containers":[{"name":"kubernetes\-serve\-hostname","image":"new image"}]}}'

# 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"}]'
kubectl patch pod valid\-pod \-\-type='json' \-p='[{"op": "replace", "path": "/spec/containers/0/image", "value":"new image"}]'

.fi
.RE
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/kubectl/kubectl_patch.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ kubectl patch -f node.json -p '{"spec":{"unschedulable":true}}'
kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve-hostname","image":"new image"}]}}'
# 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"}]'
kubectl patch pod valid-pod --type='json' -p='[{"op": "replace", "path": "/spec/containers/0/image", "value":"new image"}]'
```

### Options
Expand Down Expand Up @@ -110,7 +110,7 @@ kubectl patch pod valid-pod -type='json' -p='[{"op": "replace", "path": "/spec/c

* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager

###### Auto generated by spf13/cobra on 30-Mar-2016
###### Auto generated by spf13/cobra on 31-May-2016

<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_patch.md?pixel)]()
Expand Down
2 changes: 1 addition & 1 deletion docs/yaml/kubectl/kubectl_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,6 @@ example: |2-
kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve-hostname","image":"new image"}]}}'
# 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"}]'
kubectl patch pod valid-pod --type='json' -p='[{"op": "replace", "path": "/spec/containers/0/image", "value":"new image"}]'
see_also:
- kubectl
2 changes: 1 addition & 1 deletion pkg/kubectl/cmd/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ kubectl patch -f node.json -p '{"spec":{"unschedulable":true}}'
kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve-hostname","image":"new image"}]}}'
# 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"}]'`
kubectl patch pod valid-pod --type='json' -p='[{"op": "replace", "path": "/spec/containers/0/image", "value":"new image"}]'`
)

func NewCmdPatch(f *cmdutil.Factory, out io.Writer) *cobra.Command {
Expand Down

0 comments on commit 8c66ffb

Please sign in to comment.