"Unhandled Error" err="couldn't get current server API group list
Symptom
Some times getting VSatellite logs live, runnning any kubectl command, or generating support bundle will contain empty files you can get
[root@auser bin]# ./kubectl get nodesE0908 12:43:22.643191 1280784 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"http://localhost:8080/api?timeout=32s\": dial tcp [::1]:8080: connect: connection refused"
This means that once K8 gets the request it will automatically forward request to port 8080 which isn't a port used by VSatellite.
Environment
VaaS/TLSPC TLSPC
Any Linux distro
Cause
User performed VSatellite installation with sudo su -i o -l meaning you won't bring or work with root environment variables, instead user will work with local user variables
Resolution
k3s.yaml file contains the following line
server: https://127.0.0.1:6443
Meaning that every request via kubectl will be forwarded to the localhost into 6443 port number
Add the following environment variable either in runtime
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
Or simplyKUBECONFIG=/etc/rancher/k3s/k3s.yaml
Or into the bashrc file