yeonghoon.kim

  • 게시판
  • 갤러리

yeonghoon.kim 배포 파일을 Helm Chart로 전환

김영훈 2026.06.12 12:12 조회 수 : 18

기존에는 k8s 디렉터리 아래의 YAML 파일을 직접 적용했음.

k8s/
namespace.yaml
pv-pvc.yaml
secret.example.yaml
configmap-nginx.yaml
statefulset-db.yaml
deployment-web.yaml
service-web.yaml
ingress.yaml

kubectl apply -f k8s/

 

 

파일이 많아지고 이미지, Namespace, NFS 경로, 포트 등을 수정할 때마다 여러 YAML을 확인해야 해서 Helm Chart로 묶기 시작함.

Helm Chart 구조:

helm/rhymix/
Chart.yaml
values.yaml
templates/
namespace.yaml
pv-pvc.yaml
configmap-nginx.yaml
statefulset-db.yaml
service-db.yaml
deployment-web.yaml
service-web.yaml
ingress.yaml

 

 

기존 YAML에 있던 고정값을 values.yaml로 분리함.

namespace:
create: false
name: 3009-yeonghoon-kim

imagePullSecrets:

  • name: gitlab-registry-secret

web:
replicaCount: 1
nginx:
image:
repository: nginx
tag: alpine
pullPolicy: IfNotPresent
php:
image:
repository: registry.yeonghoon.kim/ioniere/3009-yeonghoon.kim/rhymix-php
tag: 8.2-001
pullPolicy: IfNotPresent
service:
port: 80

db:
replicaCount: 1
image:
repository: mariadb
tag: "10.6"
pullPolicy: IfNotPresent
service:
port: 3306
existingSecret: rhymix-db-secret

persistence:
nfsServer: 192.168.200.100
storageClassName: ""
html:
pvName: 3009-rhymix-html-pv
claimName: rhymix-html
size: 20Gi
accessMode: ReadWriteMany
path: /mnt/k8s-nfs/3009-yeonghoon.kim/html
mariadb:
pvName: 3009-rhymix-mariadb-pv
claimName: rhymix-mariadb
size: 10Gi
accessMode: ReadWriteOnce
path: /mnt/k8s-nfs/3009-yeonghoon.kim/mariadb

ingress:
enabled: true
className: nginx
hosts:
- yeonghoon.kim
- www.yeonghoon.kim

 

 

Secret 값은 Chart에 넣지 않고 기존 rhymix-db-secret과 gitlab-registry-secret을 이름으로만 참조함.

Chart 확인:

 

Helm Chart 문법을 확인한다.

helm lint ./helm/rhymix

 

Kubernetes에 적용될 YAML을 미리 출력한다.

helm template rhymix ./helm/rhymix -n 3009-yeonghoon-kim --set namespace.create=false

 

기존 리소스는 바로 삭제하지 않고 Helm 관리 메타데이터를 붙여 adoption 방식으로 전환함.

기존 Namespace와 Secret을 유지한 상태로 Helm release를 설치한다.

helm upgrade --install rhymix ./helm/rhymix -n 3009-yeonghoon-kim --set namespace.create=false

 

Helm release 상태를 확인한다.

helm list -n 3009-yeonghoon-kim
helm status rhymix -n 3009-yeonghoon-kim

 

Pod, PVC, Service, Ingress 상태를 확인한다.

kubectl get pods,pvc,svc,ingress -n 3009-yeonghoon-kim -o wide

 

기존 k8s 디렉터리는 비교와 복구용으로 남겨두고 helm/rhymix를 추가함.


  • 추천 0

  • 비추천 0
이 게시물을
목록

댓글 1

번호 제목 글쓴이 날짜 조회 수
19 DGX Kubernetes 구성 계획 김영훈 2026.06.08 25
18 Kubernetes 기본 클러스터, ingress-nginx 설치 김영훈 2026.06.09 15
17 Docker Compose 서비스를 Kubernetes로 이전(깃랩 도커 저장소 필요) [2] 김영훈 2026.06.10 20
» yeonghoon.kim 배포 파일을 Helm Chart로 전환 [1] 김영훈 2026.06.12 18
15 SOPS age로 Kubernetes Secret 암복호화 김영훈 2026.06.15 23
14 ArgoCD와 GitOps 구조 준비 김영훈 2026.06.16 16
13 CoreDNS로 GitLab Registry 내부 주소 고정 김영훈 2026.06.17 19
12 복구 런북 초반 누락 사항 정리 김영훈 2026.06.17 15
11 SOPS Secret 복구와 ArgoCD root Application 적용 김영훈 2026.06.18 28
10 관측 스택과 앱 배포 저장소 구조 정리 김영훈 2026.06.19 23
9 ArgoCD 복구 중 GitLab 접근 문제 정리 김영훈 2026.06.22 26
8 ImagePullBackOff와 registry pull secret 누락 김영훈 2026.06.22 17
7 worker 재부팅 전 drain 절차 정리 김영훈 2026.06.26 20
6 control-plane 장애 시나리오 관찰 김영훈 2026.06.27 12
5 OutOfSync와 Degraded 구분하기 김영훈 2026.06.28 25
4 Git revert는 기록을 지우는 게 아니라 되돌리는 기록을 남기는 것 김영훈 2026.06.29 19
3 Stateful과 Stateless 구분해보기 김영훈 2026.07.02 23
2 GitLab Registry PAT 만료로 이미지 Pull 실패 김영훈 2026.07.08 14
1 yeonghoon.kim php 업그레이드 김영훈 2026.07.09 0
쓰기 태그
 첫 페이지 8 9 10 11 12 13 14 15 16 17 끝 페이지