0

I have a ongoing problem on Kubernetes.
I'm currently using:

  • Kubernetes (1.30.2) on Master and Worker nodes.

  • Calico (3.27.0)

  • Metallb (0.14.5)

I came across a problem where, if an unexpected course of events occur where one of my worker nodes reboots or shuts down (either maintenance or someone rebooting the VM), the worker node is unable to join back to the master node. When I ping the master node from the rebooted or recently shut down worker node, it becomes Destination Port Unreachable.

It becomes a huge hassle since the only workaround that I do everytime for something like this, is to reinstall kubernetes on all nodes.

Note: I pinged this from a worker node.

PING 172.30.172.160 (172.30.172.160) 56(84) bytes of data. 
From 172.30.172.160 icmp_seq=1 Destination Port Unreachable

The node becomes NotReady.

Here are my config files for applying Calico and MetalLB:

Calico:

kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.27.0/manifests/tigera-operator.yaml
curl https://raw.githubusercontent.com/projectcalico/calico/v3.27.0/manifests/custom-resources.yaml -O
kubectl create -f custom-resources.yaml
curl https://raw.githubusercontent.com/projectcalico/calico/v3.27.0/manifests/calico.yaml -O
kubectl apply -f calico.yaml

MetalLB:

kubectl edit configmap -n kube-system kube-proxy

and set:

apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration
mode: "ipvs"
ipvs:
  strictARP: true #set this to true

(v0.14.5):

kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.14.5/config/manifests/metallb-native.yaml

I added config files for MetalLB:

mkdir Metallb

Create ip pool range

vim Metallb/ip-pool.yaml

Add this

apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
  name: ip-pool
  namespace: metallb-system
spec:
  addresses:
  - 10.23.0.x-10.23.0.x #set the ip range (e.g. 10.23.0.0-10.23.0.255)

Create l2 advertisement

vim Metallb/l2-advertisement.yaml

Add this

apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
  name: l2-advertise
  namespace: metallb-system
spec:
  ipAddressPools:
  - ip-pool

Apply metallb

kubectl apply -f Metallb/

I waited for all calico-node-<pod_names> pods to be ready first, and then applied the MetalLB configurations.

Afterwards, I tried joining the worker nodes to the MASTER.
It spits out this:

[preflight] Running pre-flight checks
error execution phase preflight: couldn't validate the identity of the API Server: Get "https://172.30.172.160:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": dial tcp 172.30.172.160:6443: connect: connection refused
To see the stack trace of this error execute with --v=5 or higher

Is there any workarounds or did I miss a configurations on the process?

Any help or comments would be greatly appreciated. Thank you!

0 Answers0