diff --git a/README.md b/README.md index bb5fce8..7236655 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Create Azure Kubernetes Services with Advanced Networking +# Create Azure Kubernetes Services with Advanced Networking Create Azure Kubernetes Services -- Advanced Networking +- Advanced Networking - Multiple Node pools - Diagnostics logging for master node @@ -11,7 +11,7 @@ Reference the module to a specific version (recommended): ```sh module "aks" { source = "git://github.com/melvinlee/aks-tf-module.git?ref=v0.1" - + aks_rg = var.aks_rg location = var.location ... @@ -35,7 +35,7 @@ variable "aks_rg" { } ``` -## location +## location ```sh variable "location" { @@ -49,7 +49,7 @@ variable "location" { ```sh variable "name" { description = "(Required) The name of the Managed Kubernetes Cluster to create." - type = "string" + type = string } ``` @@ -58,7 +58,7 @@ variable "name" { ```sh variable "aks_node_rg" { description = "(Optional) The name of the Resource Group where the the Kubernetes Nodes should exist." - type = "string" + type = string default = null } ``` @@ -82,6 +82,7 @@ variable "agent_pools" { vm_size = string os_type = string os_disk_size_gb = number + type = string max_pods = number availability_zones = list(number) enable_auto_scaling = bool @@ -94,6 +95,7 @@ variable "agent_pools" { vm_size = "Standard_D2s_v3" os_type = "Linux" os_disk_size_gb = 50 + type = "VirtualMachineScaleSets" max_pods = 30 availability_zones = [1, 2, 3] enable_auto_scaling = true @@ -106,6 +108,7 @@ variable "agent_pools" { Example Multiple node pools with different VM type (SKU) + ```sh agent_pools = [{ name = "pool1" @@ -114,6 +117,7 @@ agent_pools = [{ os_type = "Linux" os_disk_size_gb = 50 max_pods = 30 + type = "VirtualMachineScaleSets" availability_zones = [1, 2, 3] enable_auto_scaling = true min_count = 1 @@ -126,6 +130,7 @@ agent_pools = [{ os_type = "Linux" os_disk_size_gb = 30 max_pods = 30 + type = "VirtualMachineScaleSets" availability_zones = [1, 2, 3] enable_auto_scaling = true min_count = 1 @@ -177,15 +182,9 @@ tags = { variable "addon_profile" { description = "(Optional) AddOn Profile block." default = { - oms_agent = { - enabled = true # Enable Container Monitoring - } - http_application_routing = { - enabled = false # Disable HTTP Application Routing - } - kube_dashboard = { - enabled = false # Disable Kubernetes Dashboard - } + oms_agent_enabled = false # Enable Container Monitoring + http_application_routing_enabled = false # Disable HTTP Application Routing + kube_dashboard_enabled = false # Disable Kubernetes Dashboard } } ``` @@ -198,6 +197,7 @@ variable "log_analytics_workspace" { default = null } ``` + ## network_profile ```sh @@ -206,7 +206,7 @@ variable "network_profile" { default = { # Use azure-cni for advanced networking network_plugin = "azure" - # Sets up network policy to be used with Azure CNI. Currently supported values are calico and azure." + # Sets up network policy to be used with Azure CNI. Currently supported values are calico and azure." network_policy = "azure" service_cidr = "10.100.0.0/16" dns_service_ip = "10.100.0.10" @@ -245,7 +245,7 @@ variable "diagnostics_logs_map" { description = "(Optional) Send the logs generated by AKS master node to diagnostics" default = { log = [ - #["Category name", "Diagnostics Enabled", "Retention Enabled", Retention period] + #["Category name", "Diagnostics Enabled", "Retention Enabled", Retention period] ["kube-apiserver", true, true, 30], ["kube-controller-manager", true, true, 30], ["kube-scheduler", true, true, 30], @@ -265,6 +265,7 @@ variable "diagnostics_logs_map" { variable "diagnostics_map" { description = "(Optional) Storage Account and Event Hub data for the AKS diagnostics" default = { + log_analytics_workspace_id = null diags_sa = null eh_id = "" eh_name = null @@ -274,11 +275,11 @@ variable "diagnostics_map" { # Output -| Name | Description | -|----------------- |------------------------------------------------------------------------ | -| kube_config | kube_config block that comprised crendetials | -| kube_config_raw | Raw Kubernetes config to be used by kubectl and other compatible tools | -| ssh_key | The private key used by worker nodes | +| Name | Description | +| --------------- | ---------------------------------------------------------------------- | +| kube_config | kube_config block that comprised crendetials | +| kube_config_raw | Raw Kubernetes config to be used by kubectl and other compatible tools | +| ssh_key | The private key used by worker nodes | NOTE: kube_config credentials can be used with the Kubernetes Provider like so: @@ -295,4 +296,4 @@ provider "kubernetes" { # Contribute -Pull requests are welcome to evolve this module and integrate new features. \ No newline at end of file +Pull requests are welcome to evolve this module and integrate new features.