Back
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?
Execute 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
mkdir -p $HOME/.kube
$ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
$ sudo chown $(id -u):$(id -g) $HOME/.kube/config
You should read Kubernetes to learn more about the concept. You can also enroll in Kubernetes Training in order to get a deeper understanding of Kubernetes.
31k questions
32.8k answers
501 comments
693 users