https://rancher.com/ logo
Title
a

adamant-kite-43734

09/20/2022, 2:02 PM
This message was deleted.
b

bitter-hairdresser-7812

09/21/2022, 2:38 AM
Check out this ingress example below, full article here: https://itnext.io/simplest-minimal-k8s-app-tutorial-with-rancher-desktop-in-5-min-5481edb9a4a5
apiVersion: <http://networking.k8s.io/v1|networking.k8s.io/v1>
kind: Ingress
metadata:
  name: jade-shooter
spec:
  rules:
  - host: jade-shooter.rancher.localhost
    http:
      paths:
      - pathType: Prefix
        path: /
        backend:
          service:
            name: jade-shooter-service
            port:
              number: 8080
  tls:
  - hosts:
    - jade-shooter.rancher.localhost
a

abundant-queen-40434

09/21/2022, 4:52 PM
That doesn't work out-of-the-box. For example, If I deploy Grafana with the ingress host set to
grafana.rancher.locahost
, The OS can't resolve the hostname:
curl <http://grafana.rancher.localhost>
curl: (6) Could not resolve host: grafana.rancher.localhost
b

bitter-hairdresser-7812

09/21/2022, 9:30 PM
Ugh I left that step out to add an entry in etc hosts where rancher.localhost maps to 127.0.0.1
Sorry about that
a

abundant-queen-40434

09/21/2022, 9:31 PM
Yes, I figured that out. I also found that you can get a wildcard mapping if you use
dnsmasq
. I haven't tried that yet.
👍 1
b

bitter-hairdresser-7812

10/01/2022, 6:58 PM
I tested it again, and it works with a Chrome or Firefox-based browser. I've updated the docs