I installed kubectl
and k3d
after following these official documentations (k3d and kubectl).
I created a cluster with the following command:
k3d cluster create mycluster
Then I ran this command:
kubectl cluster-info
Which gave me this error message:
The connection to the server localhost:8080 was refused - did you specify the right host or port?
After searching I found that the file /etc/kubernetes
wasn't created (which means no admin.conf
file was created), and the folder ~/.kube
also doesn't exist.
PS: see this answer to understand
Here are the versions of k3d
and kubectl
$ k3d version
k3d version v5.4.9
k3s version v1.25.7-k3s1 (default)
$ kubectl version --short
Client Version: v1.25.2
Kustomize Version: v4.5.7