Tutorial: Build a Zero-Cost DevOps Platform on Windows 11 with Kubernetes & ArgoCD

Tutorial: Build a Zero-Cost DevOps Platform on Windows 11 with Kubernetes & ArgoCD

Source: Dev.to

Start the cluster ## Enable the Ingress Controller (This acts as our traffic police) ## 1. Create the namespace and install ArgoCD ## 2. Wait for pods to start ## 3. PATCH: Disable internal SSL enforcement Subtitle: A complete guide to running a production-grade DevSecOps stack locally using WSL2, Minikube, and Magic Domains. πŸ’‘ Why This Matters Learning DevOps often comes with a price tagβ€”AWS bills, managed clusters, and domain costs. But you don't need a credit card to simulate a production environment. In this tutorial, you will build a complete GitOps Pipeline on your local machine. By the end, you will have: Kubernetes Cluster (running inside WSL2). GitOps Automation (ArgoCD syncing from GitHub). Monitoring Stack (Prometheus & Grafana). Real URLs (using Ingress & nip.ioβ€”no localhost hacks). πŸ“‹ Prerequisites Before we start, ensure you have the following installed on Windows 11: WSL2 (Ubuntu distribution recommended). Docker Desktop (configured to use the WSL2 backend). Helm (Package manager for Kubernetes). Step 1: Initialize the Local Cloud First, we need to spin up our cluster. We will use the Docker driver for stability and enable the Ingress addon immediately. minikube addons enable ingress Step 2: Install the GitOps Engine (ArgoCD) We will use ArgoCD to watch a GitHub repository and automatically sync changes to our cluster. The Challenge: SSL Loops ArgoCD enforces HTTPS by default. When running behind a local Ingress controller, this often causes "Infinite Redirect" loops or 503 errors. The Fix: Insecure Mode Patch We will install ArgoCD and immediately patch it to run in "Insecure Mode," letting our Ingress controller handle the routing. Step 3: Add Observability (Grafana) A production cluster needs monitoring. We'll use Helm to install the industry-standard "Kube-Prometheus Stack." Step 4: The Networking Magic (nip.io) This is the most critical part. Instead of editing your Windows hosts file for every new service, we use nip.io. This wild-card DNS service maps any domain containing an IP address back to that IP. We configure our Kubernetes Ingress resources to listen on domains like: argocd.127.0.0.1.nip.io grafana.127.0.0.1.nip.io This tricks your browser into thinking it's visiting a real website, while the traffic stays 100% local. Step 5: The "Wide Open" Gateway Finally, we bridge the gap between Windows (your browser) and Linux (the cluster). We use kubectl port-forward, but with a twist: the --address 0.0.0.0 flag. Run this in a separate terminal and keep it open: Pro Tip: This flag forces the port to listen on all network interfaces, ensuring Windows can "see" the Linux port. πŸš€ The Result Open your browser. You now have access to a full suite of DevOps tools via clean, distinct URLs: ArgoCD: http://argocd.127.0.0.1.nip.io:8080 (GitOps Dashboard) Grafana: http://grafana.127.0.0.1.nip.io:8080 (Metrics) Your App: http://node-app.127.0.0.1.nip.io:8080 (The workload) 🏁 Conclusion You have successfully built a zero-cost DevOps platform. You solved the complex networking issues of WSL2 using Ingress and nip.io, and you established a GitOps workflow with ArgoCD. This setup allows you to test, break, and fix production-grade deployments without spending a dime on cloud providers. Tags: #DevOps #Kubernetes #Tutorial #GitOps #Minikube #WSL2 #Engineering πŸ“‚ Get the Code: You can find the complete source code, including the Kubernetes manifests, ArgoCD config, and the nip.io ingress setup here: πŸ‘‰ https://github.com/MartinS984/node-devops-project Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse CODE_BLOCK: minikube start --driver=docker Enter fullscreen mode Exit fullscreen mode CODE_BLOCK: minikube start --driver=docker CODE_BLOCK: minikube start --driver=docker COMMAND_BLOCK: kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml Enter fullscreen mode Exit fullscreen mode COMMAND_BLOCK: kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml COMMAND_BLOCK: kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml COMMAND_BLOCK: kubectl get pods -n argocd --watch Enter fullscreen mode Exit fullscreen mode COMMAND_BLOCK: kubectl get pods -n argocd --watch COMMAND_BLOCK: kubectl get pods -n argocd --watch COMMAND_BLOCK: kubectl patch deployment argocd-server -n argocd --type=json -p='[{"op": "add", "path": "/spec/template/spec/containers/0/command", "value": ["argocd-server", "--staticassets", "/shared/app", "--insecure"]}]' Enter fullscreen mode Exit fullscreen mode COMMAND_BLOCK: kubectl patch deployment argocd-server -n argocd --type=json -p='[{"op": "add", "path": "/spec/template/spec/containers/0/command", "value": ["argocd-server", "--staticassets", "/shared/app", "--insecure"]}]' COMMAND_BLOCK: kubectl patch deployment argocd-server -n argocd --type=json -p='[{"op": "add", "path": "/spec/template/spec/containers/0/command", "value": ["argocd-server", "--staticassets", "/shared/app", "--insecure"]}]' CODE_BLOCK: helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update helm install monitoring prometheus-community/kube-prometheus-stack Enter fullscreen mode Exit fullscreen mode CODE_BLOCK: helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update helm install monitoring prometheus-community/kube-prometheus-stack CODE_BLOCK: helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update helm install monitoring prometheus-community/kube-prometheus-stack COMMAND_BLOCK: kubectl port-forward -n ingress-nginx svc/ingress-nginx-controller 8080:80 --address 0.0.0.0 Enter fullscreen mode Exit fullscreen mode COMMAND_BLOCK: kubectl port-forward -n ingress-nginx svc/ingress-nginx-controller 8080:80 --address 0.0.0.0 COMMAND_BLOCK: kubectl port-forward -n ingress-nginx svc/ingress-nginx-controller 8080:80 --address 0.0.0.0