Skip to content

Commit 0bb3ff1

Browse files
committed
readme files
1 parent df14b62 commit 0bb3ff1

2 files changed

Lines changed: 37 additions & 12 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Kubernetes cluster with Azure Kubernetes Service (AKS)
2+
3+
This template provisions an [AKS / Azure Kubernetes service (also known as a Managed Kubernetes Cluster)](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kubernetes_cluster).
4+
5+
## Terraform resource types
6+
7+
- [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
8+
- [random_string](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string)
9+
- [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
10+
- [azurerm_log_analytics_workspace](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/log_analytics_workspace)
11+
- [azurerm_log_analytics_solution](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/log_analytics_solution)
12+
- [azurerm_kubernetes_cluster](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kubernetes_cluster)
13+
14+
## Variables
15+
16+
| Name | Description | Default |
17+
|-|-|-|
18+
| `resource_group_name_prefix` | Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription. | rg |
19+
| `resource_group_location` | Location of the resource group. | eastus |
20+
| `agent_count` | Initial number of nodes which should exist in this Node Pool. Value must be between 1 and 1000. | 3 |
21+
| `ssh_public_key` | File containing the an ssh_key block. | ~/.ssh/id_rsa.pub |
22+
| `dns_prefix` | DNS prefix specified when creating the managed cluster. | k8stest |
23+
| `cluster_name` | Name of the Managed Kubernetes Cluster to create. | k8stest |
24+
| `log_analytics_workspace_name` | Prefix of the name of the Log Analytics Workspace. Random value is appended to ensure uniqueness across Azure. | testLogAnalyticsWorkspaceName |
25+
| `log_analytics_workspace_location` | Azure location where the resource exists. | eastus |
26+
| `log_analytics_workspace_sku` | SKU of the Log Analytics Workspace. | PerGB2018 |
27+
| `aks_service_principal_app_id` | Service principal app ID. | |
28+
| `aks_service_principal_client_secret` | Service principal password. | |
29+
| `aks_service_principal_object_id` | Service principal object ID. | |
30+
31+
## Example
32+
33+
To see how to run this example, see [Create a Kubernetes cluster with Azure Kubernetes Service using Terraform](https://docs.microsoft.com/azure/developer/terraform/create-k8s-cluster-with-tf-and-aks).

quickstart/201-k8s-cluster-with-tf-and-aks/variables.tf

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,22 @@ variable "cluster_name" {
2424
default = "k8stest"
2525
}
2626

27-
variable "resource_group_name" {
28-
default = "azure-k8stest"
29-
}
30-
31-
variable "location" {
32-
default = "Central US"
33-
}
34-
3527
variable "log_analytics_workspace_name" {
3628
default = "testLogAnalyticsWorkspaceName"
3729
}
3830

39-
# refer https://azure.microsoft.com/global-infrastructure/services/?products=monitor for log analytics available regions
31+
# Refer to https://azure.microsoft.com/global-infrastructure/services/?products=monitor for available Log Analytics regions.
4032
variable "log_analytics_workspace_location" {
4133
default = "eastus"
4234
}
4335

44-
# refer https://azure.microsoft.com/pricing/details/monitor/ for log analytics pricing
36+
# Refer to https://azure.microsoft.com/pricing/details/monitor/ for Log Analytics pricing
4537
variable "log_analytics_workspace_sku" {
4638
default = "PerGB2018"
4739
}
4840

49-
# these following three entries are placeholder references; we will specify values later in terraform.tfvars
41+
# The following three variable declarations are placeholder references.
42+
# Set the values for these variable in terraform.tfvars
5043
variable "aks_service_principal_app_id" {
5144
default = ""
5245
}
@@ -58,4 +51,3 @@ variable "aks_service_principal_client_secret" {
5851
variable "aks_service_principal_object_id" {
5952
default = ""
6053
}
61-

0 commit comments

Comments
 (0)