Back to articles
DevOps & Systems

Confidential Compute on AWS EKS with AMD SEV-SNP, Kata, and Trustee

A detailed guide to configuring confidential compute on AWS EKS using AMD SEV-SNP, Kata Containers, and Trustee to protect sensitive data in container environments.

DPTCloud Engineering5 min read
Confidential Compute on AWS EKS with AMD SEV-SNP, Kata, and Trustee

Image credit: geralt · Pixabay Content License

Confidential Compute is an advanced security technology that enables applications to run in containerized environments with high data protection, even if the physical host is compromised. On AWS EKS, integrating AMD SEV-SNP (Secure Encrypted Virtualization – Secure Nested Paging) with Kata Containers and Trustee creates a secure container environment where data is encrypted in memory and can only be decrypted by authorized CPUs.

Prerequisites and Environment Setup

To deploy confidential compute on AWS EKS, you need:

  • An operational EKS cluster configured and running.
  • EC2 instances with AMD EPYC CPUs (SEV-SNP supported).
  • EKS version 1.24 or later.
  • IAM permissions for EKS and EC2 access.
  • Kata Containers installed on worker nodes.
  • Trustee installed for certificate management and authentication.

Configuring AMD SEV-SNP on EC2

AMD SEV-SNP allows encryption of VM memory and protects it from external access, including hypervisors. To enable SEV-SNP:

# Check if CPU supports SEV-SNP lscpu | grep -i sev # Output: If "sev" and "sev-snp" are present, support is available

On AWS, select instance types supporting AMD EPYC and SEV-SNP such as m6a or hpc6a.

Setting Up Kata Containers and Trustee

Kata Containers is a secure container runtime that runs containers in isolated VMs. To install:

# Install Kata Containers curl -sSfL https://raw.githubusercontent.com/kata-containers/kata-containers/main/install/install.sh | bash -s -- -i

Then configure EKS to use Kata as the runtime:

# Label worker nodes to use Kata runtime kubectl label node katacontainers.io/runtime=kata

Trustee manages certificates and authenticates containers. Install and configure Trustee with EKS:

# Install Trustee git clone https://github.com/trustee-project/trustee.git cd trustee && make build

Testing and Validation

After configuration, verify that the environment is functioning correctly:

  1. Launch a pod using the Kata runtime:
  2. kubectl run test-confidential --image=alpine --restart=Never --command -- sh -c "echo 'Testing confidential compute' && sleep 30"
  3. Check the pod status:
  4. kubectl describe pod test-confidential
  5. Ensure the container runs in a SEV-SNP environment:
  6. # Check VM info on the worker node sudo dmesg | grep -i sev

Troubleshooting

  • SEV-SNP not supported: Verify the instance type and CPU. Ensure you're using AMD EPYC.
  • Kata not recognized: Confirm the runtime label is correctly applied to the node.
  • Trustee not running: Check the Trustee service logs and ensure it is active.

References

Testing and Validation

After configuration, perform the following safety checks to verify that the Confidential Compute environment is operating as expected. These steps do not impact the system and only inspect current state.

# Check CPU support for SEV-SNP
lscpu | grep -i sev

# Check system logs to confirm SEV-SNP activation
sudo dmesg | grep -i sev

# Verify Kata Containers is installed and running on nodes
kubectl get nodes -o jsonpath='{.items[*].status.nodeInfo.runtimeVersion}' | grep kata

# Create a pod using Kata runtime to run in a secure environment
kubectl run test-confidential --image=alpine --restart=Never --command -- sh -c "echo 'Testing confidential compute' && sleep 30"

# Check pod status and confirm container runs with Kata
kubectl describe pod test-confidential

# Verify VM information on worker node to confirm data encryption
sudo dmesg | grep -i sev-snp

To validate Trustee, check whether the Trustee service is running on worker nodes:

# Check Trustee service status
ps aux | grep trustee

# View logs if needed
sudo journalctl -u trustee --no-pager -n 20

Assuming Trustee was installed by cloning from GitHub and building, ensure that:

  • Trustee runs as a systemd service or within a container.
  • Trustee can connect to the EKS API and authenticate containers.
  • No authentication or certificate-related errors appear in logs.

Limitations: This validation requires SSH access to worker nodes and system log permissions. No GPU or GUI is required. No configuration changes are made during testing.

Related infrastructure & engineering guides: NVMe Cloud VPS for Docker, Nginx & Databases

DPTCloud Tier III Infrastructure

Recommended NVMe Cloud VPS Plans to Deploy This Setup

Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.

View 22 VPS Plans
ECO · vn-02

VPS-2E

94.600 ₫ / mo

10% VAT included

  • CPU: 2 vCPU
  • RAM: 2 GB
  • SSD: 30 GB NVMe
ECO · vn-02Recommended

VPS-3E

170.500 ₫ / mo

10% VAT included

  • CPU: 2 vCPU
  • RAM: 4 GB
  • SSD: 50 GB NVMe
BASIC · vn-01Recommended

VPS-05

457.600 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478