openshift鎼缓绉佹湁registry

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了openshift鎼缓绉佹湁registry相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/%e4%b8%8b%e8%bd%bd' title='涓嬭浇'>涓嬭浇   鐩稿叧淇℃伅   鐜鍙橀噺   shift   main   鏂囦欢   tps   rom   鏇存柊   

2銆佷慨鏀筽ullsecret

鍦ㄥ彈闄愮綉缁滃畨瑁匫CP锛岄渶瑕佸皢绉佹湁闀滃儚registry鐨勭浉鍏充俊鎭洿鏂板埌pullsecret銆?/p>

锛?锛変粠https://cloud.redhat.com/openshift/install/pull-secret涓嬭浇pullsecret

cat << 'EOF' > /opt/registry/certs/pull-secret.txt
{"auths":{"cloud.openshift.com":{鐪佺暐}}}
EOF

锛?锛夊皢1姝ュ垱寤簉egistry鏈嶅姟鏃朵娇鐢ㄧ殑鐢ㄦ埛鍚峔瀵嗙爜杞崲鎴恇ase64缂栫爜鐨則oken

[root@misc certs]# echo -n 'root:Scwang18' | base64 -w0
cm9vdDpTY3dhbmcxOA==
[root@misc certs]#

锛?锛夊皢pullsecret鏍煎紡杞崲鎴恓son锛屼究浜庡鍔犺嚜宸辩殑绉佹湁registrt

cat ./pull-secret.txt | jq .  > ./pull-secret.json

锛?锛夊皢绉佹湁mirror registry娣诲姞鍒皃ull-secret.json

[root@misc certs]# cat pull-secret.json
{
  "auths": {
    "cloud.openshift.com": {      
      "auth": "鐪佺暐",
      "email": "鐪佺暐"
    },
    "quay.io": {      
      "auth": "鐪佺暐",
      "email": "鐪佺暐"

    },
    "registry.connect.redhat.com": {
      "auth": "鐪佺暐",
      "email": "鐪佺暐"

    },
    "registry.redhat.io": {
      "auth": "鐪佺暐",
      "email": "scwang18@163.com"
    },
    "registry.ipincloud.com:5000": {
      "auth": "cm9vdDpTY3dhbmcxOA==",
      "email": "scwang18@163.com"
    }
  }
}
[root@misc certs]#

3銆佸悓姝cp闀滃儚浠撳簱鍒扮鏈塺egistry

锛?锛夎缃畆egistry鐜鍙橀噺

export OCP_RELEASE=4.3.0
export LOCAL_REGISTRY='registry.ipincloud.com:5000' 
export LOCAL_REPOSITORY='ocp4/openshift4' 
export PRODUCT_REPO='openshift-release-dev' 
export LOCAL_SECRET_JSON='/opt/registry/certs/pull-secret.json' 
export RELEASE_NAME="ocp-release" 

锛?锛夊紑濮嬮暅鍍?/p>

oc adm release mirror -a ${LOCAL_SECRET_JSON}      --from=quay.io/${PRODUCT_REPO}/${RELEASE_NAME}:${OCP_RELEASE}-x86_64      --to=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}      --to-release-image=${LOCAL_REGISTRY}/${LOCAL_REPOSITORY}:${OCP_RELEASE}
     
oc adm release mirror -a /opt/registry/certs/pull-secret.json --from=quay.io/openshift-release-dev/ocp-release:4.3.0-x86_64 --to-release-image=registry.ipincloud.com:5000/ocp4/openshift4:4.3.0 --to=registry.ipincloud.com:5000/ocp4/openshift4     

锛?锛夊悓姝ュ畬鎴愬悗锛岃褰曞畬鎴愪俊鎭紝鍦ㄩ泦缇や腑浣跨敤

4銆佸畬鎴?/h1>

以上是关于openshift鎼缓绉佹湁registry的主要内容,如果未能解决你的问题,请参考以下文章

pod绉佹湁搴撹祫婧愭墦鍖呭強浣跨敤

OwnCloud寤虹珛灞炰簬鑷繁绉佹湁鐨勪簯瀛樺偍缃戠洏

OpenShift image registry 概述

OpenShift image registry 访问镜像

闈㈠悜瀵硅薄

openshift origin v0.3.3 在 centos 6.6 上启动 docker registry pod 时出错