1

tell me how to map an external resource as a service in openshift for use in ingress? OKD 3.11.

I am creating a service type ExternalName

apiVersion: v1
kind: Service
metadata:
  name: "sso"
  namespace: "test"
spec:
  type: ExternalName
  externalName: sso.test.org

Then I create a ingress

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: example
  namespace: test
spec:
  rules:
    - host: app.test.org
      http:
        paths:
          - path: /
            backend:
              serviceName: ui
              servicePort: 8080
          - path: /auth
            backend:
              serviceName: sso
              servicePort: 443
          - path: /api
            backend:
              serviceName: api
              servicePort: 8080

But I get the error "Application is not available" for /auth.

/api and / works fine.

What could be the mistake? I have a problem when accessing external ports with ssl. When accessing ports without ssl, no problems. It seems that haroute does not add https at the beginning of the address, and the request goes through http:// sso:443

  • Does this answer your question? [Kubernetes ingress rules for external service](https://stackoverflow.com/questions/61750709/kubernetes-ingress-rules-for-external-service) – kool Dec 31 '20 at 14:16
  • @MariuszK. No, I have a problem when accessing external ports with ssl. When accessing ports without ssl, no problems. It seems that haroute does not add https at the beginning of the address, and the request goes through http:// sso:443 – ExzoTikFruiT Jan 02 '21 at 09:22
  • Does it work when you create separate ingress and add [backend protocol annotation](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#backend-protocol)? – kool Jan 08 '21 at 11:48
  • @MariuszK.In the current version of the OKD, haproxy is used as a router, and, unfortunately, there are no such annotations – ExzoTikFruiT Jan 11 '21 at 13:10

0 Answers0