This project demonstrates how to deploy a confidential Kubernetes cluster using Edgeless Systems Constellation on StackIT Cloud. The cluster provides hardware-based security features including memory encryption, secure attestation, and protection against various attack vectors.
- Linux operating system (ARM64/AMD64)
- Admin rights on the machine
- Terraform installation (version
v1.4.4or above) kubectlinstalled
- Active StackIT Cloud account
- Service Account with
editorrole - User Access Token (UAT) for OpenStack API
- StackIT Project ID and Project Name
# Download the CLI
curl -LO https://github.com/edgelesssys/constellation/releases/latest/download/constellation-linux-amd64
# Optional: Verify the signature
# (See Constellation documentation for signature verification steps)
# Install the CLI to your PATH
sudo install constellation-linux-amd64 /usr/local/bin/constellation# Download the CLI
curl -LO https://github.com/edgelesssys/constellation/releases/latest/download/constellation-linux-arm64
# Optional: Verify the signature
# (See Constellation documentation for signature verification steps)
# Install the CLI to your PATH
sudo install constellation-linux-arm64 /usr/local/bin/constellation# Download the CLI
Invoke-WebRequest -OutFile ./constellation.exe -Uri 'https://github.com/edgelesssys/constellation/releases/latest/download/constellation-windows-amd64.exe'
# Optional: Verify the signature
# (See Constellation documentation for signature verification steps)
# Install the CLI under C:\Program Files\Constellation\bin\constellation.exe
# Add the CLI to your PATH:
# 1. Open Advanced system settings
# 2. Go to the Advanced tab
# 3. Click Environment Variables…
# 4. Click variable called Path and click Edit…
# 5. Click New
# 6. Enter: C:\Program Files\Constellation\bin- Log in to the StackIT Portal
- Navigate to IAM → Service Accounts
- Create a new Service Account
- Assign the
editorrole to the service account - Create an Access Token for the service account
- Download the service account key file
-
Download Service Account Key from StackIT Portal:
- Navigate to the StackIT Portal → IAM → Service Accounts
- Select your service account
- Go to Service Account Keys section
- Create a new key (let StackIT generate the key pair)
- Download the JSON file provided by StackIT
-
Save the Service Account Key: The downloaded
credentials.jsonfile will have this structure:{ "id": "uuid", "publicKey": "public key", "credentials": { "kid": "string", "iss": "my-sa@sa.stackit.cloud", "sub": "uuid", "aud": "string", "privateKey": "private key (if StackIT-generated)" } }
-
Update
terraform.tfvars.examplewith your specific values and rename it toterraform.tfvarsNote: The
service_account_key_pathshould point to the downloaded credentials.json file from the StackIT Portal, whileprivate_key_pathshould point to the private key file (if you generated your own key pair). -
Update
clouds.yamlwith your OpenStack credentials:clouds: stackit: auth: auth_url: https://keystone.api.iaas.eu01.stackit.cloud/v3 username: your-uat-token-name password: your-uat-password project_id: your-project-id project_name: your-project-name user_domain_name: portal_mvp project_domain_name: portal_mvp region_name: RegionOne identity_api_version: 3
cd terraform/
terraform initterraform planterraform applyNote: The deployment process may take 10-15 minutes. You can monitor the progress with:
terraform applyterraform output -raw kubeconfig > constellation-admin.conf
export KUBECONFIG=$(realpath constellation-admin.conf)constellation verifyExpected output:
✓ Constellation cluster verified
✓ Attestation successful
✓ TPM measurements valid
✓ Node measurements match
✓ Cluster state consistent
kubectl get nodes -o wideExpected output:
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
constellation-node-1 Ready control-plane 1h v1.31.8 192.168.178.2 <none> Constellation OS 5.15.0 containerd://1.7.0
constellation-node-2 Ready <none> 1h v1.31.8 192.168.178.3 <none> Constellation OS 5.15.0 containerd://1.7.0
cd terraform/
terraform destroyWarning: This will permanently delete the cluster and all data.
# Verify the downloaded credentials.json file
cat /path/to/your/downloaded/credentials.json
# Test StackIT authentication
stackit auth login# Check Terraform logs
TF_LOG=DEBUG terraform apply
# Verify provider versions
terraform providers# Verify kubeconfig
kubectl cluster-info
# Check node status
kubectl get nodes# Verify cluster state
constellation status
# Check node measurements
kubectl get nodes -o jsonpath='{.items[*].status.nodeInfo.systemUUID}'- StackIT Documentation: Installation and Setup
- Constellation Documentation: Constellation Docs
- Terraform Provider: Use the Terraform Provider
- This demo uses example secrets and configurations for demonstration purposes
- In production environments, always follow security best practices
- Ensure proper access controls and network policies are in place
- Regularly rotate secrets and keys
- Monitor cluster attestation status