You need to start minikube first
command:
minikube start
and then try it again
You need to start minikube first
command:
minikube start
and then try it again
Thanks this solution works
Thank you so much… It helped
on Master node its working
When upgrading k8s from 1.24.1 to 1.25.1, the API server fails to start, with an error of “connection refused on port 6443”.
The following command let you do kubectl with no root user.
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
If you do it with root user, need configure like below:
export KUBECONFIG=/etc/kubernetes/admin.conf
Second root config overwrite the first no-root config. You will get the error when using no-root user to do kubectl. So don’t config the root one if you want to use no-root user.
Also, when you run like kubectl apply. Don’t use sudo when only no-root user is configured. You will also get the error because you are trying to do it as root.
I have the same issue , and i soved this use command below:
export KUBECONFIG=$HOME/.kube/config
Thank you so much @Alex_Ivan. It worked.