
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 []()
PLEASE NOTE: This document applies to the HEAD of the source tree
If you are using a released version of Kubernetes, you should refer to the docs that go with that version.
The latest release of this document can be found [here](http://releases.k8s.io/release-1.2/docs/README.md).Documentation for other releases can be found at releases.k8s.io.
Kubernetes Documentation: releases.k8s.io/HEAD
-
The User's guide is for anyone who wants to run programs and services on an existing Kubernetes cluster.
-
The Cluster Admin's guide is for anyone setting up a Kubernetes cluster or administering it.
-
The Developer guide is for anyone wanting to write programs that access the Kubernetes API, write plugins or extensions, or modify the core code of Kubernetes.
-
The Kubectl Command Line Interface is a detailed reference on the
kubectl
CLI. -
The API object documentation is a detailed description of all fields found in core API objects.
-
An overview of the Design of Kubernetes
-
There are example files and walkthroughs in the examples folder.
-
If something went wrong, see the troubleshooting document for how to debug. You should also check the known issues for the release you're using.
-
To report a security issue, see Reporting a Security Issue.