k8s
Attestation Test
Run TEE attestation via the Kubernetes operator
This runs the attestation-test WASM module through the Propeller Kubernetes operator. It queries the Elastic HAL for platform info, generates a random nonce, and requests TEE attestation evidence.
Prerequisites
The operator must be deployed and a Proplet registered. Follow the end-to-end example first.
Proplet Configuration
The attestation test needs HAL enabled. Patch your Proplet:
kubectl patch proplet k8s-proplet --type=merge -p '{"spec":{"k8s":{"env":{"halEnabled":true,"externalWasmRuntime":""}}}}'Setting externalWasmRuntime: "" forces the proplet to use its built-in runtime (Wasmtime with HAL linker support).
Build the WASM Module
cd propeller
make attestation-testApply the Task
WASM_B64=$(base64 -w0 propeller/build/attestation-test.wasm)
kubectl apply -n propeller-workloads -f - <<EOF
apiVersion: propeller.propeller.absmach.eu/v1
kind: Task
metadata:
name: attestation-example
spec:
name: attestation-example
functionName: run
file: "${WASM_B64}"
propletSelector:
propletId: "k8s-proplet"
EOFWatch and Verify
kubectl get task attestation-example -n propeller-workloads -wCheck the proplet logs for the attestation output:
kubectl logs -n propeller-workloads deployment/k8s-proplet | grep -i attestationExpected output depends on the platform:
- TDX CVM: evidence with measurement data (~863 bytes)
- No TEE (stub):
evidence: {}withattestation_support: false
Reference
| Field | Value |
|---|---|
functionName | run |
daemon | false |
| Proplet env | halEnabled: true, externalWasmRuntime: "" |