Skip to content

Commit

Permalink
updated README.
Browse files Browse the repository at this point in the history
  • Loading branch information
melvinlee committed Dec 4, 2019
1 parent 6216970 commit b173133
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
...
Expand All @@ -35,7 +35,7 @@ variable "aks_rg" {
}
```

## location
## location

```sh
variable "location" {
Expand All @@ -49,7 +49,7 @@ variable "location" {
```sh
variable "name" {
description = "(Required) The name of the Managed Kubernetes Cluster to create."
type = "string"
type = string
}
```

Expand All @@ -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
}
```
Expand All @@ -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
Expand All @@ -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
Expand All @@ -106,6 +108,7 @@ variable "agent_pools" {
Example

Multiple node pools with different VM type (SKU)

```sh
agent_pools = [{
name = "pool1"
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
}
}
```
Expand All @@ -198,6 +197,7 @@ variable "log_analytics_workspace" {
default = null
}
```

## network_profile

```sh
Expand All @@ -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"
Expand Down Expand Up @@ -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],
Expand All @@ -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
Expand All @@ -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:

Expand All @@ -295,4 +296,4 @@ provider "kubernetes" {

# Contribute

Pull requests are welcome to evolve this module and integrate new features.
Pull requests are welcome to evolve this module and integrate new features.

0 comments on commit b173133

Please sign in to comment.