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
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
Try and auto generate your kubeconfig.
gcloud container ...READ MORE
$ kubectl get svc
The connection to the ...READ MORE
You probably missed the --client-ca-file flag in ...READ MORE
I was facing the same error.
The nginix ...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