site/content/docs/user/ingress.md
This guide applies to cloud-provider-kind v0.9.0+. For older versions, refer to historical docs.
Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster.
Since cloud-provider-kind v0.9.0, it natively supports Ingress. No third-party ingress controllers are required by default.
For third-party ingress solutions (e.g., Ingress NGINX, Contour), please follow their official documentation.
NOTE: Gateway API is also natively supported (along with Ingress). See the official Ingress migration guide for details.
WARNING: If you are using a rootless container runtime, ensure your host is properly configured before creating the KIND cluster. Most Ingress and Gateway controllers will not work if these steps are skipped.
Create a kind cluster and run Cloud Provider KIND that automatically enables LoadBalancer support for Ingress. Create a cluster as follows.
{{< codeFromInline lang="bash" >}} kind create cluster {{< /codeFromInline >}}
The following example creates simple http-echo services and an Ingress object to route to these services.
{{% readFile "static/examples/ingress/usage.yaml" %}}
Apply the configuration:
{{< codeFromInline lang="bash" >}} kubectl apply -f {{< absURL "examples/ingress/usage.yaml" >}} {{< /codeFromInline >}}
Check the External IP assigned to the Ingress by the built-in LoadBalancer.
{{< codeFromInline lang="bash" >}} kubectl get ingress NAME CLASS HOSTS ADDRESS PORTS AGE example-ingress <none> example.com 172.18.0.5 80 10m {{< /codeFromInline >}}
{{< codeFromInline lang="bash" >}}
INGRESS_IP=$(kubectl get ingress example-ingress -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
curl ${INGRESS_IP}/foo
curl ${INGRESS_IP}/bar {{< /codeFromInline >}}