Skip to content

Latest commit

 

History

History
73 lines (55 loc) · 5.5 KB

File metadata and controls

73 lines (55 loc) · 5.5 KB

Azure Kubernetes Service (AKS) with Azure Container Registry Service (ACR)

A Terraform module for creating Azure Kubernetes Service resources with Azure Container Registry Service resource. .

Prerequisites

To use this module you need the following resources:

Module Features

This module creates Azure Kubernetes Service resources with Azure Container Registry Service resource.

Getting Started

Most basic usage creating a Azure Kubernetes Service resource with Azure Container Registry Service resource.

module "k8s" {
  source                         = "."
  environment                    = "development"
  resource_group_name            = azurerm_resource_group.rg.name
  location                       = azurerm_resource_group.rg.location
  container_name                 = "k8sSample"
  container_sku                  = "Basic"
  container_admin_enabled        = true
  k8s_name                       = "k8sSample"
  default_node_pool_name         = "default"
  default_node_pool_node_count   = 3
  default_node_pool_vm_size      = "standard_d2_v2"
  default_node_pool_disk_size_gb = 30
  automatic_channel_upgrade      = "rapid"
  identity_type                  = "SystemAssigned"

  tags = {
    environment = "Demo"
  }
}

Module Argument Reference

See variables.tf

Module Attributes Reference

in addition of all arguments above the following attributes are exported by the module:

  • local_file: A file with the kubernetes configuration returned by Azure Kubernetes Service kube_config_raw attribute
  • kube_config: A Kubernetes configuration string returned by Azure Kubernetes Service kube_config_raw attribute
  • kubernetes_cluster_name: The created kubernetes cluster name returned by Azure Kubernetes Service name attribute
  • kubelet_identity: The kubernetes identity returned by Azure Kubernetes Service kubelet_identity attribute
  • container_registry_id: The create container registry id returned by Azure Container Registry Service container_registry_id attribute
  • container_registry_name: The created container registry name returned by Azure Container Registry Service container_registry_id attribute
  • container_registry_login_server: The url to connect with the created container registry service returned by Azure Container Registry Service container_registry_login_server attribute
  • container_registry_fqdn: The FQDN of the created container registry service returned by Azure Container Registry Service container_registry_fqdn attribute
  • container_registry_admin_username: The Username associated with the Container Registry Admin account - if the admin account is enabled, returned by Azure Container Registry Service container_registry_admin_username attribute
  • container_registry_admin_password: The Password associated with the Container Registry Admin account - if the admin account is enabled, returned by Azure Container Registry Service container_registry_admin_password attribute

Samples

You have the samples in samples folder