|
Hoping someone can sanity-check a 502 I can't fix on k3s v1.33.3+k3s1 (4 nodes, 1 server + 3 agents, Debian 13, default flannel, all on one LAN).
Server log also shows recurring 👇👇👇👇 Logs below 👇👇👇👇 |
Replies: 2 comments 2 replies
|
@brandond I'd be extremely grateful if you can take a look at this. |
|
The direct So I would treat this first as missing/rejected worker tunnel sessions, not as a kubelet listener/firewall problem. The 1. Confirm the configured pathOn the server: sudo grep -R "egress-selector-mode" \
/etc/rancher/k3s/config.yaml /etc/systemd/system/k3s.service* 2>/dev/null
sudo cat /var/lib/rancher/k3s/server/etc/egress-selector-config.yamlIf nothing overrides it, 2. Verify that every worker actually has a live tunnelOn each worker, around a fresh agent restart: sudo journalctl -u k3s-agent -b --no-pager | \
grep -Ei 'remotedialer|tunnel|websocket|proxy|x509|certificate|6443'A healthy current agent logs a message equivalent to: The K3s source builds this connection as: and reconnects after an authentication or transport failure. If the three workers lack the connected message or show a reconnect loop, that is the direct cause of the 502s. 3. Identify the exact rejected certificateThe server log already gives a Subject Key Identifier. On each worker, find which local certificate has that SKID: sudo find /var/lib/rancher/k3s/agent -maxdepth 1 -name '*.crt' -print0 |
while IFS= read -r -d '' cert; do
echo "=== $cert"
sudo openssl x509 -in "$cert" -noout -subject -issuer -serial \
-ext subjectKeyIdentifier 2>/dev/null
doneCompare it with: If it is a worker's openssl verify \
-CAfile /var/lib/rancher/k3s/server/tls/client-ca.crt \
/tmp/worker-client-kubelet.crtComparing issuer/subject strings is not enough: two different CA keys can have the same subject. Also compare the CA fingerprints, rather than only timestamps/names: # server
sudo openssl x509 -in /var/lib/rancher/k3s/server/tls/client-ca.crt \
-noout -fingerprint -sha256 -subject
# each worker
sudo openssl x509 -in /var/lib/rancher/k3s/agent/client-ca.crt \
-noout -fingerprint -sha256 -subject4. Interpret the result before changing certificates
As a narrow diagnostic only, because you have verified direct server-to-kubelet connectivity, temporarily setting the server to Finally, upgrade from Primary references:
If you post the worker tunnel log plus the |
Start by upgrading to the latest 1.33 patch release. The release you are on is almost a year old.
If the problem continues, then we can do additional research.