Setting Up Argo CD with Kind: A Guide for Local GitOps Development

Arief ShaikArief Shaik
3 min read

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. Running it locally on a kind (Kubernetes in Docker) cluster is a great way to experiment and learn. In this post, we’ll walk through the steps to set up a kind cluster, install Argo CD, and expose the Argo CD UI via NodePort.


Prerequisites

Make sure you have the following installed:

  • Docker

  • kubectl

  • kind

You can install them using the instructions below.


Installing kind

If you haven't installed kind yet, follow these steps:

On Linux:

# For AMD64 / x86_64
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.29.0/kind-linux-amd64
# For ARM64
[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.29.0/kind-linux-arm64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind

On macOS:

# For Intel Macs
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.29.0/kind-darwin-amd64
# For M1 / ARM Macs
[ $(uname -m) = arm64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.29.0/kind-darwin-arm64
chmod +x ./kind
mv ./kind /some-dir-in-your-PATH/kind

On Windows in PowerShell:

curl.exe -Lo kind-windows-amd64.exe https://kind.sigs.k8s.io/dl/v0.29.0/kind-windows-amd64
Move-Item .\kind-windows-amd64.exe c:\some-dir-in-your-PATH\kind.exe

Verify installation with:

kind version

Step 1: Create a Kind Cluster with Port Mappings

Create a file called config.yml to define the cluster configuration with port mappings for Argo CD:

# config.yml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
  - role: control-plane
    extraPortMappings:
      - containerPort: 30380  # NodePort HTTP
        hostPort: 8081
        protocol: TCP
      - containerPort: 30485  # NodePort HTTPS
        hostPort: 8443
        protocol: TCP

Then, create the cluster:

kind create cluster --name argocd --config config.yml

You can check that it's running:

kubectl cluster-info --context kind-argocd

Step 2: Install Argo CD

Add Argo CD to the argocd namespace:

kubectl create namespace argocd

Apply the official Argo CD manifests:

kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

Wait a minute or two, then check the pods:

kubectl get pods -n argocd


Step 3: Edit the Type of argocd-server

kubectl edit svc argocd-server -n argocd

# change the type from 
# type: ClusterIP -> type: NodePort

save the file after changing the type to NodePort

check it using the following command

kubectl get svc -n argocd


Step 3: Expose the Argo CD Server

By default, the Argo CD API server is not exposed externally. We'll expose it using a NodePort.

Create a file called service.yaml:

# service.yaml
apiVersion: v1
kind: Service
metadata:
  name: argocd-server
  namespace: argocd
spec:
  type: NodePort
  selector:
    app.kubernetes.io/name: argocd-server
  ports:
    - name: http
      port: 80
      protocol: TCP
      targetPort: 8080
      nodePort: 30380
    - name: https
      port: 443
      protocol: TCP
      targetPort: 8080
      nodePort: 30485

Apply the service:

kubectl apply -f service.yaml -n argocd

Now, the Argo CD UI is available at:

http://localhost:8081

Step 4: Accessing the Argo CD Dashboard

Get the initial admin password:

kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath="{.data.password}" | base64 -d

Note: The username is admin


Clean Up

To delete the cluster:

kind delete cluster --name argocd

Conclusion :

Argo CD on Kind is a great local setup for learning GitOps and CI/CD workflows. You can now explore managing applications declaratively using Git repositories!

0
Subscribe to my newsletter

Read articles from Arief Shaik directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Arief Shaik
Arief Shaik

I’m a passionate DevOps and cloud enthusiast with hands-on experience in building and automating modern infrastructure using tools like Docker, Terraform, Jenkins, and GitHub Actions. My core skill set includes Java, Python, shell scripting, and deploying containerized applications on Azure and AWS. I actively work on real-world projects involving CI/CD, infrastructure as code, cloud deployment, and Linux automation. Driven by curiosity and consistency, I enjoy turning complex problems into simple, automated solutions. I’m always exploring new technologies and looking to contribute to open-source projects and collaborate with the developer community.