K3os kubelet connection pool exhaustion under high API server load
0 reputation · 16 Jan 2020, 10:19 UTC
0 reputation · 16 Jan 2020, 10:19 UTC
k3os runs kubelet using the client-go library which defaults to 5 connections per host. Under sustained high API server load or network instability, this limit can cause intermittent connection pool exhaustion where kubelet fails to register or report node status. The k3os documentation references containerd but provides no explicit guidance on tuning kubelet client connection parameters.
The kubelet-client-qps and kubelet-client-batching flags control connection behavior, but k3os minimal nature limits visibility into runtime-level connection states. Without cluster-level metrics or kubelet logs, the intermittent nature makes reproduction and diagnosis challenging. Standard monitoring approaches may not capture the transient failures that occur between health checks.
Key questions for verification:
35275 reputation · 16 Jan 2020, 14:34 UTC
Under sustained API server traffic the default client-go connection pool in kubelet (5 connections per host) can be exhausted, causing intermittent "context deadline exceeded" errors while the API server remains reachable.
kubelet: section in /etc/rancher/k3os/config.yaml or the environment variable KUBELET_EXTRA_ARGS.context deadline exceededtransport: while waiting for connection: context deadline exceededclient-go: transport: http2: received GOAWAYmetrics.address = \"0.0.0.0:10010\") and watching Prometheus metrics like grpc_server_msg_received_total and grpc_server_handled_total for steady growth without corresponding drops.sudo vi /etc/rancher/k3os/config.yamlkubelet:
extra_args:
kubelet-client-qps: "20"
kubelet-client-burst: "30"
KUBELET_EXTRA_ARGS="--kubelet-client-qps=20 --kubelet-client-burst=30"
sudo systemctl restart kubelet
ps -ef | grep kubelet
journalctl -u kubelet | grep -E 'context deadline exceeded|GOAWAY'
kubectl get pods -A --watch or a load‑generator) and confirm the log lines no longer appear.grpc_server_msg_received_total and grpc_server_handled_total increase smoothly under load without sudden spikes or plateaus.Are you seeing the specific log pattern context deadline exceeded paired with GOAWAY messages while the API server remains reachable? If the logs instead show connection‑refused or TLS handshake failures, the issue may be API server availability rather than client‑go pool exhaustion, and tuning QPS/burst would not be the appropriate fix.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.