Welcome to LAB01! In this lab, you'll set up your local development environment for platform engineering. By the end of this lab, you'll have:
- A local Kubernetes cluster running with Kind
- NGINX Ingress Controller for external access
- ArgoCD installed and configured
- ArgoCD accessible via ingress using nip.io domains
- Basic understanding of how to access these tools
Before starting, ensure you have:
- Docker installed and running on your machine
- Administrative privileges to install software
- Internet connection for downloading tools
Kind (Kubernetes in Docker) allows you to run Kubernetes clusters locally using Docker containers as nodes.
# Install Chocolatey if you haven't already
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# Install Kind
choco install kind# Download the latest release
curl.exe -Lo kind-windows-amd64.exe https://kind.sigs.k8s.io/dl/v0.20.0/kind-windows-amd64
# Move to a location in your PATH
Move-Item .\kind-windows-amd64.exe C:\Windows\System32\kind.exe# Install Homebrew if you haven't already
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Kind
brew install kind# For Intel Macs
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-darwin-amd64
# For Apple Silicon Macs
[ $(uname -m) = arm64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-darwin-arm64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind# For Ubuntu/Debian
curl -s https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | grep "browser_download_url.*linux-amd64" | cut -d '"' -f 4 | wget -qi -
chmod +x kind-linux-amd64
sudo mv kind-linux-amd64 /usr/local/bin/kind
# For RHEL/CentOS/Fedora
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kindRun the following command to verify Kind is installed correctly:
kind versionYou should see output similar to:
kind v0.20.0 go1.20.4 linux/amd64
# Using Chocolatey
choco install kubernetes-cli
# Or download directly
curl.exe -LO "https://dl.k8s.io/release/v1.28.0/bin/windows/amd64/kubectl.exe"# Using Homebrew
brew install kubectl
# Or download directly
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectlcurl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectlNow let's create a local Kubernetes cluster using Kind.
We'll create a kind cluster with ingress support to enable external access to services.
# Create a kind configuration file for ingress support
cat << EOF > kind-config.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 443
hostPort: 443
protocol: TCP
EOF
# Create a new cluster named "workshop" with ingress support
kind create cluster --name workshop --config kind-config.yaml
# Verify the cluster is running
kubectl cluster-info --context kind-workshop# Check nodes
kubectl get nodes
# Check that all system pods are running
kubectl get pods -n kube-systemYou should see one node in "Ready" state and several system pods running.
Now let's install the NGINX ingress controller to handle external traffic to our services.
# Install NGINX Ingress Controller
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
# Wait for the ingress controller to be ready
kubectl wait --namespace ingress-nginx \
--for=condition=ready pod \
--selector=app.kubernetes.io/component=controller \
--timeout=90s
# Verify ingress controller is running
kubectl get pods -n ingress-nginxArgoCD is a declarative, GitOps continuous delivery tool for Kubernetes.
# Create namespace for ArgoCD
kubectl create namespace argocd
# Install ArgoCD
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
# Wait for all pods to be ready (this may take a few minutes)
kubectl wait --for=condition=available --timeout=300s deployment/argocd-server -n argocd
# Configure ArgoCD to run in insecure mode (HTTP) for the workshop
kubectl patch configmap argocd-cmd-params-cm -n argocd --type merge -p '{"data":{"server.insecure":"true"}}'
# Restart the ArgoCD server to apply the configuration
kubectl rollout restart deployment argocd-server -n argocd
# Wait for the server to be ready again
kubectl wait --for=condition=available --timeout=120s deployment/argocd-server -n argocdYou now have three options to access ArgoCD:
First, create an ingress resource for ArgoCD:
# Create ArgoCD ingress configuration
cat << EOF > argo-ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: argocd-server-ingress
namespace: argocd
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
spec:
ingressClassName: nginx
rules:
- host: argocd.127.0.0.1.nip.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: argocd-server
port:
number: 80
EOFApply the ingress configuration:
kubectl apply -f argo-ingress.yamlNow you can access ArgoCD at: http://argocd.127.0.0.1.nip.io
# Forward the ArgoCD server port to your local machine
kubectl port-forward svc/argocd-server -n argocd 8080:80Now you can access ArgoCD at: http://localhost:8080
# Patch the service to use LoadBalancer type
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
# Get the external IP (may take a few minutes)
kubectl get svc argocd-server -n argocd# Get the initial admin password
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d && echo- Open your browser and navigate to:
- Ingress:
http://argocd.127.0.0.1.nip.io - Port forwarding:
http://localhost:8080
- Ingress:
- Use the following credentials:
- Username:
admin - Password: (the password you retrieved from the previous step)
- Username:
# Download the latest release
$version = (Invoke-RestMethod https://api.github.com/repos/argoproj/argo-cd/releases/latest).tag_name
$url = "https://github.com/argoproj/argo-cd/releases/download/" + $version + "/argocd-windows-amd64.exe"
$output = "$env:USERPROFILE\argocd.exe"
Invoke-WebRequest -Uri $url -OutFile $output# Using Homebrew
brew install argocd
# Or download directly
curl -sSL -o argocd-darwin-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-darwin-amd64
sudo install -m 555 argocd-darwin-amd64 /usr/local/bin/argocdcurl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd# Login using the CLI (use the same password from earlier)
# For ingress access:
argocd login argocd.127.0.0.1.nip.io --username admin --password <your-password> --insecure
# For port forwarding access:
argocd login localhost:8080 --username admin --password <your-password> --insecureLet's verify everything is working correctly.
# Check cluster status
kind get clusters
# Verify kubectl context
kubectl config current-context
# Check cluster info
kubectl cluster-info# Check ArgoCD pods
kubectl get pods -n argocd
# Check ArgoCD services
kubectl get svc -n argocd
# Test ArgoCD CLI
argocd versionLet's do a quick configuration to prepare for future labs.
# Create a simple application via CLI
argocd app create guestbook \
--repo https://github.com/argoproj/argocd-example-apps.git \
--path guestbook \
--dest-server https://kubernetes.default.svc \
--dest-namespace default
# Sync the application
argocd app sync guestbook# Check the application status
argocd app get guestbook
# Check the deployed resources
kubectl get all -n default- Ensure Docker Desktop is running on Windows/macOS
- On Linux, start Docker with:
sudo systemctl start docker
- If on windows could be an old WSL. update it to newest
wsl --update --pre-release
# Set the correct context
kubectl config use-context kind-workshop# Check pod logs
kubectl logs -n argocd deployment/argocd-server
# Check resource usage
kubectl top nodes# Check ingress controller status
kubectl get pods -n ingress-nginx
# Check ingress resource
kubectl get ingress -n argocd
# Check ingress controller logs
kubectl logs -n ingress-nginx deployment/ingress-nginx-controller- Try using
curlto test:curl -H "Host: argocd.127.0.0.1.nip.io" http://localhost - Check if ports 80/443 are available and not blocked by firewall
# Use a different port
kubectl port-forward svc/argocd-server -n argocd 8081:80If you need to start over:
If you no longer need the guestbook sample application:
# Delete the guestbook application from ArgoCD
argocd app delete guestbook
# Confirm deletion when prompted, or use --yes to skip confirmation
argocd app delete guestbook --yes
# Verify the application is removed
argocd app listThis will remove the ArgoCD application and all its deployed Kubernetes resources.
To completely remove the cluster and start fresh:
# Delete the Kind cluster
kind delete cluster --name workshop
# Remove the kind configuration file
rm kind-config.yaml
# This will remove everything we've createdCongratulations! You now have:
- ✅ Kind installed and a local Kubernetes cluster running with ingress support
- ✅ NGINX Ingress Controller installed and configured
- ✅ ArgoCD installed and accessible via UI and CLI
- ✅ ArgoCD accessible through ingress using nip.io domains
- ✅ A sample application deployed via ArgoCD
You're ready for LAB02 where we'll explore creating basic self-service capabilities with ArgoCD projects and namespaces.
# Kind commands
kind create cluster --name <cluster-name>
kind delete cluster --name <cluster-name>
kind get clusters
# Kubectl commands
kubectl get nodes
kubectl get pods --all-namespaces
kubectl config get-contexts
# Ingress commands
kubectl get ingress --all-namespaces
kubectl describe ingress <ingress-name> -n <namespace>
kubectl get pods -n ingress-nginx
# ArgoCD commands
argocd app list
argocd app sync <app-name>
argocd app get <app-name>
argocd app delete <app-name>