본문 바로가기
Kubernetes(k8s)

[Minikube] Minikube Stop And Start 시 helm 배포 Pod 유지 않되는 현상

by 곰민 2023. 8. 24.
728x90

Minikube 재시작 시 자원 삭제 문제가 있었고 그에 따른 해결 방법을 혹시나 같은 이슈로 방안을 못 찾는 분들을 위해서 글을 짤막하게나마 남겨두려고 합니다.

 

있었는데요 없습니다

상황


M1 Mac 환경에서 Minikube와 helm 을 이용해서 개인 프로젝트 용으로 postgresql, mongodb, redis를 배포하여 Local Cluster를 구축하고 있었습니다.

 

 

k9s를 통해서 보면 위와 같이 정상 배포된 것들을 확인할 수 있습니다.

 

문제점


helm 차트도 잘 관리되고 배포도 잘되고 실제로 떠있는것도 잘 떠있는데 문제는

 

Minikube Stop 후 Start를 하면 Pod들이 유지가 되지를 않았습니다.

 

 

Minikube를 Stop 하고 Start 만 하면

 

 

K9s에서 helm 으로 배포된 Pod들을 확인할 수가 없습니다.

 

의문점


1. Minikube 자체적으로 원래 로컬 클러스터 재시작시 배포한 Resource 들을 초기화 하는가?

2. Helm 차트를 배포시 PVC 설정이 누락되었는가?

3. Helm 차트 설정 시 내가 모르는 별도의 Cluster 유지 속성 값이 있는가?

 

3가지 정도로 의문이 모이기 시작했습니다.

 

먼저 2번의 경우 helm value.yaml 을 기준으로 보았을 때 pvc 설정 값은 제대로 들어가 있는 것 같았습니다.

 

helm에서 별도의 Cluster 유지속성 없이 도 유지가 딱히 보이지도 않는 것 같았습니다.

 

그렇다면 1번? Cluster를 Stop 하고 Start 할 때마다 매번 Helm으로 배포하는 게 말도 안 된다고 생각되는 그때

 

해결


https://stackoverflow.com/questions/71297948/kubernetes-minikube-removes-all-resources-after-shutting-down

 

Kubernetes Minikube removes all resources after shutting down

The Minikube cluster on my Debian system removes all resources which have been up and running after I run minikube stop or shutting down the system. What could possibly be the reason? How can I per...

stackoverflow.com

 

위 글을 발견하게 됩니다.

 

The Minikube cluster on my Debian system removes all resources which have been up and running after I run `minikube stop` or shutting down the system.
What could possibly be the reason? How can I persist it?

 

Debian 환경에서 MInikube를 Stop할시 배포된 Resource들을 전부 제거하며 어떻게 하면 Stop을 하고 나서도 해당 Resource들을 영속시킬 수 있을지에 대한 질문이었습니다.

 

https://github.com/kubernetes/minikube/issues/12655

 

Minikube Destroys Itself On Minikube Start - wipes out ALL deployed content · Issue #12655 · kubernetes/minikube

Steps to reproduce the issue: Shutdown minikube with: minikube stop Let EC2 instance stop Restarted EC2 instance Attempted to minikube start - produced failure - this is the 2nd time this has happe...

github.com

 

minikube 1.25.2 가 배포되면서 해결된 이슈였습니다.

 

혹시나 해서 보니 이전에 arm 용으로 1.25.1을 설치해두고 안 쓰고 있다가 오랜만에 다시 꺼내서 쓰고 있었던 상황이었습니다..

 

1.32.2로 버전 업을 하니

 

잘 유지됩니다.

 

 

 

728x90

댓글