Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(terraform): add best practice recommendation to README for AKS cluster configuration and networking feat(terraform): implement separate VNets for each AKS cluster as a best practice #555

Merged
merged 3 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 20 additions & 9 deletions terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Hub & Spoke Architecture At its core, the Hub & Spoke model is a paradigm for dataflow management. It necessitates the capacity to oversee, document, and scrutinize data traversing in all directions—be it north-to-south or east-to-west.
- As the best practice when working with AKS is to separate each cluster into different VNets
- Don't create more than one AKS cluster in the same subnet.
- Try to follow best practices.

https://learn.microsoft.com/en-us/azure/architecture/networking/guide/nva-ha#pip-udr-nvas-without-snat

Expand Down Expand Up @@ -38,13 +39,16 @@ hub-nva-management-action = "Allow"
hub-nva-management-ip = "10.0.0.4"
hub-nva-vip = "10.0.0.5"
hub-nva-gateway = "10.0.0.37"
spoke-virtual-network_address_prefix = "10.1.1.0/24"
spoke-virtual-network_address_prefix = "10.1.0.0/16"
spoke-subnet_name = "spoke_subnet"
spoke-subnet_prefix = "10.1.1.0/24"
spoke-aks-subnet_name = "spoke_aks_subnet"
spoke-aks-subnet_prefix = "10.1.2.0/24"
spoke-aks_dns_service_ip = "10.1.2.10"
spoke-check-internet-up-ip = "8.8.8.8"
spoke-linux-server-ip = "10.1.1.5"
spoke-linux-server-image-gpu = false
spoke-k8s-node-pool-gpu = false
spoke-aks-node-ip = "10.1.1.4"
spoke-aks-node-image-gpu = false
spoke-k8s-node-pool-gpu = true
```


Expand Down Expand Up @@ -79,14 +83,19 @@ spoke-k8s-node-pool-gpu = false
| hub-virtual-network\_address\_prefix | Hub Virtual Network Address prefix. | `string` | `"10.0.0.0/24"` | no |
| location | Azure region for resource group. | `string` | `"canadacentral"` | no |
| owner\_email | Email address for use with Owner tag. | `string` | `"[email protected]"` | no |
| spoke-aks-node-image | Container server image product | `string` | `"aks-node"` | no |
| spoke-aks-node-image-gpu | Set to true to enable GPU workloads | `bool` | `false` | no |
| spoke-aks-node-ip | Spoke Container Server IP Address | `string` | `"10.1.1.4"` | no |
| spoke-aks-node-ollama-port | Port for ollama | `string` | `"11434"` | no |
| spoke-aks-node-ollama-webui-port | Port for the ollama web ui | `string` | `"8080"` | no |
| spoke-aks-subnet\_name | Spoke aks Subnet Name. | `string` | `"spoke-aks-subnet_name"` | no |
| spoke-aks-subnet\_prefix | Spoke Pod Subnet Prefix. | `string` | `"10.1.2.0/24"` | no |
| spoke-aks\_dns\_service\_ip | Spoke k8s dns service ip | `string` | `"10.2.0.10"` | no |
| spoke-aks\_pod\_cidr | Spoke k8s pod cidr. | `string` | `"10.244.0.0/16"` | no |
| spoke-aks\_service\_cidr | Spoke k8s service cidr. | `string` | `"10.1.2.0/24"` | no |
| spoke-check-internet-up-ip | Spoke Container Server Checks the Internet at this IP Address | `string` | `"8.8.8.8"` | no |
| spoke-k8s-node-pool-gpu | Set to true to enable GPU workloads | `bool` | `false` | no |
| spoke-k8s-node-pool-image | k8s node pool image. | `bool` | `false` | no |
| spoke-linux-server-image | Container server image product | `string` | `"linux-server"` | no |
| spoke-linux-server-image-gpu | Set to true to enable GPU workloads | `bool` | `false` | no |
| spoke-linux-server-ip | Spoke Container Server IP Address | `string` | `"10.1.1.5"` | no |
| spoke-linux-server-ollama-port | Port for ollama | `string` | `"11434"` | no |
| spoke-linux-server-ollama-webui-port | Port for the ollama web ui | `string` | `"8080"` | no |
| spoke-subnet\_name | Spoke Subnet Name. | `string` | `"spoke_subnet"` | no |
| spoke-subnet\_prefix | Spoke Subnet Prefix. | `string` | `"10.1.1.0/24"` | no |
| spoke-virtual-network\_address\_prefix | Spoke Virtual Network Address prefix. | `string` | `"10.1.1.0/24"` | no |
Expand All @@ -96,7 +105,9 @@ spoke-k8s-node-pool-gpu = false
|------|-------------|
| admin\_password | Password for admin account |
| admin\_username | Username for admin account |
| etc\_host | The public IP address of the hub NVA. |
| kube\_config | kube config |
| management\_fqdn | Management FQDN |
| resource\_group\_url | URL to access the Azure Resource Group in the Azure Portal |
| vip\_fqdn | VIP FQDN |
<!-- END_TF_DOCS -->
6 changes: 3 additions & 3 deletions terraform/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ locals {
sku = ""
publisher = ""
size = "Standard_B4ms"
gpu-size = "Standard_NC6s_v3" #16GB
#gpu-size = "Standard_NC24s_v3"
#gpu-size = "Standard_NC6s_v3" #16GB
gpu-size = "Standard_NC24s_v3"
#gpu-size = "Standard_NC4as_T4_v3" # 16GB
#gpu-size = "Standard_ND40rs_v2" # 32 GB vlink
#gpu-size = "Standard_NC24ads_A100_v4" # 80GB
#gpu-size = "Standard_NC24ads_A100_v4" # 80GB - not supported by azure-linux
}
}
}