Chapter 3. Configure
You can configure Red Hat build of Trustee for confidential containers workloads running on bare-metal servers with the Intel® Trust Domain Extensions (TDX) or AMD SEV-SNP Trusted Execution Environments (TEEs) using the TrusteeConfig custom resource. The TrusteeConfig custom resource simplifies Red Hat build of Trustee deployment by reducing configuration complexity.
A single custom resource defines all configuration while the operator automatically generates secrets, config maps, and the KbsConfig resource.
Permissive and Restricted profile types provide pre-configured security levels, while platform-specific extensions are integrated into the specification.
Use TrusteeConfig for new deployments and existing deployments planning to simplify configuration. To get started, see Create TrusteeConfig custom resources.
After creating a TrusteeConfig resource, you can customize the autogenerated resources if you need advanced configuration. For more information, see Customize TrusteeConfig autogenerated resources.
3.1. Understanding TrusteeConfig custom resources Copy linkLink copied to clipboard!
You can simplify Red Hat build of Trustee configuration by using the TrusteeConfig custom resource. TrusteeConfig is a Kubernetes custom resource that simplifies Red Hat build of Trustee deployment by automating resource creation. It includes the secrets, config maps, and lower-level resources required for deployment.
TrusteeConfig uses profile types to determine security and configuration settings.
- Permissive profile
The Permissive profile provides a simplified configuration suitable for development and testing environments. Use the Permissive profile when you need a quick evaluation for deployment or development.
With Permissive profile:
- Key Broker Service (KBS) service is exposed by using a Kubernetes service with ClusterIP
- Resource policy is set to allow all requests
- Configuration is minimal and focuses on essential settings
- Restricted profile
The Restricted profile enforces stricter security controls suitable for production environments. Use the Restricted profile for production deployments where security and compliance are critical.
With Restricted profile:
-
You must provide HTTPS certificate and key in the
TrusteeConfigspecification - KBS service is exposed by using a secure HTTPS route with proper certificate validation
- Resource policy is configured to enforce specific access controls
- Attestation token verification is enabled and enforced
-
You must provide HTTPS certificate and key in the
- Service type configuration
The
kbsServiceTypefield determines how the KBS service is exposed in your cluster.Expand Service type Use case Default ClusterIP
Services within the cluster; typical for OpenShift with routes
Yes
NodePort
Direct access to worker nodes; use when routes are not available
No
LoadBalancer
External load balancer integration; use with cloud provider load balancers
No
Most deployments use the default ClusterIP with OpenShift routes for secure external access.
- HTTPS configuration
For the Restricted profile, you must provide HTTPS certificates for secure communication. For Permissive profile deployments, HTTPS configuration is optional.
You create a Kubernetes TLS secret containing your certificate and private key, then reference it in the
TrusteeConfigspecification:- Create the TLS secret using cert-manager, OpenShift’s certificate management, or manually
-
Reference the secret name in
httpsSpec.tlsSecretName - The Operator uses this to configure secure HTTPS communication
- Attestation token verification
You can optionally configure attestation token verification for enhanced security.
Production Restricted profile deployments require the following setting.
TrusteeConfigsupports optional platform-specific configurations that you can specify in theTrusteeConfigresource. Each platform has documentation covering platform-specific extensions and configuration options.Create a Kubernetes TLS secret containing the attestation token verification certificate, then reference it in the
TrusteeConfigspecification:- Create the TLS secret with the attestation token verification certificate
-
Reference the secret name in
attestationTokenVerificationSpec.tlsSecretName - This establishes trust between clients and the Trustee service
- Generated resources
-
When you create a
TrusteeConfigresource, the Trustee Operator automatically creates the following resources: - Config maps
-
<name>-kbs-config- Contains KBS service configuration -
<name>-rvps-reference-values- Contains Reference Value Provider Service (RVPS) reference value settings -
<name>-attestation-policy-cpu- Contains CPU attestation policies -
<name>-attestation-policy-gpu- Contains GPU attestation policies -
<name>-resource-policy- Contains the resource access policy
where
<name>is yourTrusteeConfigresource name.-
- Secrets
-
<name>-kbs-auth- Contains authentication credentials -
<name>-https- Contains HTTPS certificate and key (whenhttpsSpecis provided) -
<name>-attestation-token- Contains attestation token verification certificate (whenattestationTokenSpecis provided)
where
<name>is yourTrusteeConfigresource name.-
- Custom resources
-
<name>-kbsconfig- TheKbsConfigcustom resource that configures the Trustee services
where
<name>is yourTrusteeConfigresource name.-
- Services and routes
The Operator creates Kubernetes services and OpenShift routes based on your service specification:
-
Service type (ClusterIP, NodePort, or LoadBalancer) as specified in
kbsServiceType - OpenShift route when using ClusterIP service type
-
HTTPS configuration when
httpsSpecis provided
The Operator generates these resources based on your
TrusteeConfigspecification. You do not manually create them when usingTrusteeConfig. You can customize these autogenerated resources after creation if you need advanced configuration.-
Service type (ClusterIP, NodePort, or LoadBalancer) as specified in
TrusteeConfigas the starting pointUse
TrusteeConfigas the starting point for all Red Hat build of Trustee deployments.TrusteeConfigprovides automated resource generation and simplifies configuration management.After creating a
TrusteeConfigresource, you can customize the autogenerated resources if you need advanced configuration beyond theTrusteeConfigspecification.Use the manual KbsConfig approach only for advanced use cases where you need extensive customization beyond
TrusteeConfigcapabilities or when migrating from existing KbsConfig deployments.
Additional resources
3.2. Create TrusteeConfig custom resources Copy linkLink copied to clipboard!
You can create a TrusteeConfig custom resource to deploy Red Hat build of Trustee with simplified configuration. TrusteeConfig automatically generates the required secrets, config maps, and KbsConfig resource.
Prerequisites
- The Red Hat build of Trustee Operator is installed in the cluster.
- You have access to the cluster with administrator privileges.
-
The Red Hat build of Trustee namespace (
trustee-operator-system) exists.
Procedure
Generate an HTTPS certificate and key for secure communication by running the following command:
$ DOMAIN=$(oc get ingress.config/cluster -o jsonpath='{.spec.domain}') $ ROUTE="kbs-route-trustee-operator-system.${DOMAIN}" $ openssl req -x509 -nodes -days 365 \ -newkey rsa:2048 \ -keyout tls.key \ -out tls.crt \ -subj "/CN=kbs-trustee-operator-system/O=Red Hat" \ -addext "subjectAltName=DNS:${ROUTE}"This command creates
tls.crt(the HTTPS certificate) andtls.key(the HTTPS private key).Create a Kubernetes TLS secret from the certificate and key by running the following command:
$ oc create secret tls trustee-tls-cert -n trustee-operator-system \ --cert=tls.crt \ --key=tls.keyCreate a
TrusteeConfigresource with the Restricted profile by running the following command:$ cat <<EOF | oc apply -f - apiVersion: trustee.confidentialcontainers.org/v1 kind: TrusteeConfig metadata: name: trustee-config namespace: trustee-operator-system spec: profileType: Restricted kbsServiceType: ClusterIP httpsSpec: tlsSecretName: trustee-tls-cert EOFThe Restricted profile provides production-ready security controls with HTTPS encryption and stricter resource policies.
You can modify the YAML configuration to customize the deployment:
-
Change
profileType: RestrictedtoPermissivefor testing or staging environments where you want to test a permissive policy first. -
Change
kbsServiceType: ClusterIPtoNodePortorLoadBalancerfor different network exposure requirements.
-
Change
Verify that
TrusteeConfigwas created successfully by running the following command:$ oc get trusteeconfig -n trustee-operator-systemNAME AGE trustee-config 10sVerify that the operator automatically generated the required resources by running the following command:
$ oc get secrets,cm,kbsconfig -n trustee-operator-systemNAME TYPE DATA AGE secret/kbs-auth Opaque 1 15s NAME DATA AGE configmap/trustee-config-kbs-config 3 15s configmap/trustee-config-rvps-reference-values 1 15s configmap/trustee-config-resource-policy 1 15s configmap/trustee-config-attestation-policy-cpu 1 15s configmap/trustee-config-attestation-policy-gpu 1 15s NAME AGE kbsconfig.trustee.confidentialcontainers.org/trustee-config 15s
Verification
Verify that the key broker service (KBS) pod is running by running the following command:
$ oc get pods -n trustee-operator-system -l app=kbsNAME READY STATUS RESTARTS AGE trustee-deployment-768fd9bf4d-kb6x6 1/1 Running 0 14hVerify that the Trustee service is accessible by running the following command:
$ oc get svc -n trustee-operator-system kbs-serviceNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kbs-service ClusterIP 10.x.x.x <none> 8080/TCP 1m
3.3. TrusteeConfig custom resource field reference Copy linkLink copied to clipboard!
This reference provides complete documentation for all fields in the TrusteeConfig custom resource specification. Use this reference when creating or modifying TrusteeConfig resources.
TrusteeConfig uses the following specification structure:
apiVersion: trustee.confidentialcontainers.org/v1
kind: TrusteeConfig
metadata:
name: trustee-config
namespace: trustee-operator-system
spec:
profileType: Permissive | Restricted
kbsServiceType: ClusterIP | NodePort | LoadBalancer
httpsSpec:
tlsSecretName: <tls-secret-name>
attestationTokenVerificationSpec:
tlsSecretName: <token-verification-secret-name>
Core specification fields
| Field | Type | Description | Required |
|---|---|---|---|
|
| String |
Determines the security profile and configuration level. Values: | Yes |
|
| String |
Type of Kubernetes service for exposing the Key Broker Service (KBS). Values: | No |
|
| Object |
HTTPS configuration containing certificate and private key for secure communication. Required for | Depends on profile |
|
| Object | Attestation token verification settings for enhanced security and trust establishment. | No |
profileType values
| Value | Description |
|---|---|
|
| Development and testing profile that auto-generates self-signed HTTPS certificates and uses permissive resource policies. Suitable for evaluation and non-production environments. The KBS service is exposed internally via ClusterIP. |
|
| Production profile that enforces stricter security controls. Requires manual provision of HTTPS certificate and key. Enables attestation token verification and enforces resource access policies. The KBS service is exposed via secure HTTPS routes with certificate validation. |
kbsServiceType values
| Value | Description | Use case |
|---|---|---|
|
| Kubernetes internal service accessible only from within the cluster. Uses OpenShift routes for external access. | Standard deployments on OpenShift. Default value. |
|
| Service accessible via a port on each worker node. Direct node access without routes. | Deployments requiring direct worker node access or when routes are unavailable. |
|
| Service uses cloud provider load balancer for external access. | Deployments on cloud platforms with integrated load balancer support. |
httpsSpec fields
Required for Restricted profile deployments. Optional for Permissive profile (autogenerated if not provided).
| Field | Type | Description |
|---|---|---|
|
| String | Name of a Kubernetes TLS secret containing the HTTPS certificate and private key. This is the recommended approach for providing HTTPS certificates. |
Example:
httpsSpec:
tlsSecretName: trustee-tls-cert
Create the TLS secret before referencing it:
$ oc create secret tls trustee-tls-cert -n trustee-operator-system \
--cert=tls.crt \
--key=tls.key
attestationTokenVerificationSpec fields
Optional specification for attestation token verification and enhanced security.
| Field | Type | Description |
|---|---|---|
|
| String | Name of a Kubernetes TLS secret containing the certificate for verifying attestation tokens from clients. |
Example:
attestationTokenVerificationSpec:
tlsSecretName: trustee-token-cert
Complete example: Permissive profile
apiVersion: trustee.confidentialcontainers.org/v1
kind: TrusteeConfig
metadata:
name: trustee-config
namespace: trustee-operator-system
spec:
profileType: Permissive
kbsServiceType: ClusterIP
Complete example: Restricted profile
apiVersion: trustee.confidentialcontainers.org/v1
kind: TrusteeConfig
metadata:
name: trustee-config
namespace: trustee-operator-system
spec:
profileType: Restricted
kbsServiceType: ClusterIP
httpsSpec:
tlsSecretName: trustee-tls-cert
attestationTokenVerificationSpec:
tlsSecretName: trustee-token-cert
Field validation rules
TrusteeConfig enforces the following validation rules:
-
profileTypemust be eitherPermissiveorRestricted(required). -
kbsServiceTypemust beClusterIP,NodePort, orLoadBalancer. -
For
Restrictedprofile,httpsSpec.tlsSecretNameis required. - TLS secrets must contain valid certificate and key data in PEM format.
Default values
| Field | Default |
|---|---|
|
|
|
Additional resources
3.4. Customize TrusteeConfig autogenerated resources Copy linkLink copied to clipboard!
For production deployments with specific scaling, security policy, or disconnected environment requirements, you can customize the autogenerated TrusteeConfig resources.
Prerequisites
-
You have created a
TrusteeConfigcustom resource. - The Trustee operator has generated the required resources.
Procedure
To customize the autogenerated
KbsConfigresource, edit the resource directly by running the following command:$ oc edit kbsconfig <kbsconfig-name> -n trustee-operator-systemCommon KbsConfig customizations include:
Adjusting the number of Trustee replicas:
spec: KbsDeploymentSpec: replicas: 3Adding secret resources for workload access:
spec: kbsSecretResources: - kbsres1 - kbsres2Configuring disconnected environment support:
spec: kbsLocalCertCacheSpec: # Add disconnected environment configuration
To customize the resource access policy, edit the autogenerated config map by running the following command:
$ oc edit cm -n trustee-operator-system <trusteeconfig-name>-resource-policyTo customize the CPU attestation policy, edit the autogenerated config map by running the following command:
$ oc edit cm -n trustee-operator-system <trusteeconfig-name>-attestation-policy-cpuTo customize the GPU attestation policy, edit the autogenerated config map by running the following command:
$ oc edit cm -n trustee-operator-system <trusteeconfig-name>-attestation-policy-gpuTo customize Reference Value Provider Service (RVPS) reference values, edit the autogenerated config map by running the following command:
$ oc edit cm -n trustee-operator-system <trusteeconfig-name>-rvps-reference-valuesTo configure container image signature verification, edit the autogenerated
KbsConfigresource to add secret references by running the following command:$ oc edit kbsconfig <kbsconfig-name> -n trustee-operator-systemAdd the secret names to the
kbsSecretResourceslist:spec: kbsSecretResources: - img-sig - security-policywhere:
-
img-sigis the secret containing the public container image signing key -
security-policyis the secret containing the signature verification policy
For more information about creating these secrets, see Creating a secret for container image signature verification and Create the container image signature verification policy.
-
Verification
Verify that the Trustee pods restart after configuration changes by running the following command:
$ oc get pods -n trustee-operator-systemCheck the Trustee operator logs for any configuration errors by running the following command:
$ oc logs -n trustee-operator-system deployment/trustee-operator-controller-manager
3.5. Verify the NVIDIA remote verifier configuration Copy linkLink copied to clipboard!
When you create a TrusteeConfig custom resource, Red Hat build of Trustee automatically generates the kbs-config ConfigMap with the NVIDIA remote verifier configured. Remote verifier mode delegates GPU measurement validation to NVIDIA Remote Attestation Service (NRAS), eliminating the need to manually configure GPU reference values. You can verify that the NVIDIA verifier is configured correctly.
Prerequisites
- You have configured the NVIDIA GPU attestation prerequisites. For more information, see Prerequisites.
-
You have created a
TrusteeConfigcustom resource. For more information, see Creating a TrusteeConfig custom resource.
Procedure
Retrieve the ConfigMap name and verify the NVIDIA verifier configuration:
$ NAMESPACE="trustee-operator-system" $ KBSCONFIG_NAME=$(kubectl get kbsconfig -n "$NAMESPACE" \ -o jsonpath='{.items[0].metadata.name}' 2>/dev/null) $ oc get configmap $KBSCONFIG_NAME -n trustee-operator-system -o yamlThe ConfigMap should include the following configuration:
[attestation_service.verifier_config.nvidia_verifier] type = "Remote"The
type = "Remote"setting configures Red Hat build of Trustee to forward GPU attestation evidence to NRAS for verification. Theverifier_urlparameter is optional and defaults tohttps://nras.attestation.nvidia.com/v4/attest.Verify the NVIDIA verifier initialization in the Red Hat build of Trustee logs:
$ oc logs -n trustee-operator-system deployment/trustee-deployment | grep -i nvidiaYou should see log entries indicating that the NVIDIA verifier initialized in remote mode.
Example output
INFO nvidia_verifier: Initialized NVIDIA verifier in Remote mode
3.6. NRAS attestation claims Copy linkLink copied to clipboard!
NVIDIA Remote Attestation Service (NRAS) returns attestation claims that describe the GPU state and verification results. Your attestation policy must validate these claims to ensure the GPU meets your security requirements.
NRAS returns the following key attestation claims:
- Verification status
- Indicates whether NRAS successfully verified the GPU attestation evidence.
- GPU firmware version
- Identifies the GPU firmware version that was attested.
- Hardware model
- Confirms the GPU hardware model (for example, H100).
- Confidential Computing capabilities
- Indicates whether Confidential Computing features are enabled.
3.7. Creating a secret with custom keys for clients Copy linkLink copied to clipboard!
You can create a secret that contains custom keys for Red Hat build of Trustee clients.
Prerequisites
- You have installed the Red Hat build of Trustee Operator.
Procedure
Create a secret by running the following command:
$ oc create secret generic attestation-status \ --from-literal=status=success \ -n trustee-operator-systemYou specify the
attestation-statussecret in thespec.kbsSecretResourceskey of theKbsConfigcustom resource manifest.
3.8. Creating a secret for container image signature verification Copy linkLink copied to clipboard!
If you use container image signature verification, you must create a secret that contains the public container image signing key.
The Red Hat build of Trustee Operator uses the secret to verify the signature, ensuring that only trusted and authenticated container images are deployed in your environment.
You can use Red Hat Trusted Artifact Signer or other tools to sign container images.
Procedure
Create a secret for container image signature verification by running the following command:
$ oc create secret generic <type> \ --from-file=<tag>=./<public_key_file> \ -n trustee-operator-systemwhere:
<type>-
Specifies the secret type, for example,
img-sig. <public_key_file>-
Specifies the secret tag, for example,
pub-key, and the public container image signing key.
-
Record the
<type>value. You must add this value to thespec.kbsSecretResourceskey when you create theKbsConfigcustom resource.
3.9. Generating RVPS reference values Copy linkLink copied to clipboard!
Update the Reference Value Provider Service (RVPS) config map with expected measurement values to verify the integrity of your Trusted Execution Environment (TEE). When you create a TrusteeConfig custom resource, it automatically generates the RVPS config map, but the reference-values.json field is empty by default. You must use the veritas tool to populate this field with the expected measurement values for your environment.
Prerequisites
- You have prepared to register trusted measurements that will be verified against the TEE hardware and firmware to ensure the confidential VM is running the expected software stack.
-
You have installed the
container-toolsmeta-package. For details see Installing container tools.
Procedure
Update the
rvps-configmap.yamlmanifest file by running the following command:$ podman run \ -v ./pull-secret.json:/pull-secret.json \ -v ./initdata.toml:/initdata.toml \ quay.io/openshift_sandboxed_containers/coco-tools:1.12 \ veritas --platform baremetal --tee <tee> \ --authfile /pull-secret.json \ --initdata /initdata.toml > rvps-configmap.yaml<tee>- Specifies the Intel® Trust Domain Extensions (TDX) or AMD SEV-SNP Trusted Execution Environments (TEEs)
Update the RVPS config map by running the following command:
$ oc apply -f rvps-configmap.yamlNoteAfter you apply the updated RVPS config map, the new values are available to Red Hat build of Trustee automatically. You do not need to restart the service. This synchronization process might take several minutes to propagate throughout the system. Review the generated RVPS config map to ensure the values match your platform and software versions. You can regenerate and update the RVPS values at any time, for example when upgrading OpenShift Container Platform or Red Hat OpenShift sandboxed containers. For details, see Updating the RVPS config map.
3.10. Create the container image signature verification policy Copy linkLink copied to clipboard!
You configure the container image signature verification policy. Signature verification is disabled by default. To enable signature verification for your container images, follow the procedure. For more information, see containers-policy.json 5.
Both the signature keys and the corresponding policy must be added to Red Hat build of Trustee. The following procedure describes only how to add the policy itself.
Procedure
Create a
security-policy-config.jsonfile according to the following example:{ "default": [ { "type": "reject" } ], "transports": { "<transport>": { "<registry>/<image>": [ { "type": "<type>", "keyPath": "kbs:///default/<type>/<tag>" } ] } } }where:
transports- Specifies which images the policy explicitly approves and verifies through their signatures. By default, the policy rejects all images and all signatures. For more information, see containers-transports 5.
keyPath-
Specifies the type and tag of the container image signature verification secret that you created, for example,
img-sig/pub-key.
Create the security policy by running the following command:
$ oc create secret generic <security-policy-name> \ --from-file=<osc-key>=./<security-policy-config.json> \ -n trustee-operator-systemwhere:
<security-policy-name>-
Specifies the value of the
spec.kbsSecretResourceskey of theKbsConfigcustom resource.
3.11. Verifying the configuration Copy linkLink copied to clipboard!
You verify the Red Hat build of Trustee configuration by checking its pods and logs.
Procedure
Switch to the Red Hat build of Trustee Operator project by running the following command:
$ oc project trustee-operator-systemCheck the pods by running the following command:
$ oc get pods -n trustee-operator-systemExample output
NAME READY STATUS RESTARTS AGE trustee-deployment-8585f98449-9bbgl 1/1 Running 0 22m trustee-operator-controller-manager-5fbd44cd97-55dlh 2/2 Running 0 59mSet the
POD_NAMEenvironmental variable by running the following command:$ POD_NAME=$(oc get pods -l app=kbs -o jsonpath='{.items[0].metadata.name}' -n trustee-operator-system)Check the pod logs by running the following command:
$ oc logs -n trustee-operator-system $POD_NAMEExample output
[2024-05-30T13:44:24Z INFO kbs] Using config file /etc/kbs-config/kbs-config.json [2024-05-30T13:44:24Z WARN attestation_service::rvps] No RVPS address provided and will launch a built-in rvps [2024-05-30T13:44:24Z INFO attestation_service::token::simple] No Token Signer key in config file, create an ephemeral key and without CA pubkey cert [2024-05-30T13:44:24Z INFO api_server] Starting HTTPS server at [0.0.0.0:8080] [2024-05-30T13:44:24Z INFO actix_server::builder] starting 12 workers [2024-05-30T13:44:24Z INFO actix_server::server] Tokio runtime found; starting in existing Tokio runtime
3.12. Verify NVIDIA GPU attestation Copy linkLink copied to clipboard!
You verify NVIDIA GPU attestation by deploying a test pod with GPU resources and checking that Red Hat build of Trustee successfully attests the GPU. This confirms your Red Hat build of Trustee configuration, remote verifier, and attestation policy work correctly.
Prerequisites
- You have configured the NVIDIA GPU attestation prerequisites. For more information, see Prerequisites.
You have configured the NVIDIA remote verifier. For more information, see Configure the NVIDIA remote verifier. .Procedure
Create a manifest file named
gpu-test-pod.yamlfor a test pod with GPU resources:apiVersion: v1 kind: Pod metadata: name: gpu-attestation-test annotations: io.katacontainers.config.hypervisor.default_memory: "32768" io.katacontainers.config.hypervisor.cc_init_data: "H4sIAAAAAAAAA6WUS2/TQBCA7/4Vli85xQ1IoKpSDyUJUIkQy07JoYqiyXpir7IPszsONb++YyIQINauxMGHnfk875kzOi+tiW/jZJa+SmdJBKqyTlKte5mv4fWbt0n0WALBLkoaq6ToUoeVTVg/mUyiBsQJKoz5M7S/AFFU4hFaRfFdWd7l2WeUVX2wzuf4tUVP8c1tTK7F37HiGzQh9VxZjwWV0gQJ23TvpcKg3iEQzq0hkAbdMFaAKQ/2KQQtWOhsN0Itn1Bkzgr0waw/IK2QnBRDxHq9Wp65tEGkly6Q81JBM5+kp3tD6I7A8QxRuW0pTKxQf7TUqLZ613Fuh2C510ZxmefZA/8RYjJo/XhHslape83DFQJyhLIg7lvQUY7ansc9XbCCQOEX6Ujaoy9qcLiyraFgSXL0iGXOs2D1As8DWKvHYyiQLv3kKdxIHUyauezHpgUBWRlQI/PHuToaj6mnNg6ENNUAQ/4FlmwzYmhD3bbfci+/B5N/aMqX7PIFWzY1anSghtt4gX/tyDA2vCRbkDRS+C0fWPz30PYnNQFIyWr188Q+kj2h2QtrjrLyu7/e6enAstap/mDXRM3N1RWLph7dWQpM2awnxKltuAxk3dR3/NY317NrPve9/SgRZf2nx9NB7CIDGnujQuz5nfyXj2f3zZjpaQYAAA==" spec: runtimeClassName: kata-cc-nvidia-gpu restartPolicy: OnFailure containers: - name: gpu-cc-verifier image: quay.io/openshift_sandboxed_containers/gpu-verifier:ubi9 imagePullPolicy: IfNotPresent command: ["/bin/bash"] args: - -c - | /opt/cuda-samples/Samples/0_Introduction/vectorAdd/build/vectorAdd sleep 36000 resources: limits: nvidia.com/pgpu: 1 securityContext: privileged: falseThis pod manifest includes:
-
GPU resource request (
nvidia.com/pgpu: 1) to allocate one NVIDIA GPU to the pod -
Kata Containers runtime class (
kata-cc-nvidia-gpu) that provides confidential computing support for NVIDIA GPUs -
Confidential container initialization data (
cc_init_data) required for attestation A simple CUDA test application (
vectorAdd) to verify GPU functionalityDeploy the test pod:
$ oc create -f gpu-test-pod.yamlMonitor the pod startup:
$ oc get pod gpu-attestation-test -wWait for the pod status to become
Running.Fetch the Red Hat build of Trustee resource from the confidential container:
$ oc exec -it gpu-attestation-test -- curl http://127.0.0.1:8006/cdh/resource/default/attestation-status/statusWhen fetching the resource, the confidential container performs GPU attestation with Red Hat build of Trustee.
Check the attestation process in the Red Hat build of Trustee logs:
$ oc logs -n trustee-operator-system deployment/trustee-deployment | grep -A 10 nvidiaSuccessful GPU attestation shows:
- NVIDIA verifier processing GPU attestation evidence
- Communication with NVIDIA Remote Attestation Service (NRAS) for remote verification
- Policy evaluation allowing access based on NRAS claims
Secret release to the confidential container
Example output
INFO attestation_service: Processing attestation request with NVIDIA evidence INFO nvidia_verifier: Forwarding GPU evidence to NRAS for verification INFO nvidia_verifier: NRAS verification succeeded INFO policy_engine: Policy evaluation succeeded for NVIDIA GPU attestation INFO kbs: Releasing secret to confidential container
Verification
-
The pod started successfully and reached
Runningstatus -
The
curlcommand returned theattestation-statussecret - Red Hat build of Trustee logs show successful NVIDIA GPU attestation
- NRAS verification completed successfully (for remote verifier mode)
- The attestation policy evaluation succeeded