Stay safe with Kubernetes CI/CD …

Sami Islam
10 min readOct 21, 2022

… and put on your Helmet

unDraw by Katerina Limpitsouni

In my journey to learn Kubernetes (k8s), I soon realized how difficult it is to deploy k8s objects individually on many clusters. Luckily, I came across a k8s delivery tool that makes this much easier and safer. I came across Argo CD.

This article demonstrates:

  • setting up Argo CD in k8s
  • containerizing a small python Flask App
  • setting up GitHub to run continuous integration (CI)
  • deploying an Argo CD application and syncing its status in k8s
  • setting up a Helm chart to manage k8s objects
  • deploying an Argo CD application using a Helm chart and syncing its status in k8s
  • updating the python Flask App and synching k8s to automatically update to the latest version using Argo CD

Setup Argo CD in K8s

The steps used here can be seen in the video above.

In this setup, k8s have been installed locally via minikube.

  • Start minikube: minikube start
  • Create k8s namespace for Argo CD: kubectl create namespace argocd
  • Install Argo CD: kubectl apply -n argocd -f
  • Retrieve the Argo CD password to log into the UI: kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
  • Connect to Argo CD API server via port forward: kubectl port-forward svc/argocd-server -n argocd 8080:443
  • Log on: localhost:8080
  • Enter username: admin