【问题标题】:Running two applications on Openshift 4.5 cluster在 Openshift 4.5 集群上运行两个应用程序
【发布时间】:2021-03-01 16:15:58
【问题描述】:

我必须在 Openshift 集群上运行两个 Web 应用程序。 但只有最先提出的那个是可访问的, 另一个给出Application is not available 错误。 我为他们使用了两种不同的服务并使用了 oc expose service servicename 命令使它们公开可用。该路由使用reencrypt tls 终止类型。

apiVersion: v1
kind: Service
metadata:
   annotations:
     service.alpha.openshift.io/serving-cert-secret-name: service-certs
   name: webapp1
   labels:
   app: webapp1
spec:
  ports:
  - name: 8443-tcp
    port: 8443
    protocol: TCP
    targetPort: 8443
 selector:
   app: webapp1
---
kind: Route
apiVersion: route.openshift.io/v1
metadata:
  name: webapp1
  labels:
    app: webapp1
spec:
  port:
    targetPort: 8443-tcp
    tls:
      termination: reencrypt
    to:
      kind: Service
      name: webapp1

webapp1 替换为webapp2 以创建应用程序webapp2 的服务和路由。只有最先运行的那个在工作。这是在 AWS 云上。如果我使用edge tls,我可以访问失败的那个,为此我必须将 webapp 设为 http。

必须做什么才能访问它们,使用reencrypt 路由类型或不更改为http 的任何其他方式?

【问题讨论】:

    标签: web-applications openshift


    【解决方案1】:

    我已通过在注释中为秘密使用不同的名称来修复它。相同的秘密名称service-certs 是问题所在。我正在使用存储在容器中的密钥和证书来生成密钥库,该密钥库是从 webapp 中使用的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-02-17
      • 2021-11-30
      • 1970-01-01
      • 1970-01-01
      • 2018-09-28
      • 1970-01-01
      • 1970-01-01
      • 2020-04-21
      相关资源
      最近更新 更多