openshift内部docker注册表repo地址与docker-registry服务集群ip不同

时间:2017-06-12 10:49:06

标签: docker openshift

我在其中一个群集主服务器中的步骤: 创建路由器:

Declare @ConversationHandle as uniqueidentifier
Declare @MessageBody as nvarchar(max)
Declare @MessageType as sysname

Begin Transaction
Print 'Started Receiving ';

    RECEIVE top (1)
          @MessageType = message_type_name,
          @ConversationHandle = conversation_handle,
        @MessageBody = message_body
    FROM TargetQueue;

    if @MessageType = 'SenderMessageType'
          Begin
                SEND 
                      ON CONVERSATION @ConversationHandle
                      Message Type ReceiverMessageType
                      ('Message is received')
                END Conversation @ConversationHandle
          END

    Commit

创建docker注册表:

 # oadm router ose-router --replicas=1 --credentials='/etc/origin/master/openshift-router.kubeconfig' --images='openshift-register.com.cn:5000/openshift3/ose-${component}:v3.4' --service-account=router

路由器和注册表已成功创建,我们可以看到docker-registry cluster-IP地址为172.30.182.170:

  # oadm registry --config=/etc/origin/master/admin.kubeconfig --service-account=registry --images='openshift-register.com.cn:5000/openshift3/ose-${component}:v3.4'

查询名称空间openshift中的iamge词干,Docker repo IP为172.30.137.159:

# oc get svc
NAME               CLUSTER-IP       EXTERNAL-IP   PORT(S)                   AGE
docker-registry    172.30.182.170   <none>        5000/TCP                  22s
kubernetes         172.30.0.1       <none>        443/TCP,53/UDP,53/TCP     6d
ose-router         172.30.80.196    <none>        80/TCP,443/TCP,1936/TCP   1m

我的担忧和问题是docker repo IP地址默认应该使用我的docker-registry服务集群IP,但为什么它生成了一个新的IP地址,我不知道如何/在哪里找到这个docker repo IP地址?我真的是新的openshift用户,所以如果你能提出任何建议,将不胜感激。

# oc get is -n openshift
  NAME         DOCKER REPO                                TAGS                      
   jenkins      172.30.137.159:5000/openshift/jenkins      2,1                       
   mariadb      172.30.137.159:5000/openshift/mariadb      10.1                      
   mongodb      172.30.137.159:5000/openshift/mongodb      3.2,2.6,2.4               
   mysql        172.30.137.159:5000/openshift/mysql        5.7,5.6,5.5               
   nodejs       172.30.137.159:5000/openshift/nodejs       4,0.10                    
   perl         172.30.137.159:5000/openshift/perl         5.24,5.20,5.16            
   php          172.30.137.159:5000/openshift/php          5.5,7.0,5.6               
    postgresql   172.30.137.159:5000/openshift/postgresql   9.5,9.4,9.2               
    python       172.30.137.159:5000/openshift/python       3.4,3.3,2.7 + 
    more...
    redis        172.30.137.159:5000/openshift/redis        3.2                       
    ruby         172.30.137.159:5000/openshift/ruby         2.3,2.2,2.0

0 个答案:

没有答案