February 13

Update on KubeAdm with Calico

After playing with this a bit, I did a few tweaks, based on some discussions with Calico folks. First, the host IPs being used for the nodes are 10.96.0.101 and 10.96.0.102. This is within the same subnet as is used by Kubernetes for the service IPs (10.96.0.0/12). To get around this, I modified the Vagrantfile to use a different IPs for the host nodes created.

An alternative is to use the option “–service-cidr” on “kubeadm init” to pick a different range for the service subnet, and modify /etc/systemd/system/kubelet.service.d/10-kubeadm.conf to set the IP for DNS to be within the range (restarting systemd to apply). If you use a manifest from master, you may need additional settings (setting clusterIP – I haven’t tried that). This is a more manual method though.

For my tests, I changed the Vagrantfile as follows:

primary_ip = "10.20.30."

...

      ip = "#{primary_ip}#{i * 10}"

The calico.yaml file needs to be modified too, to use 10.20.30.10 as the etcd_endpoints IP, instead of 10.96.0.101. From this point, you can do a “vagrant up” and then follow the rest of the steps to create the cluster and then switch to IPv6 and create containers.

Note: these same changes apply to the CentOS Vagrantfile in the blog.

Tags: ,
Copyright 2017-2024. All rights reserved.

Posted February 13, 2017 by pcm in category "Kubernetes