본문 바로가기

K8S/K8S

(DK) JUMP HOST의 HORBOR 인증서를 신뢰된 인증서 등록

728x90

UBUNTU

DOCKER가 설치되어 있어야함

 

마지막 harbor fqdn or ip는 harbor 인증서의 따라 다름 만약 인증서에 ip로 되어 있으면 ip로 fqdn으로 되어 있으면 fqdn으로 구성 하면 됨

예시에서 인증서에 발급대상이 IP로 되어 있으므로 폴더를 아이피로 생성

mkdir -p /etc/docer/cert.d/{ harbor fqdn or ip}

 

API 요청 

curl https://{HAORBOR FQDN or IP}/api/systeminfo/getcert -k -o ca.crt

 

예시

mkdir -p /etc/docker/cert.d/10.253.110.4

cd /etc/docker/cert.d/10.253.110.4

curl https://10.253.110.4/api/systeminfo/getcert -k -o ca.crt

cp /etc/docker/cert.d/10.253.110.4/ca.crt  /usr/local/share/ca-certificates/

update-ca-certificates

systemctl restart docker

인증서 update 및 docker restart


CENTOS

DOCKER가 설치되어 있어야함

 

마지막 harbor fqdn or ip는 harbor 인증서의 따라 다름 만약 인증서에 ip로 되어 있으면 ip로 fqdn으로 되어 있으면 fqdn으로 구성 하면 됨

예시에서 인증서에 발급대상이 IP로 되어 있으므로 폴더를 아이피로 생성

mkdir -p /etc/docer/cert.d/{ harbor fqdn or ip}

 

API 요청

curl https://{HAORBOR FQDN or IP}/api/systeminfo/getcert -k -o ca.crt

 

예시

mkdir -p /etc/docker/cert.d/10.253.110.4

cd /etc/docker/cert.d/10.253.110.4

curl https://10.253.110.4/api/systeminfo/getcert -k -o ca.crt

cp /etc/docker/cert.d/10.253.110.4/ca.crt /etc/pki/ca-trust/source/anchors/

update-ca-trust

systemctl restart docker
반응형

'K8S > K8S' 카테고리의 다른 글

(DK) K8S 자동 완성  (0) 2021.06.19
(DK) NAP을 위한 LOGSTASH 구성  (0) 2021.06.19
(DK) HARBOR IMAGE PULL  (0) 2021.06.19
(DK) HARBOR IMAGE PUSH  (0) 2021.06.19
(DK) HARBOR SECRET 설정  (0) 2021.06.19