CI/CD: Git, Jenkins and Argocd
TBD
TBD

Kubernetes manifests can get messy fast, especially when managing multiple environments. Kustomize helps you keep things clean by letting you customize YAML files without copying or rewriting them. In this article, we’ll explore how Kustomize simplifies and streamlines Kubernetes configuration. What does Kustomize do? let's say you already have a template for deployment, or you can generate sample deployment yaml from this command 1 kubectl create deployment <your deployment name> --image dummy --dry-run=client -o yaml this will generate a deployment yaml, then you can delete the following lines...
Preparation Get harbor offline/online I use offline method for the installation 1 2 3 $ mkdir ~/harbor-registry && cd ~/harbor-registry $ wget https://github.com/goharbor/harbor/releases/download/v2.11.2/harbor-offline-installer-v2.11.2.tgz $ tar xzvf harbor-offline-installer-v2.11.2.tgz You will need docker-compose this time 1 $ apt install docker-compose Deploy Setup configuration file Go to your harbor directory, it should be like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ....
Steps Tips: add k3s completion bash Add bash completion 1 2 3 4 5 6 cat << EOF | tee -a ~/.profile source <(sudo k3s kubectl completion bash) alias k='kubectl' alias kubectl='sudo k3s kubectl' complete -o default -F __start_kubectl k EOF Reload profile 1 source ~/.profile Get the registry cert 1 $ sudo mkdir -p /certs/registry.lab7.local && cd /certs/registry.lab7.local You can copy your certs to the node, or download it if you put on webserver, then the cert to the directory....
Topology Deploying registry 1. Deploy registry container Assuming you already have a kubernetes cluster, let’s build the registry create basic auth 1 2 $ mkdir -p ~/docker-registry/auth && cd ~/docker-registry $ htpasswd -Bbn admin <YOUR_PASSWORD> > auth/htpasswd Usage: htpasswd -Bbn [username] [password] deploying registry 1 2 3 4 5 6 7 8 $ docker run -d --name registry \ -v /root/docker-registry/creds/auth:/auth \ -v /docker:/var/lib/registry \ -e REGISTRY_AUTH=htpasswd \ -e REGISTRY_AUTH_HTPASSWD_REALM="Registry Realm" \ -e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \ -p 5000:5000 \ registry:2 Makesure the container is running well...