Files
kubernetes/pkg/kubectl
k8s-merge-robot 2c471bce4e Merge pull request #25509 from janetkuo/kubectl-set-image
Automatic merge from submit-queue

Add 'kubectl set image'

```release-note
Add "kubectl set image" for easier updating container images (for pods or resources with pod templates). 
```

**Usage:**
```
kubectl set image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1 ... CONTAINER_NAME_N=CONTAINER_IMAGE_N
```
**Example:**
```console 
# Set a deployment's nginx container image to 'nginx:1.9.1', and its busybox container image to 'busybox'.
$ kubectl set image deployment/nginx busybox=busybox nginx=nginx:1.9.1

# Update all deployments' nginx container's image to 'nginx:1.9.1'
$ kubectl set image deployments nginx=nginx:1.9.1 --all

# Update image of all containers of daemonset abc to 'nginx:1.9.1'
$ kubectl set image daemonset abc *=nginx:1.9.1

# Print result (in yaml format) of updating nginx container image from local file, without hitting the server 
$ kubectl set image -f path/to/file.yaml nginx=nginx:1.9.1 --local -o yaml
```

I abandoned the `--container=xxx --image=xxx` flags in the [deploy proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/deploy.md#kubectl-set) since it's much easier to use with just KEY=VALUE (CONTAINER_NAME=CONTAINER_IMAGE) pairs. 

Ref #21648 
@kubernetes/kubectl @bgrant0607 @kubernetes/sig-config 


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-20 07:13:45 -07:00
..
2016-05-13 12:41:40 -07:00
2016-02-18 21:24:21 -05:00
2016-05-12 00:07:07 -04:00
2016-05-07 10:06:13 -04:00
2016-05-10 09:55:14 -07:00
2016-03-02 20:46:32 -05:00
2016-05-10 13:49:39 -07:00
2016-05-19 08:41:43 -04:00
2016-04-29 17:12:10 -04:00
2016-04-29 17:12:10 -04:00
2016-02-18 21:24:21 -05:00
2016-05-12 00:07:07 -04:00
2015-08-05 17:30:03 -07:00
2016-04-29 17:12:10 -04:00
2016-04-29 17:12:10 -04:00
2015-08-05 17:30:03 -07:00