Skip to main content

Harbor

Harbor is an open source registry that secures artifacts with policies and role-based access control, ensures images are scanned and free from vulnerabilities, and signs images as trusted. Harbor, a CNCF Graduated project, delivers compliance, performance, and interoperability to help you consistently and securely manage artifacts across cloud native compute platforms like Kubernetes and Docker.

์ฐธ์กฐ: https://goharbor.io/

Install Harbor#

๋จผ์ € ์‚ฌ์šฉ์ž์˜ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์„ service ํด๋Ÿฌ์Šคํ„ฐ์— ๋ฐฐํฌํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” Docker Container Registry๋ฅผ ์„ค์น˜ํ•ด์•ผ ํ•œ๋‹ค. kupboard์—์„œ๋Š” Harbor๋ฅผ ๋””ํดํŠธ ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ๋กœ ์‚ฌ์šฉํ•œ๋‹ค.

kupboard๋Š” Harbor ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ ์„ค์น˜๋ฅผ ์œ„ํ•œ ๋””ํดํŠธ kollection ํŒจํ‚ค์ง€๋ฅผ ์ œ๊ณตํ•˜๊ณ  ์žˆ์œผ๋ฉฐ, ์•„๋ž˜ ๋ช…๋ น์–ด๋กœ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ๋‹ค.

$ kupboard kollection package -n harbor
note

Harbor ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ๋ฅผ ์„ค์น˜ํ•˜๊ธฐ ์ „์— data/certs์— ssl ์ธ์ฆ์„œ๊ฐ€ ์žˆ์–ด์•ผ ํ•˜๋ฉฐ, https://harbor.mycompany.com๊ฐ€ admin-node1๋กœ ์ด๋™ํ•˜๋„๋ก DNS ์„ค์ •์ด ํ•„์š”ํ•˜๋‹ค.

Package Deployment#

$ kupboard kollection package -n harbor -a <action>
Pakcage NameClusterActionDefault
harboradmindeploytrue
delete

Setting#

https://harbor.mycompany.com์œผ๋กœ Harbor WebUI์— ์ ‘์† ํ›„ ์‚ฌ์šฉ์ž์™€ ํ”„๋กœ์ ํŠธ๋ฅผ ๋“ฑ๋กํ•ด์•ผ ํ•œ๋‹ค. kupboard.yaml์— ์ •์˜๋œ ๊ฐ’์„ ์ฐธ์กฐํ•˜๋„๋ก ํ•œ๋‹ค.

## Project Information
##
kube_registry_username: kupboard
kube_registry_password: Kupboard1234
kube_registry_email: username@email.com
kube_registry_domain: harbor.mycompany.com
kube_registry_url: harbor.mycompany.com/myproject
## Secrets
##
harbor_admin_password: kupboard

์šฐ์„  admin ๊ณ„์ •์œผ๋กœ ๋กœ๊ทธ์ธํ•œ๋‹ค. ๋””ํดํŠธ username์€ admin์ด๋ฉฐ ํŒจ์Šค์›Œ๋“œ๋Š” kube_registry_password์œผ๋กœ ์ •์˜๋œ ๊ฐ’์„ ์‚ฌ์šฉํ•œ๋‹ค.

pkg-harbor1

๊ทธ๋ฆฌ๊ณ  kube_registry_username์™€ kube_registry_password์˜ ๊ฐ’์„ ์‚ฌ์šฉํ•˜์—ฌ ์‚ฌ์šฉ์ž๋ฅผ ๋“ฑ๋กํ•œ๋‹ค.

pkg-harbor2

์ƒˆ๋กœ์šด ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•  ๋•Œ์—๋Š” kube_registry_url ๊ฐ’์˜ ์ฐธ์กฐํ•œ๋‹ค. kube_registry_url์˜ / ์ดํ›„ ๊ฐ’์ด ํ”„๋กœ์ ํŠธ๋ช…์ด ๋œ๋‹ค.

pkg-harbor3

์œ„์—์„œ ์ƒ์„ฑํ•œ ์‚ฌ์šฉ์ž๋ฅผ ํ”„๋กœ์ ํŠธ์— ๋“ฑ๋กํ•œ๋‹ค.

pkg-harbor4