I am trying to get my cluster up an running with Kubespray, and I have to say it is a fantastic tool, but I cannot get it quite working correctly for me. Specifically, I am trying to enable the metalLB addon, but it does not seem to work.
After my own attempts failed, I have fallen back to the test steps from the kubespray pull request which added metalLB as an addon, but this still fails.
Pull request kubespray/pull/6238 Link
To bulletpoint my actual steps.
vagrant destroy
(to dispose of my last attempt)- Change
/inventory/mycluster/group_vars/k8s-cluster/addons.yml
to enable MetalLB, version 0.9.3, layer 2, ip range192.168.1.201-192.168.1.250
- Change
/inventory/mycluster/group_vars/k8s-cluster/k8s-cluster.yml
setkube_network_plugin: flannel
,kube_proxy_strict_arp: true
andkubeconfig_localhost: true
- run
ansible-playbook -i inventory/mycluster/hosts.yaml --become --become-user=root cluster.yml --private-key=~/.ssh/id_rsa
vagrant up
kubectl apply -f testlb.yaml (apply the test service from the pull request test)
-
kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.233.0.1 none 443/TCP 169m my-service LoadBalancer 10.233.32.158 pending 80:30751/TCP 144m
The external-ip for my-service remains pending as it cannot be resolved. No metallb components seem to be running. A lot of text whizzed past during the execution, but I did not see any metallb specific messages.
My plan is to use the cluster to play, learn and develop, ideally with jenkins-x. It is not intended as a production cluster, or for public access.
My network is simple with a broadband hub/router/firewall at 192.168.0.1. That router assigns network addresses in the range 192.168.0.*
My Kubespray cluster is running 3 nodes in virtualbox on a quad core ubuntu machine.
Why does the external-ip remain pending, and how can I resolve this ?