In-cluster deployment

Complete the steps provided in this section to deploy PPC onto an existing AWS EKS cluster.

This section is intended for users who already have an EKS cluster provisioned and managed outside of the PPC installer. In a standard PPC installation, the installer provisions the EKS cluster and the required AWS resources. In an in-cluster deployment, however, the user creates the cluster. It already exists before the PPC installation begins. Cluster information must be provided to deploy PPC onto the existing EKS cluster. Unlike the automated script-based installation or the manual component-based installation, the installer does not create these AWS resources. They must already exist before you begin.

Complete the infrastructure prerequisites outside the PPC installer first. Then use the PPC installer to deploy the PPC application Helm charts to the existing EKS cluster.

Deploying PPC using In-Cluster Deployment for EKS

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

StepActionDescription
#Before you beginEnsures all prerequisites, access, permissions, and values are ready before starting.
#Cluster requirements for PPC deploymentVerifies that the existing cluster meets all requirements before deploying PPC.
1Preparing a jump boxCreates or identifies a jump box with network access to the EKS cluster.
2Downloading and extracting the release archiveDownloads and extracts the PPC release archive on the jump box.
3Installing required toolsInstalls all required CLI tools on the jump box using the setup script.
4Configuring AWS credentialsAuthenticates with AWS and configures the CLI for the target account.
5Configuring EKS accessRetrieves EKS credentials so that kubectl and helm can reach the cluster.
6Verifying cluster connectivityConfirms that the jump box can communicate with the cluster API.
7Gathering values for terraform.tfvarsCollects the cluster-specific values needed for the deployment configuration.
8Updating terraform.tfvarsPopulates the 05_helm_releases module configuration with cluster-specific values.
9Running the readiness checkValidates the environment and resolves any reported errors before deployment.
10Applying the OpenTofu configurationDeploys all PPC Helm charts onto the cluster using tofu apply.
11Common misconfigurationsLists the most frequent configuration errors and how to correct them.

Before you begin

Ensure the following prerequisites are met before starting the installation.

Access and permissions

The following access and permissions are required for deploying PPC.

RequirementDetails
AWS accountAccess with permission to create EKS clusters, IAM roles and policies, EC2/VPC resources, S3 buckets, KMS keys, and federated credentials.
Availability ZonesAccess to an existing VPC with at least two subnets across two Availability Zones.
AWS CLIAccess to AWS CLI v2 configured for the account and with network access to the cluster.
kubectlAccess to kubectl configured for the account and with network access to the cluster.
Container registryAccess to the container registry to pull PPC container images during deployment.
Jump boxAccess to a VM or workstation with network access to the EKS cluster.

Values needed for terraform.tfvars

The values required to populate terraform.tfvars in are collected from two sources:

Values decided by user

These are existing or user-determined values that are available before prerequisite creation begins:

ValueDescriptionFieldVariable or Example
AWS account IDUnique identifier of the AWS account.-<ACCOUNT_ID>
AWS regionAWS region where the cluster is deployed.aws_regionus-east-1
Cluster nameName of the existing EKS cluster.eks_cluster_name<CLUSTER_NAME>
Cluster owner emailEmail address of the cluster owner.owner_emailuser@example.com
Container image registryContainer image registry endpoint.global_image_reg<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.
Container registry credentialsCredentials for authenticating with the container image registry.TF_VAR_username, TF_VAR_passwordProvided by the team.
Ingress FQDNFully qualified domain name for the ingress.ingress_fqdnmyapp.example.com
Node architectureNode architecture of the existing cluster.architectureamd64 or arm64
Node OSNode OS image string.node_osBOTTLEROCKET_x86_64_FIPS or BOTTLEROCKET_ARM_64_FIPS
Storage class nameName of the existing storage class on the cluster.storage_class_namepty-sc
Subnet IDsIDs of the two subnets (one per Availability Zone).private_subnet_ids<SUBNET_ID_1>, <SUBNET_ID_2>
VPC CIDRCIDR block of the VPC.vpc_cidr_block10.0.0.0/16
VPC IDID of the VPC in which the cluster is deployed.-vpc-0abc123

Values captured from created resources

These values are generated when creating the resources listed in the Cluster requirements for PPC deployment section. Record each value as you create the corresponding resource:

ValueSourceFieldExample
Backup S3 bucket nameCreated in Storage and backup section. Record the bucket name when created.backup_bucketeks-<CLUSTER_NAME>-backup
Backup bucket KMS ARNCreated in Storage and backup section. Record the KMS key ARN after creation.backup_bucket_kms_arnarn:aws:kms:<REGION>:<ACCOUNT_ID>:key/<KEY_ID>

Cluster requirements for PPC deployment

Your EKS cluster is already in place. Before running tofu apply in 05_helm_releases, use this checklist. It confirms that the cluster meets all the requirements PPC deployment expects.

Note: If you are unsure whether a requirement is met, work through each item. Verify each item against your cluster configuration before running tofu apply.

IAM - roles and policies

No.What must existExact name required?
1Cluster IAM role with AmazonEKSClusterPolicy, AmazonEKSNetworkingPolicy, AmazonEKSComputePolicy, AmazonEKSBlockStoragePolicy, AmazonEKSLoadBalancingPolicy, AmazonEKSVPCResourceController, AmazonEKSServicePolicy, and AmazonEBSCSIDriverPolicy (service-role) attached.No. This is a name selected at cluster creation.
2Node IAM role named eks-<CLUSTER_NAME>-node-role with AmazonEKSWorkerNodePolicy, AmazonEKS_CNI_Policy, AmazonEC2ContainerRegistryReadOnly, AmazonSSMManagedInstanceCore, and AmazonEBSCSIDriverPolicy (service-role) attached. Trust principal must be exactly ec2.amazonaws.com with no prefix or trailing space.Yes. Stage 05 hardcodes this name.
3Named instance profile eks-<CLUSTER_NAME>-node-profile with the node role attached.Yes. Karpenter’s EC2NodeClass references this by name.
4Karpenter controller role eks-<CLUSTER_NAME>-karpenter-role with two policies attached. The first is eks-<CLUSTER_NAME>-karpenter-controller-policy, which covers EC2 and SQS actions, including eks:DescribeCluster and all SQS interruption actions. The second is eks-<CLUSTER_NAME>-karpenter-passrole-policy, which covers iam:PassRole scoped to the node role and iam:ListInstanceProfiles with Resource: "*". Trust principal must be pods.eks.amazonaws.com.Yes.
5Backup-recovery-utility role eks-<CLUSTER_NAME>-backup-recovery-utility-role with eks-<CLUSTER_NAME>-backup-recovery-utility-policy (EBS snapshots, S3 read/write on <BACKUP_BUCKET>, KMS on <BACKUP_BUCKET_KMS_ARN>) attached. Trust principal must be pods.eks.amazonaws.com.Yes.
6OpenSearch S3 snapshot policy eks-<CLUSTER_NAME>-opensearch-s3-policy (S3 bucket + object access on <BACKUP_BUCKET>/insight-snapshots/*, KMS on <BACKUP_BUCKET_KMS_ARN>) attached to the node role (not the backup role).Yes. Must be on the node role.

EKS cluster and access

No.What must exist
7EKS cluster active, with the eks-pod-identity-agent add-on installed and ACTIVE.
8All seven required add-ons installed and ACTIVE: vpc-cni, kube-proxy, coredns, eks-pod-identity-agent, aws-ebs-csi-driver, snapshot-controller, metrics-server.
9EC2_LINUX access entry for arn:aws:iam::<ACCOUNT_ID>:role/eks-<CLUSTER_NAME>-node-role auto-created by a managed node group. Verify with aws eks list-access-entries.
10Pod Identity associations created. The karpenter namespace and karpenter service account map to the Karpenter role. The pty-backup-recovery namespace and backup-recovery-utility service account map to the backup-recovery-utility role.

Compute: system node group

No.What must exist
11Managed system node group using secure Bottlerocket AMI and On-Demand capacity. Use t3.medium (amd64) or equivalent, with disk >= 30 GiB. Desired, min, and max must be 2. All nodes must be in Ready state.
12Node group Kubernetes labels: role=system, nodepool-owner=ppc
13Node group Kubernetes taint: CriticalAddonsOnly=true:NoSchedule

Networking

No.What must exist
14Both subnet tags present on each of the two subnets kubernetes.io/cluster/<CLUSTER_NAME>=shared and karpenter.sh/discovery/<CLUSTER_NAME>=true.
15Worker security group <CLUSTER_NAME>-worker-sg tagged karpenter.sh/discovery=<CLUSTER_NAME>. It needs self-referencing all-traffic ingress and open egress. It also needs tcp 1025–65535 and tcp/udp 53 ingress from the cluster SG.
16Cluster security group has tcp 443 ingress from worker SG, and all-traffic ingress from worker SG.

Add-on scheduling (required after tainted system node group exists)

No.What must existDetails
17Apply add-on scheduling configuration for CoreDNS, Amazon EBS CSI Driver (controller), metrics-server, and snapshot-controller. Each add-on must tolerate the CriticalAddonsOnly taint and pin to role=system nodes. Run aws eks update-addon for each.7.3 Add-on scheduling configuration

Storage and backup

No.What must existDetails
18Backup S3 bucket with versioning enabled and default SSE-KMS encryption using a user-managed key.Enabling versioning, Using SSE-KMS
19KMS key policy on the backup key. It grants kms:Decrypt/Encrypt/ReEncrypt*/GenerateDataKey*/DescribeKey to the node role, the backup-recovery-utility role, and the deployer identity used to run tofu apply.Key policies in AWS KMS
20StorageClass whose name matches storage_class_name in terraform.tfvars (default: pty-sc) is present on the cluster. If using the default, create the pty-sc gp3/Retain/WaitForFirstConsumer class. Then unset the default flag on gp2.7.1 Storage class

System node group taint value

Ensure that the CriticalAddonsOnly=true:NoSchedule taint is applied when creating the system node group. Apply it together with the role=system label. This taint prevents application workloads from being scheduled on the system nodes. It is required for the Add-on scheduling configuration.

Deploying PPC

To deploy PPC onto the existing EKS cluster, perform the following steps:

1. Preparing a jump box

Create a jump box or use an existing one that has network access to the EKS cluster. The jump box must be able to access the Kubernetes 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 release bundle, run the following command:

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

The script installs the following tools:

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

4. Configuring AWS credentials

Configure your AWS credentials so that CLI commands authenticate as your deployer identity. Either run aws configure to set up a named profile, or export the credentials directly.

Note: AWS SSO web-based login is not supported. However, AWS IAM Identity Center temporary credentials can be exported as environment variables.

Export IAM user credentials, temporary STS credentials, or AWS IAM Identity Center temporary credentials. Include the session token, as shown below:

export AWS_ACCESS_KEY_ID="<ACCESS_KEY_ID>"
export AWS_SECRET_ACCESS_KEY="<SECRET_ACCESS_KEY>"
export AWS_SESSION_TOKEN="<SESSION_TOKEN>"
export AWS_DEFAULT_REGION="<REGION>"

Note: The AWS_SESSION_TOKEN variable is required only when using temporary credentials, such as the STS or AWS IAM Identity Center. Omit it when using long-term IAM user credentials.

To verify that the credentials are working, run the following command:

aws sts get-caller-identity

5. Configuring EKS access

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

aws eks update-kubeconfig --name <CLUSTER_NAME> --region <REGION>

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

Record the name of the storage class to use and update storage_class_name in terraform.tfvars.

kubectl get sc -A

Record the name of the storage class. Update only storage_class_name in terraform.tfvars with this value. Leave backup_storage_class_name set to its default value, pty-bkp, which is created by Stage 05.

Note: Create a custom storage class named pty-sc. Use the following properties: gp3 volume type, Retain reclaim policy, and WaitForFirstConsumer binding mode. Then set storage_class_name=pty-sc in terraform.tfvars. For a quick bring-up, the console’s default gp2 storage class may be used instead. Do not modify backup_storage_class_name, leave it as pty-bkp.

7.2 Registry credentials

When using an authenticated private registry, set harbor_secret to harbor-secret in terraform.tfvars. Also 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 TF_VAR_username and TF_VAR_password are passed as environment variables and are not set directly in terraform.tfvars.

7.3 Add-on scheduling configuration

After the tainted system node group is active, apply the scheduling configuration to the four Deployment-based add-ons. This lets their pods land on system nodes. Set CLUSTER_NAME and REGION, then run the following commands:

export CLUSTER_NAME=<CLUSTER-NAME>
export REGION=<REGION>

# CoreDNS
aws eks update-addon \
  --cluster-name "$CLUSTER_NAME" \
  --addon-name coredns \
  --region "$REGION" \
  --resolve-conflicts OVERWRITE \
  --configuration-values '{"tolerations":[{"key":"CriticalAddonsOnly","operator":"Exists","effect":"NoSchedule"}],"affinity":{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"role","operator":"In","values":["system"]}]}]}}}}'

# Amazon EBS CSI Driver (controller only)
aws eks update-addon \
  --cluster-name "$CLUSTER_NAME" \
  --addon-name aws-ebs-csi-driver \
  --region "$REGION" \
  --resolve-conflicts OVERWRITE \
  --configuration-values '{"controller":{"tolerations":[{"key":"CriticalAddonsOnly","operator":"Exists","effect":"NoSchedule"}],"affinity":{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"role","operator":"In","values":["system"]}]}]}}}}}'

# metrics-server
aws eks update-addon \
  --cluster-name "$CLUSTER_NAME" \
  --addon-name metrics-server \
  --region "$REGION" \
  --resolve-conflicts OVERWRITE \
  --configuration-values '{"tolerations":[{"key":"CriticalAddonsOnly","operator":"Exists","effect":"NoSchedule"}],"affinity":{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"role","operator":"In","values":["system"]}]}]}}}}'

# snapshot-controller
aws eks update-addon \
  --cluster-name "$CLUSTER_NAME" \
  --addon-name snapshot-controller \
  --region "$REGION" \
  --resolve-conflicts OVERWRITE \
  --configuration-values '{"tolerations":[{"key":"CriticalAddonsOnly","operator":"Exists","effect":"NoSchedule"}],"affinity":{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"role","operator":"In","values":["system"]}]}]}}}}'

To verify the add-on status after the updates complete, run the following commands:

for addon in coredns aws-ebs-csi-driver metrics-server snapshot-controller; do
  aws eks describe-addon \
    --cluster-name "$CLUSTER_NAME" \
    --addon-name "$addon" \
    --region "$REGION" \
    --query 'addon.[addonName,status]' \
    --output text
done

Expected: all four add-ons report ACTIVE. If an update is still in progress, wait for it to complete. Then run the verification again.

8. Updating terraform.tfvars

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

  1. Navigate to the Helm releases module directory.
cd iac/aws/cluster/modules/05_helm_releases
  1. After completing Steps 7.1 through 7.3, set the following variables in 05_helm_releases/terraform.tfvars.
VariableDescriptionConfigured in
architectureWorker node architecture: amd64 or arm64.Values decided by user
aws_regionAWS region where the EKS cluster is deployed.Values decided by user
backup_bucketS3 bucket used for PPC backups.Values captured from created resources
backup_bucket_kms_arnKMS key ARN used to encrypt the backup bucket.Values captured from created resources
eks_cluster_nameName of the existing EKS cluster.Values decided by user
global_image_regContainer image registry endpoint: <Container_Registry_Path>.Values decided by user
harbor_secretKubernetes secret used for an authenticated private registry. Set to harbor-secret, or leave empty for an unauthenticated registry.Step 7.2
ingress_fqdnFully qualified domain name for the PPC ingress.Values decided by user
node_osWorker node OS image string, such as BOTTLEROCKET_x86_64_FIPS.Values decided by user
owner_emailEmail address of the cluster owner.Values decided by user
private_subnet_idsIDs of the private subnets used by the cluster, one per Availability Zone.Values decided by user
storage_class_nameExisting storage class used for PPC workloads.Step 7.1
vpc_cidr_blockCIDR block of the VPC containing the EKS cluster.Values decided by user

Note: Registry credentials are passed as environment variables (TF_VAR_username and TF_VAR_password). They are configured in Step 7.2. They are not set directly in terraform.tfvars. Leave backup_storage_class_name at its default value, pty-bkp, unless the deployment requires a different value.

  1. Add the following variables to terraform.tfvars. Set each to the value shown 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 EKS environment. They skip the previous automated stage validation. That validation is not required because those resources were created outside the installer.

  1. Save the file and exit the editor.

9. Running the readiness check

The readiness check verifies that the cluster is ready for the Stage 05 (Helm Releases) tofu apply. The same check runs automatically as a guard at the start of the Stage 05 apply. It runs because run_readiness_check is enabled in the terraform.tfvars file. If required prerequisites are missing, the apply stops before deploying any components.

Run the check independently now to identify and resolve any issues before starting the apply.

To run the readiness check, run the following command:

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

The script validates that all required EKS add-ons are ACTIVE. It also checks that the worker security group and subnet tags are present. It checks that Pod Identity associations exist, and that the backup bucket and KMS key are accessible.

Note: The readiness check is read-only and does not modify the cluster. Run it as often as needed, including after correcting reported errors. Repeat it until it completes successfully before proceeding to apply the OpenTofu configuration.

10. Applying the OpenTofu configuration

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

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

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

  1. To initialize, plan, and apply the OpenTofu configuration, run the following commands. They deploy all PPC Helm charts onto the cluster.
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

11. Common misconfigurations in In-Cluster Deployment for EKS

When Stages 00–04 are created manually using the console or CLI, this repo’s OpenTofu does not create them. Every IAM role, policy, tag, and rule must match the exact names and permissions Stage 05 expects. These are the issues that break the install:

#IssueCorrect configuration
1KMS key policy lists another cluster’s roles. For example, eks-cluster2-test-*List this cluster’s eks-<CLUSTER_NAME>-backup-recovery-utility-role and eks-<CLUSTER_NAME>-node-role.
2Worker SG only opens tcp 1025-65535 from the cluster SG: port 53 excluded.Add tcp/udp 53 ingress on the worker SG from the cluster SG.
3EBS CSI policy attached to a differently named role. For example, AmazonEKSNodeRole-<CLUSTER_NAME>.Attach AmazonEBSCSIDriverPolicy to eks-<CLUSTER_NAME>-node-role; Stage 05 hardcodes that name.
4Node trust principal is http://ec2.amazonaws.com . Contains either prefix or trailing space.Set the trust principal to exactly ec2.amazonaws.com with no prefix or trailing space.
5Karpenter policy missing eks:DescribeCluster and SQS interruption actions.Create eks-<CLUSTER_NAME>-karpenter-controller-policy. Include these actions, all with Resource: "*": ec2:Describe*, ec2:CreateLaunchTemplate, ec2:DeleteLaunchTemplate, ec2:RunInstances, ec2:TerminateInstances, ec2:CreateFleet, ec2:CreateTags, ssm:GetParameter, pricing:GetProducts, eks:DescribeCluster. Add the SQS actions sqs:DeleteMessage, sqs:GetQueueAttributes, sqs:GetQueueUrl, and sqs:ReceiveMessage, all with Resource: "*". Create eks-<CLUSTER_NAME>-karpenter-passrole-policy. Scope iam:PassRole to arn:aws:iam::<ACCOUNT_ID>:role/eks-<CLUSTER_NAME>-node-role. Attach both policies to the Karpenter role.
6Subnets missing karpenter.sh/discovery/<CLUSTER_NAME>=true.Run aws ec2 create-tags --region <REGION> --resources <SUBNET_ID_1> <SUBNET_ID_2> --tags "Key=karpenter.sh/discovery/<CLUSTER_NAME>,Value=true" on both subnets. Without this tag, the EC2NodeClass reports SubnetsNotFound (Ready=False), no nodes launch, and pods stay Pending.
7Subnets missing kubernetes.io/cluster/<CLUSTER_NAME>=shared.Run aws ec2 create-tags --region <REGION> --resources <SUBNET_ID_1> <SUBNET_ID_2> --tags "Key=kubernetes.io/cluster/<CLUSTER_NAME>,Value=shared" on both subnets. Required for EKS/ELB and Envoy Gateway LoadBalancer subnet discovery.
8Named instance profile eks-<CLUSTER_NAME>-node-profile never created (NoSuchEntity).Run aws iam create-instance-profile --instance-profile-name eks-<CLUSTER_NAME>-node-profile. Then run aws iam add-role-to-instance-profile --instance-profile-name eks-<CLUSTER_NAME>-node-profile --role-name eks-<CLUSTER_NAME>-node-role. Without this, the policy-workbench EC2NodeClass is stuck Ready: Unknown and all pods stay Pending.
9iam:ListInstanceProfiles scoped to an instance-profile ARN.Create eks-<CLUSTER_NAME>-karpenter-passrole-policy with three statement blocks. (1) iam:PassRole on arn:aws:iam::<ACCOUNT_ID>:role/eks-<CLUSTER_NAME>-node-role to allow passing the node role to instances.
(2) iam:CreateInstanceProfile, iam:TagInstanceProfile, iam:AddRoleToInstanceProfile, iam:RemoveRoleFromInstanceProfile, iam:DeleteInstanceProfile, iam:GetInstanceProfile on arn:aws:iam::<ACCOUNT_ID>:instance-profile/*. This lets Karpenter create and manage instance profile wrappers.
(3) iam:ListInstanceProfiles on Resource: "*" as Karpenter requires list access across all profiles.
10Node role missing the OpenSearch S3 snapshot policy eks-<CLUSTER_NAME>-opensearch-s3-policy.Create and attach the policy to the node role manually. Otherwise, OpenSearch Insight snapshots fail at runtime with S3 AccessDenied, while tofu apply stays green.
Last modified : November 03, 2026