티스토리 뷰
1. helm
1) 헬름 차트: 애플리케이션 설치에 사용되는 네트워크, 스토리지, 보안과 관련된 여러 쿠버네티스 리소스를 묶어놓은 패키지
- 디렉토리 구조로 구서오디어 있으며, 각 디렉토리, 파일들은 리소스를 정의한다.
- 헬름 차트를 통해 개별 리소스 마다 하나씩 별도로 설치하지 않고 일괄 설치
2) 헬름리포지토리: 다양한 헬름 차트를 저장하고 공유하는 저장소
3) helm 설치
[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# chmod 700 get_helm.sh
[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# ./get_helm.sh
Downloading https://get.helm.sh/helm-v3.17.0-linux-amd64.tar.gz
Verifying checksum... Done.
Preparing to install helm into /usr/local/bin
helm installed into /usr/local/bin/helm
[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# helm
The Kubernetes package manager
Common actions for Helm:
- helm search: search for charts
- helm pull: download a chart to your local directory to view
- helm install: upload the chart to Kubernetes
- helm list: list releases of charts
- 레포지토리 추가
[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# helm repo add bitnami https://charts.bitnami.com/bitnami
"bitnami" has been added to your repositories
[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# 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!⎈
[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# helm search repo bitnami
NAME CHART VERSION APP VERSION DESCRIPTION
bitnami/airflow 22.4.7 2.10.4 Apache Airflow is a tool to express and execute...
bitnami/apache 11.3.2 2.4.63 Apache HTTP Server is an open-source HTTP serve...
bitnami/apisix 4.0.0 3.11.0 Apache APISIX is high-performance, real-time AP...
bitnami/appsmith 5.1.10 1.59.0 Appsmith is an open source platform for buildin...
[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# helm repo list
NAME URL
bitnami https://charts.bitnami.com/bitnami
2. helm을 활용한 nginx 설치
1) 레포지토리에 nginx 찾기
[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# helm search repo nginx
NAME CHART VERSION APP VERSION DESCRIPTION
bitnami/nginx 18.3.5 1.27.3 NGINX Open Source is a web server that can be a...
bitnami/nginx-ingress-controller 11.6.7 1.12.0 NGINX Ingress Controller is an Ingress controll...
bitnami/nginx-intel 2.1.15 0.4.9 DEPRECATED NGINX Open Source for Intel is a lig...
2) nginx pull
[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# helm pull bitnami/nginx
[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# ls
get_helm.sh kube-ps1 nginx-18.3.5.tgz
3) nginx 압축해제
[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# tar xvfz nginx-18.3.5.tgz
[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# rm -rf nginx-18.3.5.tgz
[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# mv nginx/ nginx-12.0.4
[root@DESKTOP-ARLDN2P ~ (ubun01:default)]# cd nginx-12.0.4/
4) value 설정
- helm에서 리소스를 설치할 떄 필요한 변수를 values를 통해 설정한다.
cp values.yaml my-values.yaml
vi my-values.yaml
## @param replicaCount Number of NGINX replicas to deploy
##
replicaCount: 2 #수정
5) nginx 설치
[root@DESKTOP-ARLDN2P nginx-12.0.4 (ubun01:default)]# k create ns nginx
namespace/nginx created
[root@DESKTOP-ARLDN2P nginx-12.0.4 (ubun01:default)]# k ns nginx
Context "ubun01" modified.
Active namespace is "nginx".
[root@DESKTOP-ARLDN2P nginx-12.0.4 (ubun01:nginx)]# helm install nginx -f my-values.yaml
Error: INSTALLATION FAILED: must either provide a name or specify --generate-name
[root@DESKTOP-ARLDN2P nginx-12.0.4 (ubun01:nginx)]# helm install nginx -f my-values.yaml .
6) 확인
[root@DESKTOP-ARLDN2P nginx-12.0.4 (ubun01:nginx)]# helm ls
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
nginx nginx 1 2025-02-01 18:27:38.405339026 +0900 KST deployed nginx-18.3.5 1.27.3
[root@DESKTOP-ARLDN2P nginx-12.0.4 (ubun01:nginx)]# k get po,deploy,svc
NAME READY STATUS RESTARTS AGE
pod/nginx-74dc7bcf4d-c5tp6 1/1 Running 0 33s
pod/nginx-74dc7bcf4d-cdmlh 1/1 Running 0 32s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/nginx 2/2 2 2 33s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/nginx LoadBalancer 10.233.33.112 <pending> 80:32199/TCP,443:30972/TCP 33s
[root@DESKTOP-ARLDN2P nginx-12.0.4 (ubun01:nginx)]# helm get manifest nginx #helm 설치 내용 확인
'쿠버네티스 > 프로젝트' 카테고리의 다른 글
쿠버네티스 프로젝트 6) Traefik (0) | 2025.02.04 |
---|---|
쿠버네티스 프로젝트 5) MetalLB를 활용한 로드밸런서와 vote 어플리케이션 만들기 (0) | 2025.02.01 |
쿠버네티스 프로젝트 3) 로컬 원격설정 (0) | 2025.02.01 |
쿠버네티스 프로젝트 2) 클러스터 설치(kubespray) (0) | 2025.01.29 |
쿠버네티스 프로젝트 1) 서버 설치 (0) | 2025.01.29 |