본문 바로가기

Helm (헬름)/Helm

Helm 으로 Application 설치 후 삭제 방법

# Helm 명령어를 이용하여 Application 설치 후 삭제 방법에 대해 정리

kubectl create ns prometheus
helm install prometheus prometheus-community/prometheus -f values-prometheus.yaml -n prometheus
helm install grafana grafana/grafana -f values-grafana.yaml -n prometheus

예를들어 위와 같이 prometheus라는 네임 스페이스를 만들고 helm을 이용하여 인스톨을 할 경우 추후에 삭제 시 kubectl delete -f values-prometheus.yaml 라는 명령어를 입력하여 삭제를 할때, 정상적으로 삭제가 되지 않는다.

이럴 경우에는 해당 네임스페이스를 삭제하여 문제를 해결할 수 있다.

kubectl delete namespace prometheus

# Helm 삭제

- 설치했던 Helm 명령어를 기억해 둔다.

- 보통 설치 명령어는 아래와 같다.

helm install mongodb-tset bitnami/mongodb-sharded --namespace mongo --values values-mongo.yaml

- 삭제 명령어

helm uninstall mongodb-tset bitnami/mongodb-sharded -n mongo

- pod를 조회해보면 삭제가 된것을 확인 할 수 있다.

# 추가

- 아래의 명령어로 uninstall을 수행하면 해당 repo로 설치된 pod 리소스까지 함께 삭제 된다.

helm repo list

helm uninstall aws-ebs-csi-driver --namespace kube-system