AWS Deployments Made Easy: Getting Started with Argo CD (Step-by-Step)


This project takes a real-world voting app—built with Node.JS, Python, .NET, Redis, and PostgreSQL—and launches it into the cloud with full Git-Ops automation. Running on AWS EC2 with Docker, Kind, and Kubernetes, it's powered by Argo CD for seamless CI/CD. Every commit to GitHub triggers live, production-ready deployments. Fast. Scalable. Reliable.
PS: I am looking for a job for the role of “Devops Engineer“ or “Fullstack Developer“, If you know someone who could refer or help, A referral would be appreciated ❤️
Infrastructure Setup
AWS EC2 Instance
Instance Type: t2.medium
Operating System: Ubuntu
Installation Steps
Docker: Installed to facilitate containerization.
Kind (Kubernetes in Docker): Used to create a local Kubernetes cluster.
kubectl: Installed for cluster management.
Shell scripts were utilized to automate the installation of these components, ensuring a reproducible setup process.
Kubernetes Cluster Configuration
A Kubernetes cluster was established using Kind with the following node configuration:Medium+1Medium+1
Control Plane: 1 node
Worker Nodes: 2 nodesMedium+11LinkedIn+11ougabriel.medium.com+11Argo CD+1ougabriel.medium.com+1
This configuration ensures a balanced distribution of workloads and high availability.
Argo CD Deployment
Argo CD, a declarative GitOps continuous delivery tool for Kubernetes, was deployed within the cluster:Spacelift+4Stack Overflow+4Argo CD+4
Namespace Creation: A dedicated namespace
argocd
was created.Installation: Argo CD was installed using the official manifests.
Access: Port forwarding was configured to access the Argo CD dashboard securely.Argo CD
Let’s start with the setup now
Installing Docker, K8s on our EC2 Server
sudo ssh -i "t2medium.pem" ubuntu@ec2-34-226-212-50.compute-1.amazonaws.com
sudo apt-get update
sudo apt install docker.io
sudo usermod -aG docker $USER && newgrp docker
mkdir k8s-install
cd k8s-install
vim kind_install.sh
#!/bin/bash
# For AMD64 / x86_64
[ $(uname -m) = x86_64 ] && curl -Lo ./kind <https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64>
chmod +x ./kind
sudo cp ./kind /usr/local/bin/kind
rm -rf kind
##################################
chmod +x kind_install.sh
./kind_install.sh
vim config.yml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.30.0
- role: worker
image: kindest/node:v1.30.0
- role: worker
image: kindest/node:v1.30.0
kind create cluster --config=config.yml --name=my-cluster
vim install_kubectl.sh
#!/bin/bash
# Variables
VERSION="v1.30.0"
URL="<https://dl.k8s.io/release/${VERSION}/bin/linux/amd64/kubectl>"
INSTALL_DIR="/usr/local/bin"
# Download and install kubectl
curl -LO "$URL"
chmod +x kubectl
sudo mv kubectl $INSTALL_DIR/
kubectl version --client
# Clean up
rm -f kubectl
echo "kubectl installation complete."
chmod +x ./install_kubectl.sh
To check our k8s nodes
kubectl get nodes
Argo CD installation and configuration
kubectl create namespace argocd
kubectl apply -n argocd -f <https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml>
Now when we get the nodes with the namespace “argocd”
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "NodePort"}}'
Now we changed the argocd-server’s type from ClusterIP to NodePort
Let’s do PORT FORWARDING
kubectl port-forward -n argocd service/argocd-server 8443:443 --address=0.0.0.0 &
We also need to add PORT RANGE in aws instance under Security groups
We have successfully started ArgoCD in our server.
It will ask for username=admin and password, We need to retrieve the password from the argocd itself
kubectl get secret -n argocd argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d && echo
We need to create a New Application and attach our Github repository here (voting app)
After the filling the form, You will see your deployment
Gitops also done
Now we need to check if our applications are running or not, so let’s take the services: ‘vote’ & ‘result’
Let’s do port forwarding so that we can see the outputs on our browser
Port Forwarding of our services
kubectl port-forward svc/vote 5000:5000 --address=0.0.0.0 &
kubectl port-forward svc/result 5001:5001 --address=0.0.0.0 &
Let’s create a Kubernetes Dashboard now
kubectl apply -f <https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml>
vim dashboard.yml
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kubernetes-dashboard
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: admin-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: admin-user
namespace: kubernetes-dashboard
kubectl apply -f dashboard.yml
Therefore, we have successfully deployed our multi node app to our k8s cluster using Argo CD for deployment and GitOps for CI (Continous Integration).
Thanks for reading uptil now !
Liking this blog would be appreciated❤️
Subscribe to my newsletter
Read articles from Jyotindra Tavanoji directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Jyotindra Tavanoji
Jyotindra Tavanoji
Empowering startups with technology and design