728x90
반응형
> 패키지 구조 비교
> 배포 파이프라인 구축 후 마주하게 되는 고민들
1. Kustomize 배포 시작하기
- pipeline 생성 및 config 설정
Enter an item name에 [2222-deploy-kustomize] 입력
Copy form에 [2221-deploy-helm] 입력
[OK] 버튼 클릭
Definition > SCM > Branches to build > Additional Behaviours > Sparse Checkout paths > Path : 2222
Definition > Script Path : 2222/Jenkinsfile
- 저장 후 지금 빌드 실행, 페이지 새로고침 하기
* 최초 실행시엔 매개변수 입력 버튼이 안나옴 [dev, qa, prod]중 dev가 적용됨
- 파라미터와 함께 빌드 실행 후 PROFILE을 dev로 선택하고 빌드하기 클릭
- Stage View 결과 확인
- 파라미터와 함께 비르 실행 후 PROFILE을 qa, prod도 실행해보기
- 디렉토리 구조
- 실습 후 정리
# namespace 삭제
kubectl delete ns anotherclass-222-dev
kubectl delete ns anotherclass-222-qa
kubectl delete ns anotherclass-222-prod
2. 같은내용 Helm으로 배포하기
- pipeline 생성 및 config 설정
Enter an item name에 [2223-deploy-helm] 입력
Copy form에 [2222-deploy-kustomize] 입력
[OK] 버튼 클릭
Definition > SCM > Branches to build > Additional Behaviours > Sparse Checkout paths > Path : 2223
Definition > Script Path : 2223/Jenkinsfile
- 저장 후 파라미터와 함께 빌드, PROFILE을 dev로 빌드하기
* pipeline 복사하기로 "Choice Parameter"가 복사되었기 때문에 처음부터 파라미터와 함께 빌드가 활성화됨
- Stage View 결과확인
- 실습 후 정리
# helm 조회
helm list -n anotherclass-222
# helm 삭제
helm uninstall -n anotherclass-222-dev api-tester-2223
helm uninstall -n anotherclass-222-qa api-tester-2223
helm uninstall -n anotherclass-222-prod api-tester-2223
# namespace 삭제
kubectl delete ns anotherclass-222-dev
kubectl delete ns anotherclass-222-qa
kubectl delete ns anotherclass-222-prod
728x90
반응형
'Container > Kubernetes' 카테고리의 다른 글
[ Kubernetes ] ArgoCD 빠르게 레벨업 하기 (0) | 2024.08.01 |
---|---|
[ Kubernetes ] 배포 파이프라인 구축시 고려해봐야 할 부분 (1) | 2024.07.24 |
[ Kubernetes ] Helm과 Kustomize 비교하며 사용하기 - Helm 배포 (0) | 2024.07.17 |
[Kubernetes] Jenkins Pipeline (4) | 2024.07.16 |
[Kubernetes] 데브옵스 환경 구축 (0) | 2024.06.24 |