'kubectl is not configured and working with kubeadm [closed]
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?
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Shahab.es |
