A Terraform module for creating
Azure Kubernetes Service
resources with Azure Container Registry Service
resource.
.
To use this module you need the following resources:
This module creates Azure Kubernetes Service
resources with Azure Container Registry Service
resource.
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"
}
}
See variables.tf
in addition of all arguments above the following attributes are exported by the module:
local_file
: A file with the kubernetes configuration returned byAzure Kubernetes Service
kube_config_raw
attributekube_config
: A Kubernetes configuration string returned byAzure Kubernetes Service
kube_config_raw
attributekubernetes_cluster_name
: The created kubernetes cluster name returned byAzure Kubernetes Service
name
attributekubelet_identity
: The kubernetes identity returned byAzure Kubernetes Service
kubelet_identity
attributecontainer_registry_id
: The create container registry id returned byAzure Container Registry Service
container_registry_id
attributecontainer_registry_name
: The created container registry name returned byAzure Container Registry Service
container_registry_id
attributecontainer_registry_login_server
: The url to connect with the created container registry service returned byAzure Container Registry Service
container_registry_login_server
attributecontainer_registry_fqdn
: The FQDN of the created container registry service returned byAzure Container Registry Service
container_registry_fqdn
attributecontainer_registry_admin_username
: The Username associated with the Container Registry Admin account - if the admin account is enabled, returned byAzure Container Registry Service
container_registry_admin_username
attributecontainer_registry_admin_password
: The Password associated with the Container Registry Admin account - if the admin account is enabled, returned byAzure Container Registry Service
container_registry_admin_password
attribute
You have the samples in samples folder