Lab 2: Advanced Kubernetes Concepts in AKS
🎓 Learning Objectives
- Deepen understanding of Kubernetes internals and advanced configurations
- Master stateful application deployments
- Learn resource management and Pod scheduling strategies
- Implement security with Azure Key Vault integration
- Develop troubleshooting skills for Kubernetes workloads
- Configure monitoring and alerting for AKS
⏱ Estimated Duration
120 Minutes
📝 Content Overview
Stateful Applications
- Deploy MongoDB using StatefulSets
- Configure Persistent Volumes and PVCs
- Understand StatefulSet behavior
Resource Management
- Configure resource requests and limits
- Implement resource quotas
- Monitor resource usage
Advanced Pod Scheduling
- Use node/pod affinity and anti-affinity
- Configure taints and tolerations
- Control pod placement strategies
Secret Management with Azure Key Vault
- Set up CSI Driver for Key Vault
- Store and access secrets securely
- Rotate secrets safely
Custom Resource Definitions (CRDs)
- Create and use Custom Resource Definitions
- Understand extensibility in Kubernetes
- Apply custom resources
Kubernetes Operators
- Understand Operator pattern and lifecycle management
- Review Operator implementation concepts
- Learn how Operators extend Kubernetes capabilities
Troubleshooting
- Simulate and resolve pod crashes
- Debug common application issues
- Use kubectl and AKS troubleshooting tools
Monitoring and Alerting
- Set up Azure Monitor for containers
- Configure custom dashboards
- Implement alerting policies
This lab builds on the infrastructure deployed in Lab 1, using the same AKS cluster.
Environment Variables
Make sure that you have the required variables set up in your CLI session. If you have closed your CLI session since Lab 1, you may need to reinitialize them. The following variables should be set:
$YOUR_INITIALS="abc"
$INITIALS="$($YOUR_INITIALS)".ToLower()
$RESOURCE_GROUP="azure-$($INITIALS)-rg"
$LOCATION="westeurope"
$VM_SKU="Standard_D4s_v5"
$AKS_NAME="aks-$($INITIALS)"
export YOUR_INITIALS="abc"
export INITIALS=$(echo "$YOUR_INITIALS" | tr '[:upper:]' '[:lower:]')
export RESOURCE_GROUP="azure-${INITIALS}-rg"
export LOCATION="westeurope"
export VM_SKU="Standard_D4s_v5"
export AKS_NAME="aks-${INITIALS}"