This message was deleted.
# rke2
a
This message was deleted.
p
Why do you need an external loadbalancer if you're using an Ingress?
If you need to support multiple services, you can just add rules to the Ingress controller, no?
s
because everything behind the external LB is in a private subnet. I can't set the DNS to point to something in a private subnet
DNS currently point to the LB, which then passes the request to the private subnet
The ingress is setup as follows:
Copy code
apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: Ingress
metadata:
  name: webapp
  namespace: bare
spec:
  rules:
  - host: webapp10165.senode.dev
    http:
      paths:
      - path: /cam1
        backend:
          service:
            name: inference-service-1
            port:
              number: 5000
        pathType: ImplementationSpecific
      - path: /cam2
        backend:
          service:
            name: inference-service-2
            port:
              number: 5000
        pathType: ImplementationSpecific
  tls:
  - hosts:
    - sgs-wrk1
    - sgs-wrk2
    secretName: tls-sec
If I set the path to "/" then I can reach one of the services, but if I want to reach either then I need to set specific paths and get a "404 Not Found"
Seems the requests are reaching the pod, but because of the path they return 404.
Copy code
172.16.1.20 - - [07/Jun/2023:04:26:25 +0000] "GET /cam1 HTTP/2.0" 404 13 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36" 453 0.004 [bare-inference-service-1-5000] [] 10.42.172.79:5000 13 0.004 404 fe509cad820cc46f6e67a4293ff901e2
g
Point it to the workers nodes of your downstream cluster. Usually round-robin based
s
That’s what I did and it works, but wanted to confirm. The second issue is with using a path in the URL. It seems if I use “/“ the I can reach the service. I think in the Ingres I need to rewrite-target, but exactly how I remove /cam1 or /cam2 is something I am trying to figure out.