Skip to content

Latest commit

 

History

History
57 lines (43 loc) · 2.33 KB

README.md

File metadata and controls

57 lines (43 loc) · 2.33 KB

Microsoft Azure Kubernetes Service

This folder contains a basic example for provisioning a "Managed Kubernetes Cluster" from Microsoft Azure using Terraform. The Terraform scripts deploy an instance of Azure Kubernetes Service (AKS) with two node pools of customizable Azure VM types called default and database pool.

This is just a basic example. For detailed information on all configuration options visit the azurerm_kubernetes_cluster docs.

Requirements

🛠️ Usage

  1. Clone this repo and switch to the provisioning/ms-azure folder.

    git clone --depth 1 https://github.com/tum-gis/sddi-ckan-k8s
    cd sddi-ckan-k8s/provisioning/ms-azure
  2. Run Terraform initialization

    terraform init
  3. Decide for Azure VM types and count for both node pools, a name of the resource group, and provide one or more email addresses for budget warning notifications. Pass these options to terraform plan to create an execution plan.

    terraform plan -out plan.json \
      -var resource_group_name="ckan-aks-rg" \
      -var 'contact_emails=["[email protected]","[email protected]"]' \
      -var k8s_default_node_type="Standard_A2_v2" \
      -var k8s_default_node_count=2 \
      -var k8s_database_node_type="Standard_D4s_v3" \
      -var k8s_database_node_count=1
  4. Apply the plan to book the specified resources.

    terraform apply plan.json
  5. The access credentials of the AKS instance are output in .kubeconfig. Store the credentials in a safe place and add them to your ~/.kube/config file to use them with e.g. kubectl. After that, it is recommended to delete the file.