In-cluster deployment

Complete the steps provided in this section to deploy PPC onto an existing Azure Kubernetes Service (AKS) cluster using In-Cluster Deployment.

Setting Up an AKS Cluster for PPC

This is the in-cluster deployment guide for Azure. The Azure Kubernetes Service (AKS) cluster and supporting Azure resources are provisioned by the user. The PPC installer then runs only Stage 05 (Helm releases) to deploy the application. The infrastructure is provisioned outside the installer. The cluster must therefore meet the specifications mentioned here.

Follow the prerequisites below and make sure every item matches how the cluster is created.

Deploying PPC using In-Cluster Deployment (AKS)

To deploy PPC, complete the following steps in order. Each step is described in detail in the sections below.

StepActionDescription
#Before you beginConfirms that the existing cluster, permissions, identities, storage, and installer inputs meet the prerequisites.
1Preparing a jump boxCreates or identifies a jump box with network access to the AKS API server.
2Downloading and extracting the release archiveGets the PPC release archive onto the jump box.
3Installing required toolsInstalls the CLI tools needed to configure and deploy PPC.
4Logging in to Azure CLIAuthenticates with Azure and selects the target subscription.
5Configuring AKS accessRetrieves AKS credentials for kubectl and Helm.
6Verifying cluster connectivityConfirms that the jump box can reach the cluster and that nodes are ready.
7Gathering values for terraform.tfvarsCollects cluster-specific values, including storage classes, network settings, registry credentials, federated credentials, and node architecture.
8Updating terraform.tfvarsSets the values required by the 05_helm_releases module.
9Running the readiness checkValidates the environment and identifies issues to resolve before deployment.
10Applying the OpenTofu configurationApplies the configuration to deploy PPC Helm charts onto the AKS cluster.

Before you begin

Prerequisites checklist

Before deployment, confirm that the environment meets all the prerequisites below. The installer’s readiness check validates applicable requirements before Stage 05.

Access & permissions

Verify that the required permissions are in place at each Azure scope:

Azure scopeRequired permissionPurpose
Resource group containing the clusterContributor or Owner.Create the storage account, cluster, node pool, and identities.
Resource group, storage account, and Key VaultOwner, User Access Administrator, or Role Based Access Control Administrator.Create role assignments and federated credentials.
Key VaultKey Vault Administrator or Key Vault Crypto OfficerCreate the encryption key in an RBAC-enabled vault.
AKS subnet (VNet)Grant the AKS identity Network Contributor; the operator needs Network Contributor, Owner, or User Access Administrator to assign it.Allow the AKS identity to join the subnet and create the private cluster.
Private DNS zoneGrant the AKS identity Private DNS Zone Contributor. The operator needs that role, Owner, or User Access Administrator to assign it.Allow the AKS identity to manage records for the private cluster.

Network scopes are the most common blocker. The subnet and private DNS zone are often owned by IT in a different resource group or subscription. Ask the scope owner to assign Network Contributor on the subnet and Private DNS Zone Contributor on the DNS zone. Assign both roles to the AKS managed identity. Without both, the private cluster creation fails.

Backup storage

RequirementDetails
Backup containerCreate the backup container (velero) in the storage account.
Storage account typeUse StorageV2 / blob, not Azure Files, and keep hierarchical namespace Off. Otherwise, backups fail.
Customer-managed key (if required)Configure a Key Vault with an RSA-2048 key and CMK encryption. The storage account identity needs Key Vault Crypto Service Encryption User on the vault.

Identities and RBAC

Identity or valueRequired role or configurationScope
AKS identityManaged Identity Operator and Virtual Machine Contributor.Resource group
AKS identityNetwork Contributor.AKS subnet
AKS identityPrivate DNS Zone Contributor.Private DNS zone; required for a private cluster
Velero identityDisk Snapshot Contributor.Resource group
Velero identityStorage Blob Data Contributor.Storage account
Velero identityKey Vault Crypto User.Key Vault
OpenSearch identityStorage Blob Data Contributor.Storage account
Velero and OpenSearch identitiesCapture valid client IDs in UUID format.-

AKS cluster

RequirementExpected configuration
Cluster availabilityCluster exists and is reachable.
Cluster accessCluster is private.
Identity integrationOIDC issuer and Workload Identity are enabled.
NetworkingAzure CNI Overlay + Cilium; this is immutable and required by NAP.
Node Auto ProvisioningEnabled in Auto mode.
AuthenticationLocal accounts with Kubernetes RBAC; otherwise kubectl may return Forbidden.
Secrets Store CSI driverKey Vault Secrets Store CSI driver addon is enabled.
Availability zonesNode pools span at least two availability zones.
System node poolHas the CriticalAddonsOnly=true:NoSchedule taint, at least 2 nodes, and an adequate VM size.
Node architectureEvery node pool uses the same architecture (amd64 or arm64), matching architecture in 05_helm_releases/terraform.tfvars. Refer to Step 7.5.
Federated credentialsVelero and OpenSearch credentials use this cluster’s OIDC issuer.
Network rangesSet pod_cidr, service_cidr, and dns_service_ip; ranges must not overlap the VNet, and pod_cidr must match the cluster network profile.
Platform namespacesDo not pre-create PPC platform namespaces.

Application node pool

RequirementExpected configuration
Application poolUser mode, Succeeded state, at least 3 nodes, adequate VM size, name matching node_pool_name, and no CriticalAddonsOnly taint.
Node architectureMatches the system node pool and architecture in 05_helm_releases/terraform.tfvars. Refer to Step 7.5.

Storage class

RequirementExpected configuration
PPC storage classesThe classes set in storage_class_name and backup_storage_class_name exist on the cluster.

For an externally provisioned cluster, both StorageClasses required by PPC must exist before installation. Stage 05 provisions volumes using the classes named in the installer’s storage_class_name and backup_storage_class_name. Otherwise, readiness check fails and deployment cannot proceed.

OptionGeneral class (storage_class_name)Backup class (backup_storage_class_name)Guidance
Create dedicated classespty-scpty-bkpPrefer reclaimPolicy: Retain for the backup class. Built-in Azure classes use Delete, which is unsafe for backup volumes.
Reuse existing classesAn existing class on the clusterAn existing class on the clusterBoth class names must match StorageClasses present on the cluster.

Install inputs (tfvars)

InputRequirement
subnet_idSet to a valid subnet resource ID.
ingress_fqdnSet to a real, valid FQDN.
global_image_regSet to a reachable container registry endpoint: <Container_Registry_Path>.
Note: If deploying from the Protegrity Container Registry, use registry.protegrity.com:9443. Specify the local registry endpoint if a local registry is used.
Private registry credentialsIf the registry is private, set harbor_secret and provide TF_VAR_username / TF_VAR_password.

Deploying PPC

After all prerequisites are met, deploy PPC by following these steps.

1. Preparing a jump box

Create a jump box or use an existing one that has network access to the AKS cluster. The jump box must be able to access the private AKS API server endpoint.

2. Downloading and extracting the release archive

To download and extract the PCT, refer to Preparing for PPC deployment.

3. Installing required tools

To install the required tools from the extracted PPC release archive, run the following command:

./bootstrap-scripts/setup-devtools-azure.sh

The script installs the following tools:

ToolDescription
OpenTofuOpen-source Terraform fork used to provision and manage infrastructure.
Azure CLICommand-line tool for managing Azure resources.
kubectlKubernetes command-line tool for interacting with the cluster.
HelmKubernetes package manager for deploying Helm charts.
skopeoTool for inspecting and copying container images between registries.
jqLightweight command-line JSON processor.
bcArbitrary-precision calculator used in shell scripts.
ssh-clientSSH client for secure remote access.
orasOCI Registry As Storage client for pushing and pulling artifacts.
cmctlCommand-line tool for managing cert-manager resources.

4. Logging in to Azure CLI

To authenticate with the Azure CLI, use the device code flow.

az login --use-device-code

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

If more than one subscription is available, select the target subscription.

az account set --subscription <SUBSCRIPTION-ID>

5. Configuring AKS access

To retrieve the AKS credentials and configure kubectl to communicate with the cluster, run the following command:

az aks get-credentials --resource-group "<resource-group>" --name "<cluster-name>" --overwrite-existing

6. Verifying cluster connectivity

To confirm that the jump box can reach the cluster API, run the following commands:

kubectl get pods -A
kubectl get nodes

All nodes should be listed and in Ready state before proceeding.

7. Gathering values for terraform.tfvars

Complete each of the following sub-steps to populate terraform.tfvars with the required cluster-specific values.

7.1 Storage class

List the existing storage classes on the cluster and update both the storage_class_name and backup_storage_class_name values in terraform.tfvars.

kubectl get sc -A

Review the output and select only storage classes that already exist in the cluster.

  • storage_class_name: Choose the storage class that will be used by PPC application workloads. This must match an existing storage class on the cluster.

  • backup_storage_class_name: Choose the storage class used for backup-related volumes, such as Velero backup data. This must also match an existing storage class on the cluster.

For example, if the output shows the following:

NAME                     PROVISIONER          RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
managed-csi-premium      disk.csi.azure.com   Delete          WaitForFirstConsumer   true                   ...
managed-csi-premium-v2   disk.csi.azure.com   Delete          WaitForFirstConsumer   true                   ...

then set the values as follows:

storage_class_name        = "managed-csi-premium-v2"
backup_storage_class_name = "managed-csi-premium"

Note: Use only storage classes that are visible in the cluster output. If the selected storage class is not present, PPC deployment may fail. The workload or backup storage class is unavailable.

7.2 Pod CIDR

Retrieve the pod CIDR for the cluster and update the pod_cidr value in terraform.tfvars.

az aks show --resource-group <RESOURCE-GROUP> --name <CLUSTER-NAME> --query "networkProfile.podCidr" -o tsv

This cluster uses the required Azure CNI Overlay and Cilium networking (refer to the AKS cluster prerequisites). The command returns a populated pod CIDR, for example, 10.244.0.0/16. Set pod_cidr in terraform.tfvars to that exact value.

Note: pod_cidr must match the cluster’s network profile and must not overlap the VNet, service CIDR, or node subnet ranges.

Important: If this command returns an empty value, the cluster is not using Azure CNI Overlay. Overlay is a required, immutable prerequisite for PPC (NAP depends on it). An empty podCidr indicates the cluster was built with the wrong network configuration. Do not substitute the node subnet CIDR. Recreate the cluster with Azure CNI Overlay and Cilium as described in the AKS cluster prerequisites.

7.3 Registry credentials

When using an authenticated private registry, set harbor_secret to harbor-secret in terraform.tfvars. Export the container registry credentials before running tofu apply. Otherwise, the apply fails while pulling PPC images and charts. Leave harbor_secret empty for an unauthenticated registry.

export TF_VAR_username="<REGISTRY-USERNAME>"
export TF_VAR_password="<REGISTRY-PASSWORD>"

Note: Registry credentials are passed as environment variables (TF_VAR_username and TF_VAR_password) and are not set directly in terraform.tfvars.

7.4 Federated credentials

Set the cluster context variables and retrieve the OIDC issuer URL. Then create the Velero and OpenSearch federated credentials against this cluster’s issuer.

export CLUSTER_NAME=<CLUSTER-NAME>
export RESOURCE_GROUP=<RESOURCE-GROUP>
ISSUER="$(az aks show -g "$RESOURCE_GROUP" -n "$CLUSTER_NAME" --query "oidcIssuerProfile.issuerUrl" -o tsv)"

az identity federated-credential create \
  --name "velero-workload-identity-$CLUSTER_NAME" \
  --identity-name "<VELERO-MANAGED-IDENTITY-NAME>" \
  --resource-group "$RESOURCE_GROUP" \
  --issuer "$ISSUER" \
  --subject "system:serviceaccount:pty-backup-recovery:backup-recovery-utility" \
  --audiences "api://AzureADTokenExchange"

az identity federated-credential create \
  --name "opensearch-workload-identity-$CLUSTER_NAME" \
  --identity-name "<OPENSEARCH-MANAGED-IDENTITY-NAME>" \
  --resource-group "$RESOURCE_GROUP" \
  --issuer "$ISSUER" \
  --subject "system:serviceaccount:pty-insight:opensearch-cluster-master" \
  --audiences "api://AzureADTokenExchange"

Note: Bash variable names cannot contain hyphens. Use $RESOURCE_GROUP, not $RESOURCE-GROUP. The subject strings must be exact.

7.5 Node architecture

  1. Check the architecture of the cluster nodes:
kubectl get nodes -L kubernetes.io/arch
  1. Set architecture in 05_helm_releases/terraform.tfvars to match the kubernetes.io/arch values:
architecture = "arm64" # For *ps_v5 (Arm) VM sizes; use "amd64" (default) for *as_v5 / x86 sizes.

All node pools must use the same architecture. For example, Standard_D2ps_v5 system nodes and Standard_D8ps_v5 application nodes require architecture = "arm64". Readiness check 13 uses this value to select the minimum VM sizes. Leaving the default amd64 value on an arm64 cluster causes the VM size check to fail.

8. Updating terraform.tfvars

To update the terraform.tfvars file, perform the following steps:

  1. Navigate to the Helm releases module directory.
cd iac/azure/cluster/modules/05_helm_releases
  1. After completing Steps 7.1 through 7.5, set the following variables in 05_helm_releases/terraform.tfvars.
VariableDescriptionConfigured in
aks_cluster_nameAKS cluster.Step 5
architectureNode architecture of the AKS node pools: amd64 (default) or arm64.Step 7.5
azure_subscription_idAzure subscription ID.Step 4
backup_storage_class_nameStorage class used for backup volumes.Step 7.1
node_pool_nameAKS user node pool name.Application node pool
opensearch_uami_client_idClient or Object ID of the OpenSearch user-assigned managed identity.Identities and RBAC
pod_cidrPod network CIDR range.Step 7.2
resource_group_nameAzure resource group containing the cluster.Step 5
storage_account_nameAzure storage account used by Velero for backups.Backup storage
storage_class_nameExisting storage class on the cluster.Step 7.1
storage_container_nameAzure Blob Storage container used by Velero for backups. Defaults to velero.Backup storage
velero_uami_client_idClient or Object ID of the Velero user-assigned managed identity.Identities and RBAC
subnet_idThe full subnet resource ID.Install inputs
ingress_fqdnThe application hostname (a real, resolvable FQDN).Install inputs
global_image_regContainer registry host: <Container_Registry_Path>.
Note: Registry credentials are passed as environment variables (TF_VAR_username and TF_VAR_password) as configured in Step 7.3. They are not set directly in terraform.tfvars.
Install inputs
harbor_secretOnly if the registry needs to be authenticatedInstall inputs
  1. Add the following variables to terraform.tfvars before allowing Stage 05 to apply.
run_readiness_check = true
check_prev_stage    = false

These variables ensure that PPC performs a readiness check on the existing AKS environment. They skip the previous automated stage validation, since those resources were created outside the installer.

  1. Save the file and exit the editor.

9. Running the readiness check

Run the readiness check script and review any reported errors. Resolve all errors before proceeding to the next step.

To run the readiness check, run the following command:

./bootstrap-scripts/readiness-helm-azure.sh

10. Applying the OpenTofu configuration

To initialize and apply the OpenTofu configuration to deploy all PPC Helm charts onto the cluster, perform the following steps:

  1. Navigate to the Helm releases module directory.
cd iac/azure/cluster/modules/05_helm_releases

Important: Before running tofu plan or tofu apply, review all values in terraform.tfvars and confirm that they match the target environment.

  1. To initialize, plan, and apply the OpenTofu configuration to deploy all PPC Helm charts onto the cluster, run the following commands:
    tofu init
    tofu plan          # Review the planned resources that will be created.
    tofu apply         # When prompted with "Enter a value:", type "yes".
  1. To verify the resources created in this stage, run the following commands:
# Confirm nodes are Ready
kubectl get nodes

# Confirm pods are Running
kubectl get pods -A

Readiness checklist

Each readiness check maps to one or more prerequisite sections. Use this table to confirm that all applicable requirements are met. Do this before running the check.

#Readiness checkPrerequisites
1azure_subscription_id valid + matches active CLIStep 4: Logging in to Azure CLI; Install inputs
2AKS cluster exists and is reachableAKS cluster
3OIDC issuer + Workload Identity enabledAKS cluster
4Node pools span ≥ 2 availability zonesAKS cluster; Application node pool
5Application user node pool exists and is readyApplication node pool
6Required storage classes exist (general + backup)Storage class
7Federated credentials for Velero + OpenSearchAKS cluster
8System pool tainted CriticalAddonsOnly; user pool notAKS cluster; Application node pool
9Container exists + Storage Blob Data Contributor on UAMIsBackup storage; Identities and RBAC
10pod_cidr valid + matches clusterAKS cluster; Install inputs
11global_image_reg set, well-formed, reachableInstall inputs
12Node Auto Provisioning (NAP) enabledAKS cluster
13Node pool count + VM size minimumsAKS cluster; Application node pool; Step 7.5: Node architecture
14subnet_id valid + Network Contributor on itIdentities and RBAC; Install inputs
15ingress_fqdn set and a valid FQDNInstall inputs
16Key Vault Secrets Store CSI driver addon enabledAKS cluster
17AKS cluster is privateAKS cluster
18velero_uami_client_id / opensearch_uami_client_id valid UUIDsIdentities and RBAC; Install inputs
19harbor_secret → registry creds set + reachableInstall inputs
20Platform namespaces don’t already existAKS cluster

Common problems

ProblemCause or action
Backups fail with a 403 / AuthorizationPermissionMismatchThe Velero or OpenSearch identity is missing Storage Blob Data Contributor on the storage account.
Cannot enable customer-managed keyThe storage account identity lacks Key Vault Crypto Service Encryption User, or the role assignment has not propagated. Wait for propagation and retry.
Private cluster fails to createThe AKS identity lacks Network Contributor on the subnet or Private DNS Zone Contributor on the cross-subscription DNS zone.
kubectl says ForbiddenThe cluster uses Entra ID authentication, but the identity running kubectl has not been granted cluster-admin access. Use Local accounts with Kubernetes RBAC.
Two default storage classesThe built-in default StorageClass is still marked as default.
Install fails because a namespace already existsPPC namespaces must not be pre-created: api-gateway, pty-loginui, pty-admin, cert-manager, karpenter, pty-insight, pty-backup-recovery, cli, reloader, and email-service.

If the readiness check fails

The readiness check is read-only and validates the applicable requirements in the prerequisite checklist. Use the table below to find a fix for each failure. Settings marked immutable cannot be changed after cluster creation; recreate the cluster with the correct settings described in AKS cluster.

Readiness failureFixImmutable?
AKS cluster is PUBLICRecreate with --enable-private-cluster. Refer to AKS cluster.Yes. Recreate.
System pool missing CriticalAddonsOnly taintRecreate the system pool with the taint. Refer to AKS cluster.Yes. Recreate.
OIDC / Workload Identity disabledRecreate with --enable-oidc-issuer --enable-workload-identityYes. Recreate.
Wrong network (not CNI Overlay + Cilium)Recreate with the networking flags. Refer to AKS cluster.Yes. Recreate.
NAP not enabled (mode=Manual)az aks update -g $RG -n $CLUSTER --node-provisioning-mode Auto (requires Overlay+Cilium)No
Secret Store CSI driver not enabledaz aks enable-addons -g $RG -n $CLUSTER --addons azure-keyvault-secrets-providerNo
Node pool userpool not foundSet node_pool_name in tfvars to the actual pool name, or add the pool. Refer to Application node pool.No
Storage class pty-sc/pty-bkp not foundCreate them, or set storage_class_name/backup_storage_class_name to an existing class. Refer to Storage class.No
Federated credential missingCreate credentials for Velero and OpenSearch against the cluster OIDC issuer. Refer to AKS cluster.No
Storage Blob Data Contributor not assignedAssign the role to both UAMIs at the storage-account scope. Refer to Identities and RBAC.No
subnet_id / pod_cidr not setSet them in tfvarsNo
Node pool VM size below the minimum for architecture amd64 (cluster uses arm64 *ps_v5 sizes)Set architecture = "arm64" in 05_helm_releases/terraform.tfvars to match the node pools. Refer to Step 7.5.No
System/app pool too few nodes or VM too smallScale or recreate the pool. System ≥ 2 nodes, and app ≥ 3 nodes.No

Note: A public cluster with disabled OIDC or Workload Identity, incorrect networking, and a missing system-pool taint require cluster recreation. Configure these correctly in AKS cluster before creating the cluster. A correctly configured az aks create command addresses all of these immutable requirements.

Last modified : November 03, 2026