----------------------
The remote Kubernetes plugin in Garden requires ingress and DNS setup to function properly for several key reasons:
1. Service Accessibility: Ingress allows external access to services running in the Kubernetes cluster. As mentioned in the [Remote K8s Plugin Configuration](
) documentation, you need to "point one or more DNS entries to your cluster, and configure a TLS certificate for the hostnames you will expose for ingress."
2. Hostname Configuration: The plugin needs a hostname to route traffic to your services. The [Remote K8s Plugin Configuration](
) guide states that you need "The hostname for your services" as one of the required values for configuring the plugin.
3. TLS Security: Ingress setup often includes TLS configuration for secure communication. The documentation mentions that you may need "A TLS secret (optional)" when setting up ingress and DNS.
4. Environment-specific Routing: DNS setup allows for environment-specific routing. As noted in the [Remote K8s Plugin Configuration](
), "Templating the ingress to the application enables you to have DNS entries for every developer's namespace."
5. Default Hostname: The plugin uses a default hostname for services. In the configuration example provided in the [Remote K8s Plugin Configuration](
) guide, there's a
defaultHostname
field that needs to be set with the hostname from the ingress and DNS setup.