Task
Update, or create if necessary, all tags that have been updated on the source registry that are not yet in the OCP and have it periodically update.
Afterwards, update one of the tags (releases) as latest in OCP.
Note:
- If the remote private registry requires authentication, use podman to create account. See further below.
Steps:
1. Create an imagestream in OCP locally with all tags from a remote registry:
$ oc login -u <accountid> <apiendpoint>
<enter password>
$ oc project <projectname>
<confirm using project desired>
$ oc import-image <localimagestream> --confirm --scheduled=true --all --from registryname.mindwatering.net/<namespace>/<image>
<wait and confirm import>
2. If one of the tags is not already latest, tag the one desired to be latest:
$ oc tag <localimagestream>:<tagversion> <localimagestream>:latest
<confirm output>
Use Podman to Create Private Registry Secret
$ podman login -u <accountid> registry.mindwatering.net
<enter password>
$ oc create secret generic regtoken --from-file .dockerconfigjson=${XDG_RUNTIME_DIR}/containers/auth.json --type kubernetes.io/dockerconfigjson
<confirm created okay>
Note:
- At this point continue with the oc import-image command desired.
previous page
|