Since kubernetes does not provide an internal container registry but having one would be really useful, therefore we are going to deploy a container registry to our kubernetes using Harbour.
A container image is a ready-to-run software package, containing everything needed to run an application: the code and any runtime it requires, application and system libraries, and default values for any essential settings.
A container registry is a repository, or collection of repositories, used to store container images for Kubernetes, DevOps, and container-based application development.
Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.
The image shows container evolution, Kubernetes helps in orchestration of modern containers.
Helm helps us to manage Kubernetes applications — Helm Charts help us define, install, and upgrade even the most complex Kubernetes application.
I am going to use my local Linux terminal to deploy clusters and etc. check out this to install DigitalOcean CLI and authenticate your local terminal with its API. { I have already authenticated my terminal, so before going to step 1, refer the above link and auth. your digitalocean CLI }
Step 1 : Setting up kubernetes cluster on DigitalOcean
Go to your local terminal and type in the following command and set the flags according to your requirement. This could take few minutes for the kubernetes cluster to get provisioned and get running.
doctl kubernetes cluster create kube-challenge --version 1.21.5-do.0 --count 3 --size s-1vcpu-2gb --region blr1
Now install also install kubectl which helps as to operate over our kubernetes cluster in later part.
Also install HELM using the this link. { you can follow the steps in link to install helm through a script }.
I am using Bitnami helm chart to install harbour registry. { you can refer the link for more details or can follow the sub steps below }
- add bitnami repo to helm
helm repo add bitnami https://charts.bitnami.com/bitnami
- before directly installing we need to edit the harbor-values.yml file [you can find in the current directory once you run this command] to change external url to our external one and change harbour admin password
helm show values bitnami/harbor > harbor-values.yaml
- Now install using
helm install harbor bitnami/harbor --values harbor-values.yaml -n harbor --create-namespace
Now lets wait for the loadbalancer's external IP to be activated, we can check the progress using the following commands