In Harbor, a project serves as a logical unit for organizing and managing a collection of container images. It provides a way to group related artifacts together and apply specific policies, access controls, and replication rules to the entire collection. Images cannot be pushed or pulled to Harbor before a project is created.
Before you begin
Before you begin, you must initialize your identity with the Harbor registry by signing in to the Harbor UI at least once.
Required IAM role
To create Harbor projects and manage image namespaces, contact your Project IAM
Admin to request the Harbor Project Creator (harbor-project-creator)
role, which lets you create, get, and watch Harbor projects in the project
namespace. This role includes the required permissions to define new image
namespaces so you can establish security boundaries for your containerized
applications.
Create a Harbor project
Create a Harbor project using the GDC console or the gdcloud CLI.
Console
In the GDC console, follow these steps:
- Click the Harbor Container Registry link in the CI/CD section in the navigation menu.
- Click Create a Harbor project.
- Enter the name of the project.
- Optional: Vulnerability scanning is enabled by default. To disable automatic vulnerability scanning for Harbor projects, click the Enable vulnerability scanning for the project toggle. For more information, see Scan for vulnerabilities.
- Click Create.
- A confirmation message appears stating your project is created successfully.
- After your Harbor project is created, sign in to the Harbor UI to confirm that you can view the Harbor project.
gdcloud
Create the Harbor project:
gdcloud harbor harbor-projects create HARBOR_PROJECT \
--project=PROJECT \
--instance=INSTANCE
Replace the following:
HARBOR_PROJECT: the name of the Harbor project to create.PROJECT: the name of the GDC project.INSTANCE: the name of the instance.
What's next
After you create a Harbor project, configure your Docker and Helm clients to connect to your Harbor registry: