microk8s Connection to port 16443 was refused
It is hard to tell exactly what might went wrong here but there are few things that you could do in order to fix your issue:
.kube/config
is missing or not configured correctly. Create or copy a valid kubeconfig file to solve this.You have
swap
not turned off. Withswap
enabled, kubelet service will not start. Execute:sudo swapoff -a
in order to make sure it is disabled.kubelet
might be down. Checkkubelet
logs and make sure thatkube-apiserver
is up and running.Check which ports are appropriate to use with the
telnet
command.
check your /etc/ hosts filethere should be these lines
127.0.0.1 localhost127.0.1.1 name you servers
iptables were provisioned by ansible which were messing with microk8s iptables configuration