MInikube, Ingress, and DNS

Howdy all! I wanted to try out Garden on my local machine rather than deploying to a cloud cluster. While configuring some test services, I came across a question I couldn’t find the answer to:

How do I configure minikube/garden so that my module will properly resolve via their hostnames specified within their ingress configurations?

OS - Ubuntu 21.04
Minkube - v1.23.2
Kubernetes - v1.21.5
Garden Version - 0.12.29

Commands to build the environment
git clone
minikube start --kubernetes-version=v1.21.5
minikube addons enable ingress

(DNSMasq is configured so that nslookup resolves to minikube ip)

garden deploy helloworld

The terminal then outputs Ingress:
But going to the address returns a 404.
How do I fix my configuration so that the address resolves properly?

Hey there!

Does the main branch of the repo you linked to contain the full configuration of this project? I seem to be missing a few pieces there (e.g. the -${local.usernameLowercase} suffix on the ingress hostname that shows up in the development log).

I played around with this a bit, and got it working by removing the hostname and Traefik annotations from the ingress.

I’d need a bit more context on the full config you were using to be of more help, but hopefully this points you in the right direction.

Happy to answer any further questions you may have, and glad to see you’re trying out Garden!


1 Like

Thank you so much for responding! I removed the Traefik annotations and then went to the project yaml and changed things to the following:
Project yaml:

kind: Project
name: dev
  - name: default
    # Namespace name set by the username or an envar
    defaultNamespace: "${local.env.GARDEN_NAMESPACE || local.usernameLowerCase}."
      ingress-suffix: "${local.env.GARDEN_NAMESPACE || local.usernameLowerCase}"
  - name: local-kubernetes
    defaultHostname: ""

Module Yaml

    # ....
      - path: /
        port: http
        hostname: modulename.${var.ingress-suffix}

Thanks for your help!