실무에서 private한 registry가 필요하다. 그 설정하는 실습을 진행하여 과제로 제출하였다.
#헬름 레포
helm repo add harbor https://helm.goharbor.io
#helm chart에 등록된 파일 받는 명령어
helm fetch harbor/harbor --untar
values.yaml
expose.tls.certSource=none # 19줄
expose.ingress.hosts.core=harbor.<각자자신의도메인> # 36줄
expose.ingress.hosts.notary=notary.<각자자신의도메인> # 37줄
expose.ingress.hosts.core=harbor.gasida.link
expose.ingress.hosts.notary=notary.gasida.link
expose.ingress.controller=alb # 44줄
expose.ingress.className=alb # 46줄~
expose.ingress.annotations=alb.ingress.kubernetes.io/scheme: internet-facing
expose.ingress.annotations=alb.ingress.kubernetes.io/target-type: ip
expose.ingress.annotations=alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS":443}, {"HTTP":80}]'
expose.ingress.annotations=alb.ingress.kubernetes.io/certificate-arn: ${CERT_ARN}
externalURL=https://harbor.<각자자신의도메인> # 131줄
externalURL=https://harbor.gasida.link
helm install harbor harbor/harbor -f ~/harbor/values.yaml --namespace harbor --version 1.11.0
certSource는 온프레미스 환경에서 https 인증키를 등록할 시 cert와 key값을 넣기 때문에 이 기능을 끄는 것
annotation 옵션을 작성하여 Harbor 설치 시에 ingress에 추가되는 부분들
externalURL = https://harbor.도메인값
이 실습에서 배운 점들
Download a chart from a repository and (optionally) unpack it in local directory(helm fetch로 할 수 있는 것)
kubectl create ns gitlab
helm repo add gitlab https://charts.gitlab.io/
helm repo update
helm fetch gitlab/gitlab --untar
global:
hosts:
domain: <각자자신의도메인> # 52줄
https: true
ingress: # 66줄~
configureCertmanager: false
provider: aws
class: alb
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS":443}, {"HTTP":80}]'
alb.ingress.kubernetes.io/certificate-arn: ${CERT_ARN}
alb.ingress.kubernetes.io/success-codes: 200-399
alb.ingress.kubernetes.io/group.name: "gitlab"
tls: # 79줄
enabled: false
certmanager: # 833줄
installCRDs: false
install: false
rbac:
create: false
nginx-ingress: # 847줄
enabled: false
prometheus: # 904줄
install: false
gitlab-runner: # 1130줄
install: false
#헬름으로 깃랩 설치
helm install gitlab gitlab/gitlab -f ~/gitlab/values.yaml --namespace gitlab --version 6.8.1
#비밀번호 확인
kubectl get secrets -n gitlab gitlab-gitlab-initial-root-password --template={{.data.password}} | base64 -d ;echo
git config 등록하기
git config --list
git config --global user.name "<각자 자신의 Gialba 계정>"
git config --global user.email "<각자 자신의 Gialba 계정의 이메일>"
이 실습에서 배운 점들
kubectl create ns argocd
helm repo add argo https://argoproj.github.io/argo-helm
helm repo update
helm install argocd argo/argo-cd --set server.service.type=LoadBalancer --namespace argocd --version 5.19.14
# CLB에 ExternanDNS 로 도메인 연결
kubectl annotate service -n argocd argocd "external-dns.alpha.kubernetes.io/hostname=argocd.$KOPS_CLUSTER_NAME"
# admin 계정의 암호 확인
ARGOPW=$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d)
echo $ARGOPW
리소스
참고문서(24단계 실습으로 정복하는 쿠버네티스)
이 실습에서 배운 점들