ccictl set image
Scenario
Update existing container images of resources.
Possible resources include (case insensitive):
pods (po) and Deployments (deploy)
The command syntax is as follows:
ccictl set image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1 ... CONTAINER_NAME_N=CONTAINER_IMAGE_N
Examples
# Set a Deployment's nginx container image to 'nginx:1.9.1' and the busybox container image to 'busybox'. ccictl set image deployment/nginx busybox=busybox nginx=nginx:1.9.1 # Update all Deployments' nginx container image to 'nginx:1.9.1'. ccictl set image deployments nginx=nginx:1.9.1 --all # Update all container images of the abc Deployment to "nginx:1.9.1". ccictl set image deploy abc *=nginx:1.9.1 # Print result (in YAML format) of updating the nginx container image from the local file. No request is sent to the server. ccictl set image -f path/to/file.yaml nginx=nginx:1.9.1 --local -o yaml
Options
--all
If the value is true, all resources in the namespace of the specified resource type are selected.
--allow-missing-template-keys Default: true
If the value is true, the error in the template is ignored when a field or mapping key is missing in the template. This option applies only to the Golang and JSONPath output formats.
-f, --filename strings
List of file names, directories, or file URLs, which are used to identify the resources whose environments are to be updated.
-h, --help
Help information for set image
--local
If the value is true, set image will not communicate with the API server and will run locally.
-o, --output string
Output format. The value options include json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, and jsonpath-file.
-R, --recursive
Process the directory used in -f or --filename recursively. This option is useful when you want to manage related manifests organized within the same directory.
-l, --selector string
Selector used for filtering (label query). The value can be =, ==, or !=, for example, -l key1=value1,key2=value2. Matched objects must meet all specified label constraints.
--template string
Template character string or template file path used when -o is set to go-template or go-template-file. The Golang template format is [http://golang.org/pkg/text/template/#pkg-overview].
The following ccictl options can also be used in subcommands:
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot