I'm trying to create a simple service on kubernetes
kubectl create serviceaccount dashboard -n default
but it throws the following error
The connection to the server localhost:8080 was refused - did you specify the right host or port?
Run the following command as a normal user
mkdir -p $HOME/.kube
$ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
$ sudo chown $(id -u):$(id -g) $HOME/.kube/config
Try to restart your cluster. Or check the configuration file.
$ kubectl config view
I had the exact same error when I was trying to create a cluster on GCP. This is how I got it sorted:
Try using --server to specify your master:
kubectl --server=126.96.36.199:8080 get pod -o wide
I was trying to get status from a remote system using ansible and I was facing the same issue.
I tried and it worked.
kubectl --kubeconfig ./admin.conf get pods --all-namespaces -o wide
You may get this error if Kubectl ...READ MORE
This error may occur because of network ...READ MORE
Try and auto generate your kubeconfig.
gcloud container ...READ MORE
$ kubectl get svc
The connection to the ...READ MORE
Hey @nmentityvibes, you seem to be using ...READ MORE
Try using ingress itself in this manner
except ...READ MORE
Hi Kalgi after following above steps it ...READ MORE
Follow these steps:
$ kubeadm reset
$ kubeadm init ...READ MORE
export KUBECONFIG=/etc/kubernetes/admin.conf READ MORE
official Documentation says:
A client should be skewed ...READ MORE
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.