Kubernetes Cluster Failure - 1.24.2 --network-plugin flag is missing in 1.24.0

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information:

Kubernetes version: 1.24.2
Cloud being used: On-Premise
Installation method: yum
Host OS: RHEL 7
CNI and version:
CRI and version:

We had an earlier verion of kubernetes which got upgraded to 1.24.2 and we see the same behaviour across 2 clusters- when i say clusters these are for now 2 virtual machines each behaving as a cluster of its own, hosted on-premise. We deploy containers that connect to Azure - as Self-hosted App gateways On Premise.

Issue - Post upgrading to the current version I see the below errors in kubelet logs, and kubelet doesnt seem to be running / active

kubectl get pods The connection to the server localhost:8080 was refused - did you specify the right host or port?

Errors in Kubelet logs

kubelet[18280]: Error: failed to parse kubelet flag: unknown flag: --network-plugin systemd[1]: kubelet.service: main process exited, code=exited, status=1/FAILURE

I tried to adjust the parameter from /var/lib/kubelet/kubeadm-flags.env by removing the --network-plugin flag , but then no luck. I now see the below error as well in the kubelet logs after the kubelet restart

{ 0 }. Err: connection error: desc = “transport: Error while dialing dial unix: missing address”. Reconnecting… Jul 01 15:14:49 kubelet[10297]: Error: failed to run Kubelet: unable to determine runtime API version: rpc error: code = Unavailable desc = connection error: desc = “transport: Error while dialing dial unix: missing address”

kubelet[10252]: --runtime-request-timeout duration Timeout of all runtime requests except long running request - pull, logs, exec and attach. When timeout exceeded, kubelet will cancel the request, throw out an error and retry later. (default 2m0s) (DEPRECATED: This parameter should be set via the config file specified by the Kubelet’s --config flag. See Set Kubelet parameters via a config file | Kubernetes for more information.)

The git-Hub link Network Plugins: --network-plugin flag is missing in 1.24.0, yet documented as available · Issue #33640 · kubernetes/website · GitHub talks about the same issue but then more on the documentation change on the flags which are no more used. Is there any fix available for running clusters who has already upgraded to the latest version?

1 Like

I have the same problem, I added their example “/etc/cni/net.d/10-containerd-net.conflist” containerd/install-cni at main · containerd/containerd · GitHub with no luck.
With adding all this, when I destroy the VM(im using Qemu/KVM) and with Ansible I reinstall Kubernetes control plane then it works for like 10m… after that kubelet starts to bounce, and I start to have permission deny, I installed net-tools to have netstat and the port is not even listening.