🐳 Container/K8S

[K8s] helm chart를 이용하여 GKE에 jenkins 설치

heywantodo 2023. 7. 13. 10:30
728x90
반응형

[K8s] helm을 이용하여 GKE에 jenkins 배포

1. GKE 클러스터 생성

클러스터 생성은 GGP의 Cloud Shell에서 진행

 

1-1. Region 설정

gcloud config set compute/zone us-central1-f

1-2. cluster 배포

node 개수는 2개, type은 standard로 생성해줌

gcloud container clusters create jenkins-cluster \
--num-nodes 2 \
--machine-type n1-standard-2 \
--scopes "https://www.googleapis.com/auth/source.read_write,cloud-platform"

 

2. Helm repo 추가

helm repo add jenkins https://charts.jenkins.io
helm repo update

 

3. Helm Chart 설치

k create ns jenkins

helm show values jenkins/jenkins > jenkins-values.yaml
helm install jenkins jenkins/jenkins -f jenkins-values.yaml -n jenkins --wait

 

**설치 중 pod의 상태는 아래 명령어로 확인 가능

kubectl describe pods jenkins-0 -n jenkins
kubectl logs jenkins-0 -n jenkins

** 초기화 단계에서 에러가 난다면 아래 명령어로 확인

kubectl logs jenkins-0 -c init -n jenkins

 

728x90
반응형