https://rancher.com/ logo
#k3s
Title
# k3s
a

adamant-kite-43734

08/21/2022, 6:10 PM
This message was deleted.
1
k

kind-nightfall-56861

08/22/2022, 8:29 AM
A small example of my Ingress configuration. It does use Let's Encrypt to create the HTTPS endpoints, so you might have to either adapt the configuration or implement it the same way:
Copy code
---
apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: Ingress
metadata:
  name: cloudflare-webapp
  annotations:
    <http://kubernetes.io/ingress.class|kubernetes.io/ingress.class>: "traefik"
    <http://cert-manager.io/cluster-issuer|cert-manager.io/cluster-issuer>: letsencrypt-prod
spec:
  rules:
  - host: <http://cloudflare.krakensoftware.eu|cloudflare.krakensoftware.eu>
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: cloudflare-webapp-np
            port:
              number: 80
  tls:
  - hosts:
    - <http://cloudflare.krakensoftware.eu|cloudflare.krakensoftware.eu>
    secretName: cloudflare-krakensoftware-eu-tls
I see small differences, but I feel like there is something with your nodeport that results in it not working.
c

chilly-telephone-51989

08/22/2022, 8:56 AM
is providing a host necessary? I'm running it on local machine so can't have host name it's only localhost
k

kind-nightfall-56861

08/22/2022, 8:59 AM
I thougth it was, but I checked the Rancher GUI, and it did not show the requirement. But from what I know, Ingress is primarily used to translate requested hostnames to specific pods. In that way, it kind of feels strange to not require a hostname.
c

chilly-telephone-51989

08/22/2022, 9:01 AM
how would I test the things using k3s on my local machine? ingress does run on my IP, it's just that it's not forwarding anything to gateway and it says 502 Bad gateway. not sure where the problem is in ingress file
k

kind-nightfall-56861

08/22/2022, 9:02 AM
Just to doublecheck, you have verified all kube-system pods are running and in the correct state?
+
c

chilly-telephone-51989

08/22/2022, 10:02 AM
not only they are running in the correct state, I can call the rest api of these pods from each other, I entered one pod used wget to issue commands to the other pods. all fine,
is there any command you want me to execute to figure out the problem?
k

kind-nightfall-56861

08/22/2022, 10:35 AM
That's all I can tell for now
👀 1
c

chilly-telephone-51989

08/22/2022, 12:51 PM
I figured it out, it was not ingress it was the gateway krakend that was causing the issues. ingress was working correctly the gateway had a particular issue that caused it to discard all the requests silently. The article you shared is really very helpful. thank you for all the guidance.
k

kind-nightfall-56861

08/22/2022, 1:10 PM
Np 😄 Glad you figured it out
122 Views