Kubernetes : starting minikube on Windows 10 box – resolving error – Unable to restart cluster, will reset it: apiserver health: apiserver healthz never reported healthy: cluster wait timed out during healthz check

kubernetes - error while starting minikube
kubernetes - error while starting minikube

Hi All,

Greetings for the day!!!

Today new issue and solution!

Background

  • I have minikube installed on my local Windows 10 box
  • I am using this for my testing and hands-on purpose
  • It was working properly but suddenly stopped working
  • Minikube was not starting
  • I am using CMDLET – minikube start

C:\>minikube start

If you do not know how to setup or configure minikube on local box please refer my previous article – Kubernetes – Setting up kubernetes cluster for development on Windows 10 box using minikube

Issue / Error

  • Following error we are getting

! Unable to restart cluster, will reset it: apiserver health: apiserver healthz never reported healthy: cluster wait timed out during healthz check

! initialization failed, will try again: wait: /bin/bash -c “sudo env PATH=/var/lib/minikube/binaries/v1.22.1:$PATH kubeadm init –config /var/tmp/minikube/kubeadm.yaml –ignore-preflight-errors=DirAvailable–etc-kubernetes-manifests,DirAvailable–var-lib-minikube,DirAvailable–var-lib-minikube-etcd,FileAvailable–etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable–etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable–etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable–etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem”: Process exited with status 1stdout

Unfortunately, an error has occurred: timed out waiting for the condition

This error is likely caused by:
– The kubelet is not running
– The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)

If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
– ‘systemctl status kubelet’
– ‘journalctl -xeu kubelet’

Additionally, a control plane component may have crashed or exited when started by the container runtime.
To troubleshoot, list all containers using your preferred container runtimes CLI

stderr:
[WARNING Service-Kubelet]: kubelet service is not enabled, please run ‘systemctl enable kubelet.service’
error execution phase wait-control-plane: couldn’t initialize a Kubernetes cluster
To see the stack trace of this error execute with –v=5 or higher

kubernetes - error while starting minikube
fig : kubernetes – error while starting minikube
kubernetes - error while starting minikube
kubernetes – error while starting minikube

Solution

  • After bit googling one of the approach found is delete existing minikube cluster
  • For deleting existing minikube cluster we will use minikube CMDLET – minikube delete

minikube delete

kubernetes - deleting existing minikube cluster
fig : kubernetes – deleting existing minikube cluster

  • Once existing minikube cluster deleted successfully, we will start again using minikube CMDLET – minikube start

minikube start

kubernetes - minikube start
fig : kubernetes – minikube start
  • As we see in above fig, after deleting existing minikube cluster and starting again minikube cluster is starts successfully
  • Once minikube cluster started successfully, we are ready to execute kubectl CMDLETS

C:\>kubectl get pods

fig : kubernetes - executing kubectl CMDLETs after successfully starting minikube cluster
fig : kubernetes – executing kubectl CMDLETs after successfully starting minikube cluster

Thanks for reading!!! Please feel free to discuss in case any issue / thoughts / queries

HAVE A WONDERFUL TIME AHEAD!!! LIFE IS BEAUTIFUL 🙂

Prasham Sabadra

LIFE IS VERY BEAUTIFUL :) ENJOY THE WHOLE JOURNEY :) Founder of Knowledge Junction and live-beautiful-life.com, Author, Learner, Passionate Techie, avid reader. Certified Professional Workshop Facilitator / Public Speaker. Scrum Foundation Professional certificated. Motivational, Behavioral , Technical speaker. Speaks in various events including SharePoint Saturdays, Boot camps, Collages / Schools, local chapter. Can reach me for Microsoft 365, Azure, DevOps, SharePoint, Teams, Power Platform, JavaScript.

You may also like...

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: