kubernetes-ingresskind

Setting domain name for ingress in Kind cluster


I want to create a domain name for my ingress which is accessible from external application. I am trying Contour ingress following https://kind.sigs.k8s.io/docs/user/ingress/#using-ingress on my Kind cluster which is running on my mac locally..

It only uses localhost address or http://local.projectcontour.io/ to access the ingress. Since this Kind cluster is running locally, I am unable to use Loadbalancer type svc. Is there any other method to set a domain name to access ingress?


Solution

  • Yes, you can't use such Ingress locally with Kind. There is a loadbalancer solution called MetalLB for on-premise clusters.

    Kubernetes does not offer an implementation of network load balancers (Services of type LoadBalancer) for bare-metal clusters.

    I've found good article about installing this on Mac with Kind.

    A ways back, I had discovered MetalLB as a method for getting an easy load balancer on-premises for Kubernetes. In the public cloud world - getting services into a cluster and subsequent load balancer connectivity is pretty easy. It gets a bit more nebulous (or, expensive…) on-premises.

    The problem I found however is with how MacOS handles Docker. Since MacOS leverages [Hyperkit](http://collabnix.com/how-docker-for-mac-works-under-the-hood/ for virtualization, the interfaces for Dockers bridge network aren’t actually routable interfaces - you’re actually connecting to a socket instead