Skip to content

Commit 1313192

Browse files
committed
Welcome to Stack Simplify
1 parent fc607f9 commit 1313192

File tree

2 files changed

+190
-23
lines changed

2 files changed

+190
-23
lines changed
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# Create AKS Cluster
2+
3+
## Step-01: Introduction
4+
- Understand about AKS Cluster
5+
- Discuss about Kubernetes Architecture from AKS Cluster perspective
6+
7+
## Step-02: Create AKS Cluster
8+
- Create Kubernetes Cluster
9+
- **Basics**
10+
- **Subscription:** Free Trial
11+
- **Resource Group:** Creat New: aks-rg1
12+
- **Kubernetes Cluster Name:** aksdemo1
13+
- **Region:** (US) Central US
14+
- **Kubernetes Version:** Select what ever is latest stable version
15+
- **Node Size:** Standard DS2 v2 (Default one)
16+
- **Node Count:** 1
17+
- **Node Pools**
18+
- leave to defaults
19+
- **Authentication**
20+
- Authentication method: System-assigned managed identity
21+
- Rest all leave to defaults
22+
- **Networking**
23+
- **Network Configuration:** Advanced
24+
- **Network Policy:** Azure
25+
- Rest all leave to defaults
26+
- **Integrations**
27+
- Azure Container Registry: None
28+
- leave to defaults
29+
- **Tags**
30+
- leave to defaults
31+
- **Review + Create**
32+
- Click on **Create**
33+
34+
35+
## Step-03: Cloud Shell - Configure kubectl to connect to AKS Cluster
36+
- Go to https://shell.azure.com
37+
```
38+
# Template
39+
az aks get-credentials --resource-group <Resource-Group-Name> --name <Cluster-Name>
40+
41+
# Replace Resource Group & Cluster Name
42+
az aks get-credentials --resource-group aks-rg1 --name aksdemo1
43+
44+
# List Kubernetes Worker Nodes
45+
kubectl get nodes
46+
kubectl get nodes -o wide
47+
```
48+
49+
## Step-04: Explore Cluster Control Plane and Workload inside that
50+
```
51+
# List Namespaces
52+
kubectl get namespaces
53+
kubectl get ns
54+
55+
# List Pods from all namespaces
56+
kubectl get pods --all-namespaces
57+
58+
# List all k8s objects from Cluster Control plane
59+
kubectl get all --all-namespaces
60+
```
61+
62+
## Step-05: Explore the AKS cluster on Azure Management Console
63+
- Explore the following features on high-level
64+
- **Overview**
65+
- Activity Log
66+
- Access Control (IAM)
67+
- Security
68+
- Diagnose and solver problems
69+
- **Settings**
70+
- Node Pools
71+
- Upgrade
72+
- Scale
73+
- Networking
74+
- DevSpaces
75+
- Deployment Center
76+
- Policies
77+
- **Monitoring**
78+
- Insights
79+
- Alerts
80+
- Metrics
81+
- and many more
82+
- **VM Scale Sets**
83+
- Verify Azure VM Instances
84+
- Verify if **Enhanced Networking is enabled or not**
85+
86+
87+
88+
## Step-06: Local Desktop - Install Azure CLI and Azure AKS CLI
89+
```
90+
# Install Azure CLI (MAC)
91+
brew update && brew install azure-cli
92+
93+
# Login to Azure
94+
az login
95+
96+
# Install Azure AKS CLI
97+
az aks install-cli
98+
99+
# Configure Cluster Creds (kube config)
100+
az aks get-credentials --resource-group aks-rg1 --name aksdemo1
101+
102+
# List AKS Nodes
103+
kubectl get nodes
104+
kubectl get nodes -o wide
105+
```
106+
- **Reference Documentation Links**
107+
- https://docs.microsoft.com/en-us/cli/azure/?view=azure-cli-latest
108+
- https://docs.microsoft.com/en-us/cli/azure/aks?view=azure-cli-latest
109+
110+
## Step-07: Deploy Sample Application and Test
111+
- Don't worry about what is present in these two files for now.
112+
- By the time we complete **Kubernetes Fundamentals** sections, you will be an expert in writing Kubernetes manifest in YAML.
113+
- For now just focus on result.
114+
```
115+
# Deploy Application
116+
kubectl apply -f kube-manifests/
117+
118+
# Verify Pods
119+
kubectl get pods
120+
121+
# Verify Deployment
122+
kubectl get deployment
123+
124+
# Verify Service (Make a note of external ip)
125+
kubectl get service
126+
127+
# Access Application
128+
http://<External-IP-from-get-service-output>
129+
```
130+
131+
## Step-07: Clean-Up
132+
```
133+
# Delete Applications
134+
kubectl delete -f kube-manifests/
135+
```
136+
137+
## References
138+
- https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-macos?view=azure-cli-latest
139+
140+
## Why Managed Identity when creating Cluster?
141+
- https://docs.microsoft.com/en-us/azure/aks/use-managed-identity

01-Create-AKS-Cluster/README.md

Lines changed: 49 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,38 @@
77
## Step-02: Create AKS Cluster
88
- Create Kubernetes Cluster
99
- **Basics**
10-
- **Subscription:** Free Trial
10+
- **Subscription:** StackSimplify-Paid-Subscription
1111
- **Resource Group:** Creat New: aks-rg1
12+
- **Cluster preset configuration:** Standard
1213
- **Kubernetes Cluster Name:** aksdemo1
1314
- **Region:** (US) Central US
15+
- **Availability zones:** Zones 1, 2, 3
16+
- **AKS Pricing Tier:** Free
1417
- **Kubernetes Version:** Select what ever is latest stable version
18+
- **Automatic upgrade:** Enabled with patch (recommended)
1519
- **Node Size:** Standard DS2 v2 (Default one)
16-
- **Node Count:** 1
20+
- **Scale method:** Autoscale
21+
- **Node Count range:** 1 to 5
1722
- **Node Pools**
1823
- leave to defaults
19-
- **Authentication**
20-
- Authentication method: System-assigned managed identity
24+
- **Access**
25+
- **Authentication and Authorization:** Local accounts with Kubernetes RBAC
2126
- Rest all leave to defaults
2227
- **Networking**
23-
- **Network Configuration:** Advanced
24-
- **Network Policy:** Azure
25-
- Rest all leave to defaults
28+
- **Network Configuration:** Azure CNI
29+
- Review all the auto-populated details
30+
- Virtual Network
31+
- Cluster Subnet
32+
- Kubernetes Service address range
33+
- Kubernetes DNS Service IP Address
34+
- DNS Name prefix
35+
- **Traffic routing:** leave to defaults
36+
- **Security:** Leave to defaults
2637
- **Integrations**
27-
- Azure Container Registry: None
28-
- leave to defaults
38+
- **Azure Container Registry:** None
39+
- All leave to defaults
40+
- **Advanced**
41+
- All leave to defaults
2942
- **Tags**
3043
- leave to defaults
3144
- **Review + Create**
@@ -34,7 +47,7 @@
3447

3548
## Step-03: Cloud Shell - Configure kubectl to connect to AKS Cluster
3649
- Go to https://shell.azure.com
37-
```
50+
```t
3851
# Template
3952
az aks get-credentials --resource-group <Resource-Group-Name> --name <Cluster-Name>
4053

@@ -47,7 +60,7 @@ kubectl get nodes -o wide
4760
```
4861

4962
## Step-04: Explore Cluster Control Plane and Workload inside that
50-
```
63+
```t
5164
# List Namespaces
5265
kubectl get namespaces
5366
kubectl get ns
@@ -66,27 +79,40 @@ kubectl get all --all-namespaces
6679
- Access Control (IAM)
6780
- Security
6881
- Diagnose and solver problems
82+
- Microsoft Defender for Cloud
83+
- **Kubernetes Resources**
84+
- Namespaces
85+
- Workloads
86+
- Services and Ingress
87+
- Storage
88+
- Configuration
6989
- **Settings**
7090
- Node Pools
71-
- Upgrade
72-
- Scale
73-
- Networking
74-
- DevSpaces
75-
- Deployment Center
91+
- Cluster Configuration
92+
- Extensions + Applications
93+
- Backup (preview)
94+
- Open Service Mesh
95+
- GitOps
96+
- Automated Deployments (preview)
7697
- Policies
98+
- Properties
99+
- Locks
77100
- **Monitoring**
78101
- Insights
79102
- Alerts
80103
- Metrics
81-
- and many more
82-
- **VM Scale Sets**
83-
- Verify Azure VM Instances
84-
- Verify if **Enhanced Networking is enabled or not**
104+
- Diagnostic Settings
105+
- Advisor Recommendations
106+
- Logs
107+
- Workbooks
108+
- **Automation**
109+
- Tasks
110+
- Export Template
85111

86112

87113

88114
## Step-06: Local Desktop - Install Azure CLI and Azure AKS CLI
89-
```
115+
```t
90116
# Install Azure CLI (MAC)
91117
brew update && brew install azure-cli
92118

@@ -111,7 +137,7 @@ kubectl get nodes -o wide
111137
- Don't worry about what is present in these two files for now.
112138
- By the time we complete **Kubernetes Fundamentals** sections, you will be an expert in writing Kubernetes manifest in YAML.
113139
- For now just focus on result.
114-
```
140+
```t
115141
# Deploy Application
116142
kubectl apply -f kube-manifests/
117143

@@ -129,7 +155,7 @@ http://<External-IP-from-get-service-output>
129155
```
130156

131157
## Step-07: Clean-Up
132-
```
158+
```t
133159
# Delete Applications
134160
kubectl delete -f kube-manifests/
135161
```

0 commit comments

Comments
 (0)