본문 바로가기
DevOps

Harbor

by 이강복 2023. 5. 23.

Private registry

프라이빗한 도커 허브 느낌

 

Helm

#helm install

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

 

ingress-controller

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update

# ingress-controller

helm install ingress-nginx ingress-nginx/ingress-nginx \
  --set controller.service.annotations."service\.beta\.kubernetes\.io/azure-load-balancer-health-probe-request-path"=/healthz

 

repo 등록 및 압축 파일 다운로드 및 Name Space 생성

helm repo add harbor https://helm.goharbor.io

# 압축파일 다운로드
helm fetch harbor/harbor --untar

# namespace 생성
kubectl create ns harbor

 

harbor/values.yaml

36       core: harbor.k-tech.cloud
37       notary: notary.harbor.k-tech.cloud
47     className: "nginx"
127 externalURL: https://harbor.k-tech.cloud

 

Harbor 배포

helm install harbor -f harbor/values.yaml harbor/. -n harbor

 

SSL 인증

wget https://harbor.k-tech.cloud/api/v2.0/systeminfo/getcert --no-check-certificate
mv getcert /etc/docker/ca.crt

 

/etc/docker/daemon.json

{
"insecure-registries" : ["harbor.k-tech.cloud", "0.0.0.0"]
}
systemctl restart docker

 

admin , Harbor12345 로 도커 로그인

docker login https://harbor.k-tech.cloud

 

도커 이미지 build / push

docker build -t n1 jenkins/nginx/.
docker tag n1:latest harbor.k-tech.cloud/kangbock/nginx:latest
docker push harbor.k-tech.cloud/kangbock/nginx:latest

'DevOps' 카테고리의 다른 글

Dapr with AKS  (0) 2023.06.09
Kaniko  (0) 2023.05.23
ArgoCD Image Updater (현재 Beta 버전)  (0) 2023.02.24
Helm chart / kustomize  (0) 2023.02.24
CI/CD (Argo CD)  (0) 2023.01.31