Skip to content

syedhassaanahmed/tf-aks-ingress-tls

Repository files navigation

tf-aks-ingress-tls

Terraform

This Terraform template is loosely based on this document. It provisions an AKS Cluster with NGINX Ingress Controller and issues LetsEncrypt TLS certificate using cert-manager.

Requirements

Caveats

resource "azurerm_network_security_rule" "aks_inbound" {
  name                        = "aks-inbound"
  resource_group_name         = azurerm_resource_group.rg.name
  network_security_group_name = azurerm_network_security_group.nsg.name
  protocol                    = "Tcp"
  source_port_range           = "*"
  destination_port_ranges     = ["80", "443"]
  source_address_prefix       = "*"
  destination_address_prefix  = "*"
  access                      = "Allow"
  priority                    = 1001
  direction                   = "Inbound"
}

Smoke Test

Once terraform apply has successfully completed, fill the following variable from the Terraform output;

export ingress_fqdn="xxxxxx.westeurope.cloudapp.azure.com"

Then;

./smoke_test.sh

The smoke test will create a test deployment, service and ingress in the newly provisioned AKS cluster.

About

This Terraform template provisions AKS with NGINX Ingress and LetsEncrypt TLS certificate

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published