본문 바로가기

Container/Kubernetes

[K8S] Upgrading a helm chart - kodekloud 실습

1. Add bitnami helm chart repository to the cluster.

# Helm 설치 확인
$ helm version
version.BuildInfo{Version:"v3.17.1", GitCommit:"980d8ac1939e39138101364400756af2bdee1da5", GitTreeState:"clean", GoVersion:"go1.23.5"}

# Bitnami chart repo 추가
$ helm repo add bitnami https://charts.bitnami.com/bitnami
"bitnami" has been added to your repositories

# 저장소 업데이트
$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "bitnami" chart repository
Update Complete. ⎈Happy Helming!⎈

 

2. How many releases of nginx can you see in the cluster now?

controlplane ~ ➜  helm list
NAME            NAMESPACE       REVISION        UPDATED                                  STATUS          CHART           APP VERSION
dazzling-web    default         3               2025-02-21 09:09:16.027341102 +0000 UTC  deployed        nginx-12.0.4    1.22.0
# dazzling-web -> release name

 

3. How many revisions of nginx exists in the cluster?

  • Release History 확인하기: helm history <release-name> --namespace <namespace>
$ helm history dazzling-web
REVISION        UPDATED                         STATUS          CHART            APP VERSION     DESCRIPTION     
1               Fri Feb 21 09:09:13 2025        superseded      nginx-12.0.4     1.22.0          Install complete
2               Fri Feb 21 09:09:14 2025        superseded      nginx-12.0.5     1.22.0          Upgrade complete
3               Fri Feb 21 09:09:16 2025        deployed        nginx-12.0.4     1.22.0          Upgrade complete

 

4. Which version of nginx is currently running in the cluster? -> 1.22.0

5. The DevOps team has decided to upgrade the nginx version to 1.27.x and use the Helm chart version 18.3.6 from the Bitnami repository.

$ helm upgrade  dazzling-web bitnami/nginx --version 18.3.6
Pulled: us-central1-docker.pkg.dev/kk-lab-prod/helm-charts/bitnami/nginx:18.3.6
Digest: sha256:19a3e4578765369a8c361efd98fe167cc4e4d7f8b4ee42da899ae86e5f2be263
Release "dazzling-web" has been upgraded. Happy Helming!
NAME: dazzling-web
LAST DEPLOYED: Fri Feb 21 09:25:41 2025
NAMESPACE: default
STATUS: deployed
REVISION: 4
TEST SUITE: None
NOTES:
CHART NAME: nginx
CHART VERSION: 18.3.6
APP VERSION: 1.27.4


$ helm list
NAME            NAMESPACE       REVISION        UPDATED                                    STATUS          CHART           APP VERSION
dazzling-web    default         4               2025-02-21 09:25:41.690758992 +0000 UTC    deployed        nginx-18.3.6    1.27.4

$ helm history dazzling-web
REVISION        UPDATED                         STATUS          CHART              APP VERSION     DESCRIPTION     
1               Fri Feb 21 09:09:13 2025        superseded      nginx-12.0.4       1.22.0          Install complete
2               Fri Feb 21 09:09:14 2025        superseded      nginx-12.0.5       1.22.0          Upgrade complete
3               Fri Feb 21 09:09:16 2025        superseded      nginx-12.0.4       1.22.0          Upgrade complete
4               Fri Feb 21 09:25:41 2025        deployed        nginx-18.3.6       1.27.4          Upgrade complete

 

6. upgrade &  rollback the nginx to previous version.

controlplane ~ ➜ helm rollback dazzling-web 3
Rollback was a success! Happy Helming!

controlplane ~ ➜  helm history dazzling-web
REVISION        UPDATED                         STATUS          CHART              APP VERSION     DESCRIPTION     
1               Fri Feb 21 09:09:13 2025        superseded      nginx-12.0.4       1.22.0          Install complete
2               Fri Feb 21 09:09:14 2025        superseded      nginx-12.0.5       1.22.0          Upgrade complete
3               Fri Feb 21 09:09:16 2025        superseded      nginx-12.0.4       1.22.0          Upgrade complete
4               Fri Feb 21 09:25:41 2025        superseded      nginx-18.3.6       1.27.4          Upgrade complete
5               Fri Feb 21 09:42:08 2025        deployed        nginx-12.0.4       1.22.0          Rollback to 3
반응형

'Container > Kubernetes' 카테고리의 다른 글

[K8S] Kustomize build  (0) 2025.02.22
[K8S]Kustomize  (1) 2025.02.21
[K8S] Lifecycle management with Helm  (0) 2025.02.21
[K8S] Helm  (0) 2025.02.20
[K8S] Troubleshoot Network 예제  (0) 2025.02.12