Azure Kubernetes Service (AKS) Cluster Setup ☸️
This document outlines the steps to create an Azure Kubernetes Service (AKS) cluster.
1. Prerequisites: Equipping Your Toolkit 🛠️
Before you begin, ensure you have:
- An active Azure subscription 💳.
- Azure CLI installed and configured. If not, follow the official Azure CLI installation guide 💻.
-
kubectl
installed. If not, follow the official kubectl installation guide ## 2. Create AKS Cluster: Setting up Your Kubernetes Environment 🔥➡️☸️
Time to create your AKS cluster.
- Sign in to Azure Portal: Navigate to portal.azure.com 🔑.
- Search for AKS: In the search bar, type "Azure Kubernetes Service" and select it 🔍.
- Initiate Cluster Creation: Click "Create" and then "Create Kubernetes cluster" ✨.
- Configure Basic Settings ⚙️:
- Project details: Select your Azure subscription and resource group 📂.
- Cluster details:
- Kubernetes cluster name: Enter a unique name for your cluster 🏷️.
- Region: Choose the Azure region for your cluster 🌍.
- Availability zones: Select zones for high availability if needed 🏞️.
- AKS pricing tier: Standard is recommended for production 💰.
- Kubernetes version: Choose a recent, stable version ✅.
- Primary node pool:
- Node size: Select an appropriate VM size 🖥️.
Standard_B2s
is a good starting point for dev/test. For production, considerStandard_D2s_v3
. - Scale method: Choose "Autoscale" for flexibility ⚖️.
- Node count: Set the initial number of nodes #️⃣.
- Node size: Select an appropriate VM size 🖥️.
- Review and Create: Carefully review all settings 👀. Once confirmed, click "Create". Cluster deployment may take several minutes ⏳. (Perfect time for a coffee! ☕)
3. Connect to Your AKS Cluster: Establishing Communication 🔮
After the cluster is deployed, connect to it.
-
Install Azure CLI (if not already done):
Ensure Azure CLI is installed 💻.
Verify installation:
az --version
-
Login to Azure 🔑:
az login
Follow the prompts to authenticate.
-
Get Cluster Credentials 📜:
This command configureskubectl
.
az aks get-credentials --resource-group <your-resource-group> --name <your-cluster-name>
-
Verify Connection ✅:
Check if your nodes are ready.
kubectl get nodes
You should see your nodes listed with a
Ready
status.
NAME STATUS ROLES AGE VERSION aks-systempool-12345678-vmss000000 Ready agent 5m16s v1.28.5 aks-systempool-12345678-vmss000001 Ready agent 5m17s v1.28.5
4. Install ArgoCD using Helm: Your GitOps Companion 🧙♂️⛵📦
ArgoCD will manage your deployments based on your Git repository.
-
Add ArgoCD Helm Repository ➕:
helm repo add argo https://argoproj.github.io/argo-helm
-
Update Helm Repositories 🔄:
helm repo update
-
Install ArgoCD 🚀:
This installs ArgoCD into theargocd
namespace.
helm install argocd argo/argo-cd --namespace argocd --create-namespace
-
Access ArgoCD UI (via Port Forwarding) 🖥️➡️🚪:
Access the ArgoCD dashboard.
kubectl get pods -n argocd # Wait for argocd-server to be Running kubectl port-forward svc/argocd-server -n argocd 8080:https
Open https://localhost:8080
in your browser.
-
Get Initial Admin Password 🤫🔑:
"Keep it secret, keep it safe!" (Okay, just one for the road! 😉)
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
5. Next Steps: The Journey Continues... ➡️👣
Your AKS and ArgoCD setup is complete!
- Connect Git repositories to ArgoCD 🔗.
- Define applications for ArgoCD to manage 📝.
Top comments (0)