If you change the local network that your computer is connected to, the cluster's IP may change. If you try to use kubectl to connect to the cluster after this change, you'll see an error saying that the network is unreachable:
$ kubectl cluster-info
Kubernetes master is running at https://10.122.35.199:8443
Unable to connect to the server: dial tcp 10.122.35.199:8443: connect: network is unreachable
Whenever you see an error like this, run minikube status to check the state of the cluster:
$ minikube status
minikube: Running
cluster: Running
kubectl: Misconfigured: pointing to stale minikube-vm.
To fix the kubectl context, run minikube update-context
In this case, it informs us that kubectl is "pointing to the stale minikube-vm" and we should run minikube update-context to update kubectl to point to the new cluster IP:
$ minikube update-context
Reconfigured kubeconfig IP, now pointing at 192.168.1.11
After doing this, check that kubectl is able to communicate with the Kubernetes API server:
$ kubectl cluster-info
Kubernetes master is running at https://192.168.1.11:8443
KubeDNS is running at https://192.168.1.11:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy