Skip to content

Instantly share code, notes, and snippets.

@ghatwala
Created September 17, 2020 06:45
Show Gist options
  • Save ghatwala/27a0ff4f13e0889c640b76a837e6efad to your computer and use it in GitHub Desktop.
Save ghatwala/27a0ff4f13e0889c640b76a837e6efad to your computer and use it in GitHub Desktop.
$ kinit
Password for aghatwal@REDHAT.COM:
$ brew hello
hylô, aghatwal!
You are using the hub at https://brewhub.engineering.redhat.com/brewhub
Authenticated via GSSAPI
$ oc login https://<cluster api url>:6443
$ oc project default
Now using project "default" on server "https://<cluster api url>:6443".
$ oc patch configs.imageregistry.operator.openshift.io/cluster --patch '{"spec":{"defaultRoute":true}}' --type=merge
config.imageregistry.operator.openshift.io/cluster patched (no change)
$ HOST=$(oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}')
$ echo $HOST
default-route-openshift-image-registry.apps.amitg1-217e.ibm.com
$ podman login -u kubeadm -p $(oc whoami -t) --tls-verify=false $HOST
Login Succeeded!
$ podman pull docker://registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-logging-fluentd:v4.6.0-202008290336.p0
Trying to pull docker://registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-logging-fluentd:v4.6.0-202008290336.p0...
Getting image source signatures
Copying blob 4fde40709340 skipped: already exists
Copying blob 47db82df7f3f skipped: already exists
Copying blob 77c58f19bd6e skipped: already exists
Copying blob 6cc5487eb078 skipped: already exists
Copying blob 71391dc11a78 skipped: already exists
Copying blob 881083a6e761 skipped: already exists
Copying blob 1aacf5bf3e87 [--------------------------------------] 0.0b / 0.0b
Copying config ee842f10eb done
Writing manifest to image destination
Storing signatures
ee842f10eb3455451d3e7a37d74638687fec5b0a8492512e4804e4b7372d47ed
$ podman tag registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-logging-fluentd:v4.6.0-202008290336.p0 $HOST/default/openshift-ose-logging-fluentd-multiarch
$ podman push docker://default-route-openshift-image-registry.apps.amitg1-217e.ibm.com/default/openshift-ose-logging-fluentd-multiarch --tls-verify=false
Getting image source signatures
Copying blob 0bfe5b62a1ad skipped: already exists
Copying blob 70056249a0e2 skipped: already exists
Copying blob af845c5fded6 skipped: already exists
Copying blob 7fbe9fcfa2da skipped: already exists
Copying blob c3e7435fb701 skipped: already exists
Copying blob 226bfaae015f skipped: already exists
Copying blob 6d9a4312b22a [--------------------------------------] 0.0b / 0.0b
Copying config ee842f10eb done
Writing manifest to image destination
Storing signatures
$ oc get is -n default
NAME IMAGE REPOSITORY TAGS UPDATED
openshift-ose-logging-fluentd-multiarch default-route-openshift-image-registry.apps.amitg1-217e.ibm.com/default/openshift-ose-logging-fluentd-multiarch latest 30 seconds ago
Noe trying this with skopeo
$ skopeo login -u kubeadm -p $(oc whoami -t) --tls-verify=false $HOST
Login Succeeded!
$ skopeo copy docker://registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-logging-fluentd:v4.6.0-202008290336.p0 docker://default-route-openshift-image-registry.apps.amitg1-217e.ibm.com/default/openshift-ose-logging-fluentd-multiarch --dest-tls-verify=false
Getting image source signatures
Copying blob 4fde40709340 skipped: already exists
Copying blob 881083a6e761 skipped: already exists
Copying blob 77c58f19bd6e skipped: already exists
Copying blob 47db82df7f3f skipped: already exists
Copying blob 71391dc11a78 skipped: already exists
Copying blob 6cc5487eb078 skipped: already exists
Copying blob 1aacf5bf3e87 [--------------------------------------] 0.0b / 0.0b
Copying config ee842f10eb [--------------------------------------] 0.0b / 7.5KiB
Writing manifest to image destination
Storing signatures
$ oc get is -n default
NAME IMAGE REPOSITORY TAGS UPDATED
openshift-ose-logging-fluentd-multiarch default-route-openshift-image-registry.apps.amitg1-217e.ibm.com/default/openshift-ose-logging-fluentd-multiarch latest 11 seconds ago
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment