06 Harbor Container registry
Kubernetes need a place to pull the container images from. In this lab we are using Harbor an open source container registry, started by VMware.
For our first deployment to work, we first need to build a container, then login and then push the container to that registry .
- Start by building the container, and tagging it with the correct name and registry by changing student to your number, and running.
docker build -t registry.tanzu.dk/ops2devops/studentx:v1 .
- Then login to the registry by running
docker login registry.tanzu.dk
- username :
ops2devops
- Password :
VMware1!
- Then push the container to the registry, by running
docker push registry.tanzu.dk/ops2devops/studentx:v1
After this is done, verify the image is now there, by opening a browser to https://registry.tanzu.dk and login, using the same username and password as before.
Open the project
ops2devops
Open the folder you just created (Find your student number)
Here you will find your image. Note the tag you supplied.
Also note the Vulnerabilities icon. Harbor can security scan every image on push, and setup rules for pulls, depending on the severity.
For now, just note the name and tag of the image. You will need it in next step.