https://rancher.com/ logo
Title
d

damp-dusk-21502

04/28/2023, 3:58 PM
macOS arm64 here: I am trying to create an ingress with the default traefik ingress controller, but all I am getting is
Bad Gateway
. And I am out of ideas. I have a fresh installation of rancher-desktop and I can see
traefik
running in the
kube-system
namespace. I have applied an http demo deployment (comes from ingress-nginx, but the deployment should be agnostic) and the ingress file below:
kubectl apply -f <https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/docs/examples/http-svc.yaml>
---
apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: Ingress
metadata:
  name: demo-ingress
spec:
  rules: 
  - http:
      paths:
        - pathType: Prefix
          path: "/"
          backend:
            service:
              name: http-svc
              port:
                number: 80
---
I end up with this ingress:
kubectl get <http://ingresses.networking.k8s.io|ingresses.networking.k8s.io>
NAME           CLASS     HOSTS   ADDRESS           PORTS   AGE
demo-ingress   traefik   *       192.168.130.178   80      24m
However, all requests to localhost or 192.168.130.178 return bad gateway:
# same with <http://192.168.130.178>
curl <http://127.0.0.1:80>
Bad Gateway
I have just followed this description and I am able to get a response from localhost (that is, everything works and I am not seeing the issues that the user is describing): https://forums.rancher.com/t/solved-unable-to-use-ingress-traefik-in-k3s-version-v1-23-6-k3s1-418c3fa8/37838 However, I do not understand why this example works, but mine doesn't.
the only difference is the
annotation
, which apparently is now superseded
spec.ingressClassName
I believe something does not quite work with the http-svc image. When
kubectl exec -it http-svc-6b9f69759b-8hkpr -- /bin/sh
I can't even
wget 127.0.0.1:8080
, which supposedly is the port on which the server inside the container is listening
s

sparse-fireman-14239

04/29/2023, 7:47 AM
You may want to try #rancher-desktop instead