calico: Calico-Node is in CrashLoopBackOff status, And Calico-node shutting down in Node
I have 3 nodes in my Kubernetes cluster, and calico node deployed as CNI. However, 1 Master Node and 1 Worker Node worked well. But 1 calico-node in Worker Node is in CrashBackoff Status.
Expected Behavior
In my Cluster in Local VM Machine, and AWS EC2, Calico node depolyed well. and I expected to deploy well in my Server because, i used sample deployment method in Calico website
Current Behavior
kubectl get pod -A
This is the current status. As you see the calico-node and calico-typha is in CrashBackOff.
kubectl get node ubuntu
kubectl exec calico-node-qmhps -n calico-system -- /bin/calico-node -felix-ready
kubectl describe node ubuntu
kubectl describe pod calico-node-qmhps -n calico-system
Events: Type Reason Age From Message
Normal Scheduled 5m31s default-scheduler Successfully assigned calico-system/calico-node-qmhps to ubuntu Normal Pulled 5m30s kubelet Container image “docker.io/calico/pod2daemon-flexvol:v3.26.1” already present on machine Normal Created 5m30s kubelet Created container flexvol-driver Normal Started 5m30s kubelet Started container flexvol-driver Normal Pulled 5m29s kubelet Container image “docker.io/calico/cni:v3.26.1” already present on machine Normal Created 5m29s kubelet Created container install-cni Normal Started 5m29s kubelet Started container install-cni Warning Unhealthy 5m27s kubelet Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to connect to BIRDv4 socket: dial unix /var/run/calico/bird.ctl: connect: connection refused W0908 13:07:14.483764 61 feature_gate.go:241] Setting GA feature gate ServiceInternalTrafficPolicy=true. It will be removed in a future release. Warning Unhealthy 5m26s kubelet Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to connect to BIRDv4 socket: dial unix /var/run/calico/bird.ctl: connect: connection refused W0908 13:07:15.487428 371 feature_gate.go:241] Setting GA feature gate ServiceInternalTrafficPolicy=true. It will be removed in a future release. Warning Unhealthy 4m55s (x3 over 5m15s) kubelet Readiness probe failed: command “/bin/calico-node -bird-ready -felix-ready” timed out Normal Created 4m50s (x2 over 5m28s) kubelet Created container calico-node Normal Started 4m50s (x2 over 5m28s) kubelet Started container calico-node Normal Pulled 4m50s (x2 over 5m28s) kubelet Container image “docker.io/calico/node:v3.26.1” already present on machine Warning Unhealthy 4m50s (x3 over 5m10s) kubelet Liveness probe failed: Get “http://localhost:9099/liveness”: context deadline exceeded (Client.Timeout exceeded while awaiting headers) Normal Killing 4m50s kubelet Container calico-node failed liveness probe, will be restarted Warning Unhealthy 4m50s kubelet Readiness probe failed: 2023-09-08 13:07:51.192 [INFO][523] confd/health.go 180: Number of node(s) with BGP peering established = 2 W0908 13:07:51.187693 523 feature_gate.go:241] Setting GA feature gate ServiceInternalTrafficPolicy=true. It will be removed in a future release. Warning Unhealthy 4m50s kubelet Readiness probe errored: rpc error: code = NotFound desc = failed to exec in container: failed to create exec “10f418b975084fd2b587cab91d3df175b0e08003ab1d756cfc9a3645ddd3d804”: task 5c55e7e8fa6a9d841758e8866f23382c50d290d1b651efd3a72618434e9d62a3 not found: not found Warning Unhealthy 4m50s kubelet Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to connect to BIRDv4 socket: dial unix /var/run/calico/bird.ctl: connect: connection refused W0908 13:07:51.554603 23 feature_gate.go:241] Setting GA feature gate ServiceInternalTrafficPolicy=true. It will be removed in a future release. Warning Unhealthy 4m49s kubelet Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to connect to BIRDv4 socket: dial unix /var/run/calico/bird.ctl: connect: connection refused W0908 13:07:52.589282 85 feature_gate.go:241] Setting GA feature gate ServiceInternalTrafficPolicy=true. It will be removed in a future release. Warning BackOff 30s (x7 over 90s) kubelet Back-off restarting failed container calico-node in pod calico-node-qmhps_calico-system(eaa1e1ba-190f-4fe7-83e6-343dc8cd2dae)
Possible Solution
I tried the method in this site(Change Readness time), Howerver it doesn’t work for me. I also tried to reset and init cluster again, But it doesn’t works for me.
Steps to Reproduce (for bugs)
I tried to reproduce this bug on the AWS or some where. Howerver It is impossible to reproduce. Howerver, Here is the Process that i used to install K8s and Calico
sudo swapoff -a
cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf
overlay
br_netfilter
EOF
sudo modprobe overlay
sudo modprobe br_netfilter
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward = 1
EOF
sudo sysctl --system
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install containerd.io
sudo containerd config default | sudo tee /etc/containerd/config.toml
sudo sed -i 's/SystemdCgroup \= false/SystemdCgroup \= true/g' /etc/containerd/config.toml
sudo sed -i 's%sandbox_image \= "registry.k8s.io/pause:3.6"%sandbox_image \= "registry.k8s.io/pause:3.9"%g' /etc/containerd/config.toml
sudo systemctl daemon-reload
sudo systemctl restart containerd
DOWNLOAD_DIR="/usr/local/bin"
sudo mkdir -p "$DOWNLOAD_DIR"
CRICTL_VERSION="v1.25.0"
ARCH="amd64"
curl -L "https://github.com/kubernetes-sigs/cri-tools/releases/download/${CRICTL_VERSION}/crictl-${CRICTL_VERSION}-linux-${ARCH}.tar.gz" | sudo tar -C $DOWNLOAD_DIR -xz
#RELEASE="$(curl -sSL https://dl.k8s.io/release/stable.txt)"
RELEASE="v1.27.4"
ARCH="amd64"
cd $DOWNLOAD_DIR
sudo curl -L --remote-name-all https://dl.k8s.io/release/${RELEASE}/bin/linux/${ARCH}/{kubeadm,kubelet,kubectl}
sudo chmod +x {kubeadm,kubelet,kubectl}
RELEASE_VERSION="v0.4.0"
curl -sSL "https://raw.githubusercontent.com/kubernetes/release/${RELEASE_VERSION}/cmd/kubepkg/templates/latest/deb/kubelet/lib/systemd/system/kubelet.service" | sed "s:/usr/bin:${DOWNLOAD_DIR}:g" | sudo tee /etc/systemd/system/kubelet.service
sudo mkdir -p /etc/systemd/system/kubelet.service.d
curl -sSL "https://raw.githubusercontent.com/kubernetes/release/${RELEASE_VERSION}/cmd/kubepkg/templates/latest/deb/kubeadm/10-kubeadm.conf" | sed "s:/usr/bin:${DOWNLOAD_DIR}:g" | sudo tee /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
sudo systemctl enable --now kubelet
sudo apt install socat conntrack
sudo kubeadm init --pod-network-cidr=192.168.0.0/16
kubectl taint nodes --all node-role.kubernetes.io/control-plane-
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/tigera-operator.yaml
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/custom-resources.yaml
Your Environment
For some reason, I can give exact IP address for you. But it is public ip and in one subnet.
-
Operating System and version:
The Node doesn’t work is third node from above.
-
Calico version : v3.6.21
-
Orchestrator version (e.g. kubernetes, mesos, rkt): Client Version: version.Info{Major:“1”, Minor:“27”, GitVersion:“v1.27.4”, GitCommit:“fa3d7990104d7c1f16943a67f11b154b71f6a132”, GitTreeState:“clean”, BuildDate:“2023-07-19T12:20:54Z”, GoVersion:“go1.20.6”, Compiler:“gc”, Platform:“linux/amd64”} Kustomize Version: v5.0.1 Server Version: version.Info{Major:“1”, Minor:“27”, GitVersion:“v1.27.5”, GitCommit:“93e0d7146fb9c3e9f68aa41b2b4265b2fcdb0a4c”, GitTreeState:“clean”, BuildDate:“2023-08-24T00:42:11Z”, GoVersion:“go1.20.7”, Compiler:“gc”, Platform:“linux/amd64”}
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (3 by maintainers)
Addendum: going deeper in confronting my installation of the Nvidia driver plugin and the Nvidia operator, I found out that thay automated the containerd Nvidia runtime installation and settings.
It turns out that I missed setting
SystemCgroup = Truein the nvidia runtime setting and it probably was the problem, so it’s something you could verify in your implementation.@coutinhop May i ask to check this log file? Thank you for your time.
@coutinhop Sorry, Calico version is typo. Version is 3.26.1. Do you mean
kubectl get logs -n calico-system calico-node-xxxxx?