I want to join nodes belonging to networks different from Kubernetes to a cluster.
For example, two nodes are VMs from Kakao Cloud and the new node you want to join is a VM from GCP. The master node used kubeadm init using a public IP.
k get node -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
controlplane Ready control-plane 3h22m v1.28.2 172.10.0.253 <none> Ubuntu 22.04.2 LTS 5.15.0-100-generic containerd://1.6.28
node01 Ready <none> 3h6m v1.28.2 172.10.1.101 <none> Ubuntu 22.04.2 LTS 5.15.0-100-generic containerd://1.6.28
node02 Ready <none> 25m v1.28.2 10.172.0.5 <none> Ubuntu 20.04.6 LTS 5.15.0-1053-gcp containerd://1.6.28
Although we succeeded in joining the VM in GCP, we confirmed that the kube-flannel in the VM in GCP was continuously generating errors and being regenerated.
k get pods -n kube-flannel -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
kube-flannel-ds-jgl6n 0/1 CrashLoopBackOff 8 (99s ago) 26m 10.172.0.5 node02 <none> <none>
kube-flannel-ds-nzb4v 1/1 Running 0 3h7m 172.10.1.101 node01 <none> <none>
kube-flannel-ds-v29hf 1/1 Running 0 3h16m 172.10.0.253 controlplane <none> <none>
When I used the ip link on a VM in GCP, network interfaces such as flannel.1 and cni0 were not visible. How do I do this?
root@node02:/# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1460 qdisc mq state UP group default qlen 1000
link/ether 42:01:0a:b2:00:05 brd ff:ff:ff:ff:ff:ff
inet 10.172.0.5/32 scope global dynamic ens4
valid_lft 2878sec preferred_lft 2878sec
inet6 fe80::4001:aff:feb2:5/64 scope link
valid_lft forever preferred_lft forever
Cluster information:
Kubernetes version: v1.28.2
Cloud being used: Kakao Cloud & GCP
Installation method: kubeadm
Host OS: Ubuntu 22.04.2 LTS
CNI and version: Flannel 0.24.3
CRI and version: Containerd 1.6.28