Prerequisites
Before diving into deploying ArgoCD on Minikube, make sure you have the following prerequisites installed on your system:
- Docker
- Minikube
- Terraform
- Helm
- kubectl
For this guide, we're using a two-node cluster on Minikube, although one node should suffice.
Start Minikube with two nodes using this command:
minikube start --nodes 2 -p argocd-helm
Verify your Minikube setup with:
kubectl get nodes
Next, set up your project directory:
mkdir -p terraform/values
cd terraform && touch provider.tf main.tf
cd terraform/values && touch argocd.yaml
Now, let's configure Terraform to deploy ArgoCD using Helm.
terraform/provider.tf
provider "helm" {
kubernetes {
config_path = "~/.kube/config"
}
}
terraform/main.tf
resource "helm_release" "argocd" {
name = "argocd"
repository = "https://argoproj.github.io/argo-helm"
chart = "argo-cd"
namespace = "argocd"
create_namespace = true
version = "3.35.4"
values = [file("values/argocd.yaml")]
}
In terraform/values/argocd.yaml
, you can override some default ArgoCD Helm chart values:
global:
image:
tag: "v2.6.6"
server:
extraArgs:
- --insecure
After setting up your Terraform configuration, execute the following commands in your terminal:
terraform init
terraform apply --auto-approve
Verify the ArgoCD deployment with:
kubectl get pods -n argocd
To access the ArgoCD web UI, you'll need to port forward to the argocd-server
service:
kubectl port-forward svc/argocd-server -n argocd 8080:80
Now, open your browser and navigate to localhost:8080
. You should see the ArgoCD login page.
The default username is admin
. Retrieve the password from the secret using:
kubectl get secrets argocd-initial-admin-secret -o yaml -n argocd
Copy the password and decode it with the base64 utility:
echo "copied_password_here" | base64 -d
Now, paste the decoded password without the %
sign at the end into the password field on the login page.
Voila! You've successfully deployed ArgoCD on Minikube.
Top comments (0)