How to enable Kubernetes node scaling without re-creating the node pool in Sitecore Managed Cloud Containers


Description

This article provides detailed information about how to change the node naming format to allow the Windows node pools in Sitecore Managed Cloud containerized deployment to be scaled out or in without causing the node pool to be recreated.

Limitations and Risks

How to apply

  1. Navigate to the infrastructure repository.
  2. Edit main.tf in the root folder of the repository.
  3. Find the following line:
    primary_windows_nodepool_name = "p${substr(replace(local.config.aks.windows_vm_size, "_", ""), length(local.config.aks.windows_vm_size)-4, -1)}${local.config.aks.windows_node_count}" 
    and replace it with:
    primary_windows_nodepool_name = "p${substr(replace(local.config.aks.windows_vm_size, "_", ""), length(local.config.aks.windows_vm_size)-4, -1)}" 
  4. Find the following line:
    scaled_windows_nodepool_name  = "s${try(substr(replace(local.config.aks.windows_scaled_vm_size, "_", ""), length(local.config.aks.windows_scaled_vm_size)-4, -1),"")}${try(local.config.aks.windows_scaled_node_count, 0)}"
    and replace it with:
    scaled_windows_nodepool_name  = "s${try(substr(replace(local.config.aks.windows_scaled_vm_size, "_", ""), length(local.config.aks.windows_scaled_vm_size)-4, -1),"")}"
  5. Run the infrastructure pipeline.