Home > OS >  kubectl is not configured and working with kubeadm
kubectl is not configured and working with kubeadm

Time:04-25

I'm trying to create a cluster using kubeadm. I've installed everything according to the guidelines of Kubeadm. Now, when I try to use the kubectl api, the following error occurred.

bash: /usr/local/bin/kubectl: Permission denied
The connection to the server localhost:8080 was refused - did you specify the right host or port?

I tried sudo kubectl config view:

apiVersion: v1
clusters: null
contexts: null
current-context: ""
kind: Config
preferences: {}
users: null

I tried resetting the kubeadm and re-installing everything, but the problem still exists.
What should I do?

CodePudding user response:

I installed docker and Kubernetes before installing Kubeadm on my VM. So, I created a new VM, and I've followed the instruction for installing the cluster via Kubeadm. So, the problem is solved.

  • Related