This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Upgrade

Complete the steps provided in this section to upgrade a PPC to v1.2.0.

The PPC cluster can be upgraded from v1.1.0 to v1.2.0 using one of the following methods:

Automated script-based upgrade: Runs the upgrade.sh script, which upgrades all components automatically in sequence.

Manual component-based upgrade: Applies each Terraform module individually. The terraform.tfvars files are copied from storage account and applied one module at a time, giving full visibility and control over each step.

1 - Automated script-based upgrade

Complete the steps provided in this section to upgrade a PPC to v1.2.0.

Before you begin

Before starting an upgrade, ensure the following conditions are met:

  • Access to the jump box associated with the PPC v1.1.0 cluster is required. This must be the same jump box used during the PPC v1.1.0 installation.

  • Create a Velero backup and an OpenSearch snapshot to ensure data recovery is possible, in case of an upgrade failure.

  • Ensure that the context is set to the cluster where the upgrade operation is to be performed. Run the following command:

    kubectl config current-context
    

    The cluster name in the output must match the cluster installed with PPC v1.1.0.

  • Before running the bootstrap scripts as the root user on RHEL, ensure that /usr/local/bin, and the Azure CLI binary path, if applicable, is included in the $PATH. Alternatively, run the script using a non-root user, such as azureuser, where /usr/local/bin is already part of the default $PATH.

  • Do not install or manage multiple clusters from the same working directory. Each cluster deployment maintains its own Terraform or OpenTofu state, and reusing a directory can overwrite state files, causing loss of cluster tracking and unintended cleanup behavior.
    Use a dedicated directory, per cluster.

Required Permissions

The Azure principal performing the upgrade must have the following RBAC roles assigned.

RoleScopePurpose
AKS Cluster AdminAKS clusterAccess the Kubernetes API for Helm and kubectl operations.
ContributorResource groupManage AKS cluster, node pool, storage account, and Key Vault resources.
Key Vault AdministratorKey VaultManage Key Vault keys during the upgrade.
Storage Blob Data ContributorBackup storage accountRead and write Terraform state files in blob storage.
User Access AdministratorResource groupCreate and manage role assignments for managed identities.

Required container registry Secrets

Export the container registry credentials as environment variables.

export TF_VAR_username='<registry-username>'
export TF_VAR_password='<registry-password>'

Values to collect before starting

Gather the following values before running the upgrade command.

PlaceholderDescriptionWhere to find it
<cluster-name>Name of the AKS cluster to upgrade.Confirmed from the kubectl config current-context output.
<harbor-password>Harbor registry password.Harbor credentials used during PPC v1.1.0 installation.
<harbor-secret-name>Kubernetes secret name for the Harbor registry.Typically harbor-secret, from the original installation configuration.
<harbor-username>Harbor registry username.Harbor credentials used during PPC v1.1.0 installation.
<resource-group>Name of the Azure resource group where the cluster is deployed.Azure portal or installation configuration.
<storage-account-name>Name of the Azure storage account used to store Terraform state.Storage account configured during PPC v1.1.0 installation.
<subscription-ID>Azure subscription ID.Azure portal under Subscriptions.

Upgrading PPC

The upgrade process downloads the latest images from the repository and deploys the updated containers to the target environment.

To upgrade the PPC from v1.1.0 to v1.2.0, perform the following steps:

  1. Create a upgrade_120 directory on the jump box and navigate to it.

    mkdir upgrade_120 && cd upgrade_120
    
  2. Download and extract the PCT to the upgrade_120 directory.

  3. Authenticate the Azure CLI and select the target subscription. Terraform and the Azure CLI operations invoked by the upgrade script rely on an active az session.

    If the session has expired or you are not logged in, run the following commands to authenticate and confirm the active account:

    az login
    az account show
    

    Note: CLI login using Single Sign-On (SSO) is not supported. Use az login --use-device-code or authenticate as a Service Principal.

    Set the active subscription to the one that hosts the AKS cluster.

    az account set --subscription <subscription-ID>
    

    Replace the placeholder with the value collected in Values to collect before starting. Ensure the target subscription, resource group, managed identities, subnet, and private DNS zone are accessible before continuing.

  4. Verify the active context points to the correct cluster using the following command:

     kubectl config current-context
    
  5. Configure the container registry pull secret based on your registry type:

  • If using a private registry with authentication: The upgrade must recreate the Harbor pull secret. Navigate to /iac/azure/cluster/modules/05_helm_releases/ under the deployment_120 directory. Edit the terraform.tfvars file to update the value of harbor_secret parameter with harbor-secret.

  • If the registry supports anonymous image pulls: No action is required. Ensure the harbor_secret value in the terraform.tfvars file is empty.

Note: Ensure that the value of the harbor_secret parameter in the 05_helm_releases module is the same in both installation and upgrade terraform.tfvars files.

  1. Initiate the upgrade from the upgrade_120 directory using the following command:

    ./upgrade.sh --cloud azure --resource-group <resource-group> --storage-account <storage-account-name> --subscription-id <subscription-ID> --cluster <cluster-name>
    

    Replace the placeholders with the environment-specific values.

After the upgrade is successful, a Upgrade complete for all stages message is displayed.

The upgrade typically takes 10–15 minutes approximately, but duration may vary.

Post Upgrade Steps

After the upgrade completes, perform the following verification steps to confirm the cluster is healthy.

1. Verify all nodes are Ready

To verify if all nodes are in the ready state, run the following command:

kubectl get nodes -o wide

2. Verify all pods are Running

To verify if all pods are in the running state, run the following command:

kubectl get pods -A

3. Verify Helm releases

To verify if the helm releases are in the deployed state, run the following command:

helm list -A

4. Directory Maintenance after Upgrade

During upgrade, both the previous and the new PPC installation directories must be retained.

  • The original directory contains Terraform state and deployment metadata.
  • The new directory contains the updated configuration and binaries.

Both directories are required for proper management of the deployment.

Reverting to a previous version of PPC

To revert to a previous version of PPC, restore the cluster using the steps in Restoring the PPC.

2 - Manual component-based upgrade

Complete the steps provided in this section to update the configuration files and upgrade PPC to v1.2.0 in Azure Kubernetes Service (AKS).

Before you begin

Before starting an upgrade, ensure the following conditions are met:

  • Access to the jump box associated with the PPC v1.1.0 cluster is required. This must be the same jump box used during the PPC v1.1.0 installation.

  • Create a Velero backup and an OpenSearch snapshot to ensure data recovery is possible, in case of an upgrade failure.

  • The context is set to the cluster where the upgrade operation is to be performed. Run the following command:

    kubectl config current-context
    

    The cluster name in the output must match the cluster installed with PPC v1.1.0.

  • Do not install or manage multiple clusters from the same working directory. Each cluster deployment maintains its own Terraform or OpenTofu state, and reusing a directory can overwrite state files, causing loss of cluster tracking and unintended cleanup behavior.
    Use a dedicated directory, per cluster.

Jump box requirement

Ensure that the entire process is performed using the same jump box used for the original installation, with all tools already installed.

Required permissions

RequirementDetails
Azure RBACContributor and User Access Administrator on the target subscription or resource group.
Jump boxThe same jump box used for the original installation, with all tools already installed.
Blob Storage accessStorage Blob Data Contributor on the backup storage account to download the saved terraform.tfvars files.

Required roles

The Azure principal must have AKS cluster admin access.

The required Azure RBAC Roles are listed in the following table:

RoleScopeUsed by
ContributorResource groupCreate AKS cluster, node pool, storage account, Key Vault
User Access AdministratorResource groupCreate role assignments (module 01)
Storage Blob Data ContributorBackup storage accountAccess state files in backend, upload module 00 state
Key Vault AdministratorKey VaultCreate Key Vault and keys (module 00)
AKS Cluster AdminAKS clusterKubernetes API access for Helm, kubectl operations (modules 04, 05)

Required container registry secrets

Export the container registry credentials as environment variables.

export TF_VAR_username='<registry-username>'
export TF_VAR_password='<registry-password>'

Values to collect before starting

Gather the following values before starting the upgrade.

ValueDescriptionExample
Cluster nameName of the AKS cluster being upgraded.<cluster-name>
Resource groupAzure resource group containing the cluster.<resource-group>
Azure subscription IDUnique identifier of the Azure subscription.<subscription-id>
Storage account nameAzure Storage Account used for Velero backups and Terraform remote state.<storage-account-name>
Backup container nameBlob container within the storage account used by Velero.<container-name>
Registry username and password (TF_VAR_username, TF_VAR_password)Container registry credentials, required only if a private registry with authentication is used.Provided by the organization.

Upgrading PPC using component-based approach

To upgrade the PPC from v1.1.0 to v1.2.0 using the component-based approach, perform the following steps:

StepActionDescription
1Authenticating with Azure CLIAuthenticates the jump box with Azure CLI and verifies access to the target subscription and resources.
2Downloading and extracting the archiveCreates a dedicated working directory and extracts the new PPC release archive.
3Obtaining terraform.tfvars from blob storageLocates the backed-up terraform.tfvars files for each module in Azure Blob Storage.
4Configuring container registry secretsConfigures the Harbor pull secret when the registry requires authentication.
5Modifying and applying terraform.tfvars filesDownloads each module’s terraform.tfvars from blob storage and applies the Terraform configuration module by module.
6Verifying the upgradeConfirms all cluster nodes are in Ready state, and all pods are in Running or Completed state.

Upgrading the PPC

To deploy the PPC using component-based installation, perform the following steps:

1. Authenticating with Azure CLI

If you are already authenticated, run the following command to verify your session:

az account show

If the session has expired or you are not logged in, run the following command to authenticate:

az login
az account show

Note: CLI login using Single Sign-On (SSO) is not supported. Use az login --use-device-code or authenticate as a Service Principal.

Ensure the target subscription, resource group, managed identities, subnet, and private DNS zone are accessible before continuing.

2. Downloading and extracting the PCT

Create a dedicated directory for the new release and extract the PCT.

  1. Create a working directory for the upgrade and navigate to it.
mkdir upgrade_120 && cd upgrade_120
  1. Download and extract the archive to the upgrade_120 directory.

3. Obtaining terraform.tfvars from blob storage

Each module’s terraform.tfvars is backed up to Azure Blob Storage during the original installation. These files are available on the Azure portal under the backup storage account in the infrastructure-manifest container.

ModuleBlob path suffix
00_backup_storageinfrastructure-manifest/<cluster-name>/tfvars/00_backup_storage/terraform.tfvars
01_identityinfrastructure-manifest/<cluster-name>/tfvars/01_identity/terraform.tfvars
02_aks_clusterinfrastructure-manifest/<cluster-name>/tfvars/02_aks_cluster/terraform.tfvars
03_node_poolinfrastructure-manifest/<cluster-name>/tfvars/03_node_pool/terraform.tfvars
04_aks_addonsinfrastructure-manifest/<cluster-name>/tfvars/04_aks_addons/terraform.tfvars
05_helm_releasesinfrastructure-manifest/<cluster-name>/tfvars/05_helm_releases/terraform.tfvars

4. Configuring container registry secrets

Configure the container registry pull secret based on your registry type:

  • If using a private registry with authentication: The upgrade must recreate the Harbor pull secret. Navigate to /iac/azure/cluster/modules/05_helm_releases/ under the deployment_120 directory. Edit the terraform.tfvars file to update the value of harbor_secret parameter with harbor-secret.

  • If the registry supports anonymous image pulls: No action is required. Ensure the harbor_secret value in the terraform.tfvars file is empty.

Note: Ensure that the value of the harbor_secret parameter in the 05_helm_releases module is the same in both installation and upgrade terraform.tfvars files.

5. Modifying and applying terraform.tfvars files

For each module, copy the terraform.tfvars from blob storage and save to the upgrade directory, then apply the Terraform configuration before proceeding to the next module.

To navigate to the modules directory, run the following command:

cd upgrade_120/iac/azure/cluster/modules

00_backup_storage

a. Navigate to the 00_backup_storage directory.

cd 00_backup_storage

b. Copy the terraform.tfvars from blob storage and save to the upgrade 00_backup_storage/terraform.tfvars.

az storage blob download \
 --account-name <storage-account-name> \
 --container-name <container-name> \
 --name infrastructure-manifest/<cluster-name>/tfvars/00_backup_storage/terraform.tfvars \
 --file iac/azure/cluster/modules/00_backup_storage/terraform.tfvars \
 --auth-mode login

c. Restore the existing state file for 00_backup_storage to prevent tofu apply from attempting to recreate existing resources.

az storage blob download \
  --account-name <storage-account-name> \
  --container-name <container-name> \
  --name infrastructure-manifest/<cluster-name>/states/00_backup_storage.tfstate \
  --file terraform.tfstate \
  --auth-mode login

d. To apply the terraform configuration, run the following command:

tofu init
tofu plan   # review the plan that will be created
tofu apply  # when prompted with "Enter a value:", type "yes"

e. Synchronize the state file from 00_backup_bucket to the Azure storage account.

bootstrap-scripts/sync-backup-storage-state-to-azure.sh

01_identity

a. Navigate to the 01_identity directory.

cd 01_identity

b. Copy the terraform.tfvars from blob storage and save to the upgrade 01_identity/terraform.tfvars.

az storage blob download \
 --account-name <storage-account-name> \
 --container-name <container-name> \
 --name infrastructure-manifest/<cluster-name>/tfvars/01_identity/terraform.tfvars \
 --file iac/azure/cluster/modules/01_identity/terraform.tfvars \
 --auth-mode login

c. To apply the terraform configuration, run the following command:

tofu init
tofu plan   # review the plan that will be created
tofu apply  # when prompted with "Enter a value:", type "yes"

02_aks_cluster

a. Navigate to the 02_aks_cluster directory.

cd 02_aks_cluster

b. Copy the terraform.tfvars from blob storage and save to the upgrade 02_aks_cluster/terraform.tfvars.

az storage blob download \
 --account-name <storage-account-name> \
 --container-name <container-name> \
 --name infrastructure-manifest/<cluster-name>/tfvars/02_aks_cluster/terraform.tfvars \
 --file iac/azure/cluster/modules/02_aks_cluster/terraform.tfvars \
 --auth-mode login

c. To apply the terraform configuration, run the following command:

tofu init
tofu plan   # review the plan that will be created
tofu apply  # when prompted with "Enter a value:", type "yes"

03_node_pool

a. Navigate to the 03_node_pool directory.

cd 03_node_pool

b. Copy the terraform.tfvars from blob storage and save to the upgrade 03_node_pool/terraform.tfvars.

az storage blob download \
 --account-name <storage-account-name> \
 --container-name <container-name> \
 --name infrastructure-manifest/<cluster-name>/tfvars/03_node_pool/terraform.tfvars \
 --file iac/azure/cluster/modules/03_node_pool/terraform.tfvars \
 --auth-mode login

c. To apply the terraform configuration, run the following command:

tofu init
tofu plan   # review the plan that will be created
tofu apply  # when prompted with "Enter a value:", type "yes"

04_aks_addons

a. Navigate to the 04_aks_addons directory.

cd 04_aks_addons

b. Copy the terraform.tfvars from blob storage and save to the upgrade 04_aks_addons/terraform.tfvars.

az storage blob download \
 --account-name <storage-account-name> \
 --container-name <container-name> \
 --name infrastructure-manifest/<cluster-name>/tfvars/04_aks_addons/terraform.tfvars \
 --file iac/azure/cluster/modules/04_aks_addons/terraform.tfvars \
 --auth-mode login

c. To apply the terraform configuration, run the following command:

tofu init
tofu plan   # review the plan that will be created
tofu apply  # when prompted with "Enter a value:", type "yes"

05_helm_releases

a. Navigate to the 05_helm_releases directory.

cd 05_helm_releases

b. Copy the terraform.tfvars from blob storage and save to the upgrade 05_helm_releases/terraform.tfvars.

az storage blob download \
 --account-name <storage-account-name> \
 --container-name <container-name> \
 --name infrastructure-manifest/<cluster-name>/tfvars/05_helm_releases/terraform.tfvars \
 --file iac/azure/cluster/modules/05_helm_releases/terraform.tfvars \
 --auth-mode login

c. To apply the terraform configuration, run the following command:

tofu init
tofu plan   # review the plan that will be created
tofu apply  # when prompted with "Enter a value:", type "yes"

6. Verifying the upgrade

After the upgrade completes, perform the following verification steps to confirm the cluster is healthy.

Verify all nodes are Ready

To verify if all nodes are in the Ready state, run the following command:

kubectl get nodes -o wide

Verify all pods are Running

To verify if all pods are in the Running state, run the following command:

kubectl get pods -A

Verify Helm releases

To verify if the helm releases are in the Deployed state, run the following command:

helm list -A

All nodes must be in the Ready state, all pods must be in the Running or Completed state, and the Velero backup storage location must show Available.

Reverting to a previous version of PPC

To revert to a previous version of PPC, restore the cluster using the steps in Restoring the PPC.