In bare metal installations is not possible to use Ingress by default, you need to use MetalLB.

Here is all service types and how that works:

  • ClusterIP: Exposes the Service on a cluster-internal IP. Choosing this value makes the Service only reachable from within the cluster. This is the default ServiceType.
  • NodePort: Exposes the Service on each Node’s IP at a static port (the NodePort). A ClusterIP Service, to which the NodePort Service routes, is automatically created. You’ll be able to contact the NodePort Service, from outside the cluster, by requesting <NodeIP>:<NodePort>.
  • LoadBalancer: Exposes the Service externally using a cloud provider’s load balancer. NodePort and ClusterIP Services, to which the external load balancer routes, are automatically created

How to use LoadBalancer and Ingress in bare metal installations?

The Nginx docs shows how to setup MetalLB to allow your bare metal cluster the usage of LoadBalancer Services.

MetalLB provides a network load-balancer implementation for Kubernetes clusters that do not run on a supported cloud provider, effectively allowing the usage of LoadBalancer Services within any cluster.

Basically, the setup is easy:

kubectl apply -f

And then create a ConfigMap to configure: - Edit the ip range according yout network

apiVersion: v1
kind: ConfigMap
  namespace: metallb-system
  name: config
  config: |
    - name: default
      protocol: layer2
      - <= EDIT IP RANGE

Check the installation typing kubectl get pods -n metallb-system, this is an expected output:

$ kubectl get pods -n metallb-system
NAME                          READY   STATUS    RESTARTS   AGE
controller-65895b47d4-6wzfr   1/1     Running   0          9d
speaker-v52xj                 1/1     Running   0          9d

After MetalLB installed and configured can install Nginx Ingress following the nginx docs:

kubectl apply -f

And then:

kubectl apply -f

If you prefer, you could use Helm:

helm install my-nginx stable/nginx-ingress

If the kubernetes cluster has RBAC enabled, then run:

helm install my-nginx stable/nginx-ingress --set rbac.create=true

If you are using Helm 2 then specify release name using --name flag

helm install stable/nginx-ingress --name my-nginx


helm install stable/nginx-ingress --name my-nginx --set rbac.create=true

Detect installed version:

POD_NAME=$(kubectl get pods -l -o jsonpath='{.items[0]}') kubectl exec -it $POD_NAME -- /nginx-ingress-controller --version

Check your ingress with the command kubectl get ing and look for in EXTERNAL-IP column.