'`kubectl` almost-always hangs from controller node, but works reliably from dev laptop

TL;DR kubectl hangs indefinitely when calling controller node from itself, but operates normally when calling from another machine

I'm getting started with learning Kubernetes. I've installed Raspbian 64-bit OS on a Raspberry Pi 4 8Gb RAM, and then installed k3s (and nothing else) onto it as the master node (and installed k3s onto a 4Gb Pi4 as an worker node). Both Pis are fast and responsive when executing non-Kubernetes commands (and are connected to the same network via Ethernet), but kubectl get nodes from the controller node will almost-always (but not always-always) hang indefinitely (with no output).

Strangely, though, when I copy the configuration file from the controller node to my dev laptop and change the clusters[0]cluster.server address from using 127.0.0.1 to the appropriate domain name (as advised in "Accessing K3s from my dev laptop", here), kubectl commands from my dev laptop complete reliably and quickly.

Is this expected performance of k8s/k3s? If not, what are some areas I can look into to make kubectl complete reliably from my controller node? I've tried replacing 127.0.0.1 in the controller node's kubeconfig with localhost or with the machine's assigned domain name - neither made a difference.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source