ArgoProj is a collection of tools for getting work done with Kubernetes. Argo Workflows - Container-native Workflow Engine. Argo CD - Declarative GitOps Continuous Delivery. Argo Events - Event-based Dependency Manager. Argo Rollouts - Progressive Delivery with support for Canary and Blue-Green deployment strategies. Reference: https://landscape.cncf.io/?selected=argo
Google Kubernetes Engine (GKE) is a managed, production-ready environment for running containerized applications on Kubernetes. Reference: https://cloud.google.com/kubernetes-engine
Prerequisite
Google Cloud project.
ArgoCD deployed on Google Kubernetes Engine (GKE). Reference: https://manikandank276.hashnode.dev/how-to-deploy-argocd-on-google-kubernetes-engine-gke
Step
Create Kubernetes configuration on the git repo. Reference: https://github.com/manikandank276/blog/tree/main/argoproject-101/config/namespace
apiVersion: v1 kind: Namespace metadata: name: namespace1 --- apiVersion: v1 kind: ResourceQuota metadata: name: quota1 namespace: namespace1 spec: hard: cpu: "20" memory: "7Mi" pods: "15" replicationcontrollers: "20" resourcequotas: "1" services: "5"
Review the GKE cluster.
kubectl get node kubectl get namespaces kubectl get pods --namespace <type namespace name>
Login to ArgoCD.
Click on the "+ NEW APP" button.
Fill "GENERAL" form.
Application Name: gke-config (or type your preference)
Project Name: default
SYNC POLICY: Manual
Fill "SOURCE" form.
Repository URL: https://github.com/manikandank276/blog (or type your preference)
select GIT dropdown
Revision: HEAD
Select Branches dropdown
Path: argoproject-101/config/namespace (or type your preference)
Fill "DESTINATION" form.
Cluster URL: https://kubernetes.default.svc
namespace: argocd (or type your preference)
Click on the "CREATE" button.
The new application creates successfully.
Click on the "gke-config" name with "OutOfSync".
The app shows details of Kubernetes configuration.
-
Click on the "SYNC" button.
Review the form and click on the "SYNCHRONIZE" button.
The applicaiton changes to "Synced".
Review the GKE cluster.
kubectl get node kubectl get namespaces #New namespace/configuration listed
Add or Modify configuration in the git repo.
The change reflects in ArgoCD and shows as "OutOfSync". Click on the "SYNC" button to deploy changes in the GKE.
GKE configured successfully. The output looks like the one below.
kubectl get namespace
NAME STATUS AGE
argocd Active 87m
default Active 93m
kube-node-lease Active 93m
kube-public Active 93m
kube-system Active 93m
namespace1 Active 5m42s
namespace2 Active 5m42s
namespace3 Active 5m42s
namespace4 Active 5m42s
namespace5 Active 5m42s