Chapter 2. Install
You install confidential containers on bare-metal servers with the Intel® Trust Domain Extensions (TDX) and AMD SEV-SNP Trusted Execution Environments (TEEs) by configuring your environment and installing the OpenShift sandboxed containers Operator.
Perform the following steps:
- Intel® TDX: Create a machine config for your cluster.
- Install the OpenShift sandboxed containers Operator.
2.1. Prerequisites Copy linkLink copied to clipboard!
Review the following prerequisites before deploying confidential containers.
- You have installed the latest version of Red Hat OpenShift Container Platform on the cluster where you are running your confidential containers workload.
Check the Compatibility with OpenShift Container Platform for the specific minimum version required for confidential containers in release 1.12, as it requires a higher version than OpenShift sandboxed containers.
- You have deployed Red Hat build of Trustee on an OpenShift Container Platform cluster in a trusted environment. For more information, see Deploying Red Hat build of Trustee.
Your bare-metal servers are configured for Unified Extensible Firmware Interface (UEFI) boot mode.
ImportantThe OpenShift Container Platform Assisted Installer does not enforce UEFI boot mode during cluster installation. Verify that your server firmware is set to UEFI mode before you deploy confidential containers. Confidential containers workloads cannot run on servers that use legacy BIOS.
2.2. Creating an Intel TDX machine config Copy linkLink copied to clipboard!
If you use Intel® Trust Domain Extensions (TDX), you must create a machine config before you install the Red Hat build of Trustee Operator.
Procedure
Create a
tdx-machine-config.yamlmanifest file according to the following example:apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfig metadata: labels: machineconfiguration.openshift.io/role: <role> name: 99-enable-intel-tdx spec: kernelArguments: - kvm_intel.tdx=1 - nohibernate config: ignition: version: 3.2.0 storage: files: - path: /etc/modules-load.d/vsock.conf mode: 0644 contents: source: data:text/plain;charset=utf-8;base64,dnNvY2stbG9vcGJhY2sK<role>-
Specify
masterfor single-node OpenShift orworkerfor a multi-node cluster.
Create the config map by running the following command:
$ oc create -f tdx-machine-config.yamlUpdating the machine config triggers node reboot.
Verification
Verify that the machine config is correctly configured by running the following command:
$ oc get machineconfig 99-enable-intel-tdx
2.3. Installing the OpenShift sandboxed containers Operator Copy linkLink copied to clipboard!
You can install the OpenShift sandboxed containers Operator by using the command line interface (CLI).
Prerequisites
-
You have access to the cluster as a user with the
cluster-adminrole.
Procedure
Create an
osc-namespace.yamlmanifest file:apiVersion: v1 kind: Namespace metadata: name: openshift-sandboxed-containers-operatorCreate the namespace by running the following command:
$ oc create -f osc-namespace.yamlCreate an
osc-operatorgroup.yamlmanifest file:apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: sandboxed-containers-operator-group namespace: openshift-sandboxed-containers-operator spec: targetNamespaces: - openshift-sandboxed-containers-operatorCreate the operator group by running the following command:
$ oc create -f osc-operatorgroup.yamlCreate an
osc-subscription.yamlmanifest file:apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: sandboxed-containers-operator namespace: openshift-sandboxed-containers-operator spec: channel: stable installPlanApproval: Automatic name: sandboxed-containers-operator source: redhat-operators sourceNamespace: openshift-marketplace startingCSV: sandboxed-containers-operator.v1.12.0Create the subscription by running the following command:
$ oc create -f osc-subscription.yamlVerify that the Operator is correctly installed by running the following command:
$ oc get csv -n openshift-sandboxed-containers-operatorThis command can take several minutes to complete.
Watch the process by running the following command:
$ watch oc get csv -n openshift-sandboxed-containers-operatorExample output
NAME DISPLAY VERSION PHASE openshift-sandboxed-containers openshift-sandboxed-containers-operator 1.12.0 Succeeded