'Minikube always reset to initial state when restart it

I faced this problem since yesterday, no problems before.
My environment is

  • Windows 11
  • Docker Desktop 4.4.4
  • minikube 1.25.1
  • kubernetes-cli 1.23.3

Reproduce

1. Start minikube and create cluster

minikube start

2. Check pods

kubectl get po -A

NAMESPACE     NAME                               READY   STATUS    RESTARTS   AGE
kube-system   coredns-64897985d-z7rpf            1/1     Running   0          22s
kube-system   etcd-minikube                      1/1     Running   1          34s
kube-system   kube-apiserver-minikube            1/1     Running   1          34s
kube-system   kube-controller-manager-minikube   1/1     Running   1          33s
kube-system   kube-proxy-zdr9n                   1/1     Running   0          22s
kube-system   kube-scheduler-minikube            1/1     Running   1          34s
kube-system   storage-provisioner                1/1     Running   0          29s

3. Add new pod (in this case, use istio)

istioctl manifest apply -y

4. Check pods

kubectl get po -A

NAMESPACE      NAME                                  READY   STATUS    RESTARTS      AGE
istio-system   istio-ingressgateway-c6d9f449-nhbvg   1/1     Running   0             13s
istio-system   istiod-5ffcccb477-5hzgs               1/1     Running   0             19s
kube-system    coredns-64897985d-nxhxm               1/1     Running   0             67s
kube-system    etcd-minikube                         1/1     Running   2             79s
kube-system    kube-apiserver-minikube               1/1     Running   2             82s
kube-system    kube-controller-manager-minikube      1/1     Running   2             83s
kube-system    kube-proxy-8jfz7                      1/1     Running   0             67s
kube-system    kube-scheduler-minikube               1/1     Running   2             83s
kube-system    storage-provisioner                   1/1     Running   1 (45s ago)   77s

5. Restart minikube

minikube stop

then, back to 1 and and check pod, kubectl get po -A returns same pods as #2.
(In this case, istio-system is lost.)

Created pods etc. was retained till yesterday even restart minikube or PC.

Does anyone face same problem or have any solution?



Solution 1:[1]

This seems to be a bug introduced with 1.25.0 version of minikube: https://github.com/kubernetes/minikube/issues/13503 . A PR to revert the changes introducing the bug is already open: https://github.com/kubernetes/minikube/pull/13506

The fix is scheduled for minikube v1.26.

Solution 2:[2]

Following along with @CdrBlair I checked the changelog and this is actually already implemented into Version 1.25.2 - 2022-02-23

Bug Fixes:

  • Fix losing cluster on restart #13506

So hooray. I was also mortified to find my clusters being deleted ????

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Sergey
Solution 2 Evan Morrison