k3s-io / k3s

Lightweight Kubernetes
https://k3s.io
Apache License 2.0
28.08k stars 2.35k forks source link

egress-selector-mode using flannel over wireguard #5760

Closed jr200 closed 2 years ago

jr200 commented 2 years ago

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:

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

brandond commented 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.

rancher-max commented 2 years ago

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.

consideRatio commented 2 years ago

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.