The Minicube known problems explains that load balancing is not supported.
However, as explained in this problem, they are handled in the same way as services like NodePort:
Example
Launch the mini cup and start the nginx service
$ minikube start $ kubectl run my-nginx --image=nginx --replicas=1 --port=80 $ kubectl expose deployment my-nginx --target-port=80 --type=LoadBalancer
You can determine the URL of this load balancer in one of two ways. Hard way:
$ echo http://$(minikube ip):$(kubectl get service my-nginx --output='jsonpath={.spec.ports[0].NodePort}')
or easy way
$ minikube service my-nginx --url
Update - use the input controller
I found a blog post that describes how you can run the access controller on a miniback to provide load balancing.
So, run traefik input controller:
$ kubectl create -f https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/traefik.yaml
Once this has been done, create Ingress as follows: route traffic based on the host name:
$ cat ingress.yml apiVersion: extensions/v1beta1 kind: Ingress metadata: name: my-nginx-ingress spec: rules: - host: my-nginx.192.168.99.100.xip.io http: paths: - path: / backend: serviceName: my-nginx servicePort: 80 $ kubectl create -f ingress.yml ingress "my-nginx-ingress" created
The nginx service now displays at the following URL:
http:
Note:
source share