Automated script-based upgrade
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
contextis set to the cluster where the upgrade operation is to be performed. Run the following command:kubectl config current-contextThe 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 asazureuser, where/usr/local/binis 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.
| Role | Scope | Purpose |
|---|---|---|
| AKS Cluster Admin | AKS cluster | Access the Kubernetes API for Helm and kubectl operations. |
| Contributor | Resource group | Manage AKS cluster, node pool, storage account, and Key Vault resources. |
| Key Vault Administrator | Key Vault | Manage Key Vault keys during the upgrade. |
| Storage Blob Data Contributor | Backup storage account | Read and write Terraform state files in blob storage. |
| User Access Administrator | Resource group | Create 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.
| Placeholder | Description | Where 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:
Create a
upgrade_120directory on the jump box and navigate to it.mkdir upgrade_120 && cd upgrade_120Download and extract the PCT to the
upgrade_120directory.Authenticate the Azure CLI and select the target subscription. Terraform and the Azure CLI operations invoked by the upgrade script rely on an active
azsession.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 showNote: CLI login using Single Sign-On (SSO) is not supported. Use
az login --use-device-codeor 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.
Verify the active context points to the correct cluster using the following command:
kubectl config current-contextConfigure 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 thedeployment_120directory. Edit theterraform.tfvarsfile to update the value ofharbor_secretparameter withharbor-secret.If the registry supports anonymous image pulls: No action is required. Ensure the
harbor_secretvalue in theterraform.tfvarsfile is empty.
Note: Ensure that the value of the
harbor_secretparameter in the05_helm_releasesmodule is the same in both installation and upgradeterraform.tfvarsfiles.
Initiate the upgrade from the
upgrade_120directory 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.
Feedback
Was this page helpful?