/tf-module-rancher-aks

Terraform Module for deploying the Rancher App on AKS

Primary LanguageHCL

Introduction

This repository is an example configuration for installing Rancher v2.6.X on AKS on Azure.

What this configuration creates

This configuration creates everything necessary for Rancher App on AKS:

  1. A resource group
  2. An AKS cluster with 3 nodes
  3. Kubernetes pre-requisites to Rancher (Cert-manager and namespace)
  4. Rancher installation using Helm
  5. NGINX Ingress Controller
  6. DNS Entries in an Azure Hosted Zone.

NOTE: This installation might fail in your environment because of Cloud configuration specificities. Please make sure to adapt the configuration to your environment.

Technical Documentation

Requirements

Name Version
terraform >= 0.13
azurerm =2.95.0

Providers

Name Version
azurerm =2.95.0
helm n/a
kubernetes n/a

Modules

Name Source Version
aks ./azure-aks
rancher_server github.com/belgaied2/tf-module-rancher-server

Resources

Name Type
azurerm_dns_a_record.rancher_aks resource
helm_release.nginx-ingress resource
kubernetes_service.nginx_host data source

Inputs

Name Description Type Default Required
aks_kubernetes_version Version of Rancher Management Cluster's Kubernetes string "v1.20.9" no
aks_name_prefix Prefix to use for the cluster name string n/a yes
azure_location Location to be used for the Resource Group string "Germany West Central" no
dns_resource_group_name Resource Group Name for the DNS Entries string n/a yes
dns_zone_name DNS Zone to host Rancher in string n/a yes
nginx_ingress_ns Namespace where the NGINX Ingress Controller should be installed string "ingress-nginx" no
nginx_ingress_version Version of NGINX Ingress Controller string "4.0.17" no
rancher_chart_options List of options for the Rancher Helm Chart
list(object({
name = string
value = string
}))
[] no
rancher_version Version of Rancher Server to install string "v2.6.3" no

Outputs

Name Description
rancher_endpoint Rancher HTTPS Endpoint

Backend Configuration

You will notice that the backend.tf file does not contain actual configuration for the http backend. This is meant to use the GitLab Terraform state. Please check the file gitlab_backend.example for a gitlab backend configuration template that you can fill with your settings and use using the command terraform init -backend-config=gitlab_backend.example.

You can also switch to the azurerm backend commented in the file or any other backend you would like to use.

Feedback

Please review and test this configuration, then send any feedback to Mohamed : mohamed.belgaied@suse.com