Hello everybody,
I hope anybody knows wtf I am having here.
so, I try to install k3s cluster locally on my virtual machine for testing purposes.
I follow instrustions from official site and run simple curl one-string command. Everything is ok and systemd service created and started.
But when I try to get list of nodes by means of kubectl, I get the following :
⚡ root@012030123 ~ kubectl get nodes
E0303 20:49:32.862472 6583 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused
E0303 20:49:32.863920 6583 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused
E0303 20:49:32.865714 6583 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused
E0303 20:49:32.867943 6583 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused
E0303 20:49:32.868954 6583 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused
The connection to the server localhost:8080 was refused - did you specify the right host or port?
The only thing I could find in archwiki is that I need to create a symlink
ln -rsf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
but this didnt help.
I guess kubectl is trying to reach API server by IPv6 but have no idea why it doesnt use 127.0.0.1 as it is described in k3s,yaml in /etc/rancher/k3s/ directory.
In the same time, I have tested absolutely the same on Ubuntu and it works without any tricks. So I would suppose that something needs to be done additionally in Arch.
Any help is apprecciated. In advance I am sending to all of you rays of happiness.