3 ms·
A lot of these learning resources either tie you down a vendor Cloud specific Kubernetes like this one or run they risk of getting outdated. My journey to Learn
by manishsharan 4y ago
A lot of these learning resources either tie you down a vendor Cloud specific Kubernetes like this one or run they risk of getting outdated. My journey to Learn Kubernetes using Vagrant , VirtualBoxe VMs, Ansible and Kubeadmin has run into a lot of those.
First , there is the issue of Docker and Kubernetes compatibility that I ran into. I could not get Docker shim to work and pivoted to Containerd. Once I sorted this out , I was able to get my Kubernete cluster deployed. Or So I thought.
I ran into an issue of my nodes not using the correct IP address to join the cluster. Apparently, there is a flag you need to enable in the nodes like KUBELET_EXTRA_ARGS="--node-ip=<your node ip address>". Once I got this sorted out by modifying /etc/systemd/system/kubelet.service.d/10-kubeadm.conf , my nodes were able to join the cluster properly and I was ready to do actual development. Or so I thought.
There is this issue of Loadbalancer. I had no idea that the only way to get Kubernetes to work and expose deployed services require a cloud vendor specific load balancer. If you deploy Kubernetes using Kubeadmin and VMs, you do not get a load balancer. So now I have to deploy something called MetalLB or create services of type NodePort so that they can be accessed using node ip addresses. MetalLB requires knowledge of BGP which I don't have. So I will stick to NodePort.
So now I have to deploy a vm with Haproxy as the Loadbalancer that could forward the calls to Nodeports of my services on my Kubernetes cluster on my laptop.
I have been told it is roses all the way once the cluster is working with the load balancer. Or so I think.
- schwap 4y agoHave you looked into using an ingress controller[1]? Still not quite as easy as a managed LoadBalancer but at least you wouldn't have to configure every single service manually. edit: of course, not very useful if your services aren't using HTTP. https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/ https://kubernetes.io/docs/concepts/services-networking/ingr...
- flemhans 4y agoJust FYI: MetalLB can be used without BGP, in L2 mode. It was actually one of the few things that "just worked" for me (with k3s).