项目内的openshiftv3服务url连接失败

项目内的openshiftv3服务url连接失败,openshift,kubernetes,openshift-enterprise,Openshift,Kubernetes,Openshift Enterprise,我刚刚开始使用OpenShift v3。我一直在寻找使用openshift上的jenkins、nexus和sonarqube建立ci/cd管道的示例。我发现了这个很好的示例项目,但不幸的是,我无法让它工作。可在以下位置找到该项目: 我遇到的问题是,一旦jenkins作业启动,它将尝试使用以下url:nexus:8081连接到nexus服务。此url由以下部分使用openshift模板组成: # Sonatype Nexus - apiVersion: v1 kind: Service m

我刚刚开始使用OpenShift v3。我一直在寻找使用openshift上的jenkins、nexus和sonarqube建立ci/cd管道的示例。我发现了这个很好的示例项目,但不幸的是,我无法让它工作。可在以下位置找到该项目:

我遇到的问题是,一旦jenkins作业启动,它将尝试使用以下url:nexus:8081连接到nexus服务。此url由以下部分使用openshift模板组成:

# Sonatype Nexus
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      description: Sonatype Nexus repository manager's http port
    labels:
      app: nexus
    name: **nexus**
  spec:
    ports:
    - name: web
      port: **8081**
      protocol: TCP
      targetPort: 8081
    selector:
      app: nexus
      deploymentconfig: nexus
    sessionAffinity: None
    type: ClusterIP
然而,jenkins(在与nexus相同的项目中,在openshift上作为pod运行)似乎无法连接到url,并显示以下内容:

Connect to nexus:8081 [nexus/172.30.190.210] failed: Connection refused @ line 81, column 25

知道发生了什么吗?

我现在已经解决了这个问题,在项目的settings.xml中添加了完整的dns名称。所以在我的情况下是这样的:这是有效的。