Confidential computing setup

Confidential computing is a type of secure computing that allows users to encrypt and decrypt data on a secure, isolated computing environment. It works by encrypting the data before it is sent to the cloud or other computing resources. This allows users to keep their data private and secure, even if it is accessed by unauthorized parties. This makes it useful for sensitive data such as financial information, health records, and other confidential data.

One important aspect of Confidential Computing is the ability to encrypt data even in-memory. This document describes how to setup Kairos to use enclave-cc in order to run confidential workloads.

Create a Kairos cluster

The coco community bundle is supported since Kairos version v2.0.0-alpha3 (“coco” stands for “Confidential Computing”).

A configuration file like the following should be used (see the bundles section):

    - targets:
        - run://
        - run://
        - run://
        - run://

    auto: true
    device: auto
    reboot: true

    enabled: true

    - name: kairos
      passwd: kairos

The bundle is making some changes on the host’s filesystem (installs a customized containerd binary among other things) and a restart of the node is needed in order for the changes to be applied fully. When this file appears, reboot the node: /etc/containerd/.sentinel.

Additional steps

  kubectl label --overwrite node $(kubectl get nodes -o jsonpath='{.items[]}')""
  kubectl apply -k
  • [Deploy the ccruntime resource]
  kubectl apply -k

(wait until they are all running: kubectl get pods -n confidential-containers-system --watch)

  • Deploy a workload

    The last part with the verification will only work from within a Pod because the IP address is internal:

    ssh -i ccv0-ssh root@$(kubectl get service ccv0-ssh -o jsonpath="{.spec.clusterIP}")

    You can create a Pod like this:

    apiVersion: v1
    kind: Pod
      name: kubectl
      - name: kubectl
        image: opensuse/leap
        command: ["/bin/sh", "-ec", "trap : TERM INT; sleep infinity & wait"]

    Get a shell to it and run the verification commands (You will need to install ssh in the Pod first).

Known limitations

The above solution has some known limitations that might be addressed in future releases of Kairos. Namely:

  • After a Kairos upgrade, the above process has to be repeated in order to install the customized containerd and the relevant configuration.
  • There is no simple way to upgrade to newer versions of the bundle (this is a general bundles limitation).

Last modified April 25, 2023: Move docs into root (f4e3511)