Deploy App-Embedded Defender on AWS Fargate for Amazon EKS
Follow these steps to deploy and validate the App-Embedded Defender on AWS Fargate for Amazon Elastic Kubernetes Service (EKS).
Prerequisites
To get started, you’ll need the following:
An existing Amazon EKS cluster with a configured Fargate profile. For detailed setup instructions, see the AWS documentation.
The AWS account hosting the EKS cluster must be already set up and accessible in your Prisma Cloud console. See the Prisma Cloud documentation for account setup procedures.
Configure AWS IAM Roles for Service Accounts (IRSA)
Ensure that IAM Roles for Service Accounts (IRSA) is configured within AWS EKS Fargate and mapped to the service account used by the Kubernetes pods you want to protect.
Enable the IAM OIDC Provider: Establish an IAM OIDC identity provider for your EKS cluster. This is a one-time action per cluster that allows IAM to trust authentication tokens from your EKS cluster, which is essential for IRSA.
Create an IAM Role and Policy: Define an IAM policy that specifies the necessary permissions for your pod and an IAM role that the pod can assume.
Create the IAM Policy: This policy dictates the actions the role can perform on specific resources, such as an S3 bucket.
Create the IAM Role: Link this IAM role to the required Kubernetes service account via a trust policy.
Deploy the Defender
Prisma Cloud Console Access: Log in to your Prisma Cloud Console and confirm that the AWS account where the EKS cluster resides is ready and accessible.
Select EKS Fargate Defender Type: In the Prisma Cloud Console, go to the defender deployment section to get the necessary instrumentation logic.
Go to Manage > Defenders > Defenders: Deployed.
Select Manual deploy.
On the Basic Settings tab:
Select Single Defender as the deployment method.
Select Container Defender App-Embedded as the defender type.
Select EKS Fargate as the deployment type.
Generate the protected deployment YAML: Submit a valid EKS Fargate deployment YAML to the Prisma Cloud Console. The console modifies this YAML to include the Defender’s init container and other essential settings.
Enter a valid EKS Fargate deployment YAML in Insert deployment definition.
For more information about Kubernetes deployment YAML, see https://kubernetes.io/docs/concepts/workloads/controllers/deployment/.
Click Generate protected deployment definition.
The output is displayed in Generated deployment definition. Copy the YAML generated by Prisma Cloud Console for deployment in your EKS cluster.
Apply the generated YAML to the cluster: After the console processes your original YAML file, it will return a modified version that includes the Defender instrumentation.
Save the YAML generated by the Prisma Cloud Console to a file (for example,
defended-deployment.yaml).Apply this YAML file to your EKS cluster by running the following command:
kubectl apply -f defended-deployment.yaml.This action schedules the pod to run on a Fargate node.
Validate Defender Visibility
The app-embedded defender is an init container that executes and terminates upon completion. You can verify the successful deployment of the defender and its visibility in both your EKS cluster and the Prisma Cloud Console using the following steps.
In the Cluster:
To verify that the pod is running, run:
kubectl get pods.To describe the pod and confirm the presence of the
twistlock-defenderinit container and the injected environment variables, run:kubectl describe pod <your-pod-name>.
In the Prisma Cloud Console:
Go to Radar > Defenders > Deployed defenders.
Filter the view to locate your new Defender. It will be uniquely identified by a combination of its OIDC Issuer URL, Pod UID, and container name.
Run Cloud Discovery
Run a cloud discovery scan to ensure the Prisma Cloud Console accurately correlates the running Defender with the discovered EKS container entity.
In the Prisma Cloud Console, manually initiate a cloud discovery scan for the relevant AWS account.
When the scan is complete, go to the Radar view.
Locate the aws-eks-container asset for your deployment and confirm its status is Defended.
Last updated
Was this helpful?

