Closed jr200 closed 2 years ago
dial tcp 127.0.0.1:6443: connect: connection refused
This is somewhat unexpected. I suspect that you've customized the bind-address, and we probably need to account for that in the egress proxy config.
I can't recreate this on v1.24.1+k3s1 with only egress-selector-mode
set, so I suspect Brad is correct that bind-address was also set. In that case, I'm going to close this as validated per https://github.com/k3s-io/k3s/issues/5712#issuecomment-1175659021 but feel free to reopen if we are mistaken.
Linking out to https://github.com/k3s-io/k3s/issues/5633 where an issue like this is still intermittently around as confirmed on many different k3s installations.
Environmental Info: k3s version v1.24.1+k3s1 (0581808f) go version go1.18.1
Node(s) CPU architecture, OS, and Version: Linux myserver 5.11.0-49-generic #55-Ubuntu SMP Wed Jan 12 17:36:34 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Cluster Configuration: 2 servers, 6 agents (but can reproduce on just 1 server.)
Describe the bug:
kubectl logs -n kube-system coredns-b96499967-h4c5w
Error from server: Get "https://myserver.k3s:10250/containerLogs/kube-system/coredns-b96499967-h4c5w/coredns": dial tcp 127.0.0.1:6443: connect: connection refused
Steps To Reproduce:
flannel-iface: nm-k3s
(my wireguard NIC), and setnode-ip
s to be in that subnetegress-selector-mode: disabled
, then thekubectl logs
command works again.egress-selector-mode
topod/agent/cluster
, the logs commands fails as above.Expected behavior:
kubectl logs <container-id>
should show the logs of the container.Actual behavior:
Error from server: Get "https://myserver.k3s:10250/containerLogs/kube-system/coredns-b96499967-h4c5w/coredns": dial tcp 127.0.0.1:6443: connect: connection refused