首页 > 解决方案 > OpenShift RestAPI 等效于 oc 标签

问题描述

OpenShift RestAPI 相当于oc tag some.docker.regiery some-image-tag:latest什么?

从帮助页面:

Tag existing images into image streams 

The tag command allows you to take an existing tag or image from an image stream, or a Docker image pull spec, and set
it as the most recent image for a tag in 1 or more other image streams. It is similar to the 'docker tag' command, but
it operates on image streams instead. 

Pass the --insecure flag if your external registry does not have a valid HTTPS certificate, or is only served over HTTP.
Pass --scheduled to have the server regularly check the tag for updates and import the latest version (which can then
trigger builds and deployments). Note that --scheduled is only allowed for Docker images.

Usage:
  oc tag [--source=SOURCETYPE] SOURCE DEST [DEST ...] [flags]

标签: restdockeropenshift

解决方案


回答我自己的问题以供将来参考:像在 cli 上一样运行命令,但添加--loglevel=8. (即oc tag some.docker.regiery some-image-tag:latest --loglevel=8)。

然后您可以准确地看到使用了哪些 API 调用以及使用了哪些参数,并且您可以复制它!:)


推荐阅读