The connection to the server localhost:8080 was refused - did you specify the right host or port? #5564
Replies: 5 comments 3 replies
-
It sounds like you have your own kubectl binary that is not looking at /etc/rancher/k3s/k3s.yaml. If you use the kubectl that comes with K3s, it has been modified to look in that location. If you are using your own kubectl then you need to set KUBECONFIG appropriately. |
Beta Was this translation helpful? Give feedback.
-
No kubectl is installed, the only package installed on the VM is k3s and on the worker machine there is no |
Beta Was this translation helpful? Give feedback.
-
That is correct. Only servers have the admin kubeconfig file present. Agents are less privileged and do not have any of the server's keys or other confidential materials. Note that the quick-start has you running kubectl commands on the just-installed server node, not on agents. |
Beta Was this translation helpful? Give feedback.
-
Ok. how does it work creating clusters and namespaces on worker instead on master? |
Beta Was this translation helpful? Give feedback.
-
Thank you for that, quite new to k3s. Can you help me with |
Beta Was this translation helpful? Give feedback.
-
https://rancher.com/docs/k3s/latest/en/quick-start/
Following the instructions from above return the error
The connection to the server localhost:8080 was refused - did you specify the right host or port?
. I have it setup on GCP.It allows me to use kubectl when I copy/paste the
/etc/rancher/k3s/k3s.yaml
from master into worker~/.kube/config
with updated ip but this I believe is not really creating any resources on a worker node but on master node.Beta Was this translation helpful? Give feedback.
All reactions