Using Confidential GKE Nodes


This page shows you how to use the Confidential Google Kubernetes Engine Nodes feature. Confidential GKE Nodes provides encryption-in-use for your workloads.

Overview

Confidential GKE Nodes is built on top of Compute Engine Confidential VM, which encrypts the memory contents of VMs in-use. Clusters with Confidential GKE Nodes enabled enforce the use of Confidential VM for all of your nodes. This means that your nodes, including the workloads running on them, are encrypted in-use. For visibility over your control plane, use Access Transparency.

There is no additional cost to deploy Confidential GKE Nodes, other than the cost of Compute Engine Confidential VM. However, Confidential GKE Nodes might generate slightly more log data on startup than standard nodes. For information on logs pricing, see Pricing for Google Cloud's operations suite.

Availability

Confidential GKE Nodes is available in the following situations:

Before you begin

Before you start, make sure you have performed the following tasks:

  • Ensure that you have enabled the Google Kubernetes Engine API.
  • Enable Google Kubernetes Engine API
  • Ensure that you have installed the Google Cloud CLI.
  • Set up default Google Cloud CLI settings for your project by using one of the following methods:
    • Use gcloud init, if you want to be walked through setting project defaults.
    • Use gcloud config, to individually set your project ID, zone, and region.

    gcloud init

    1. Run gcloud init and follow the directions:

      gcloud init

      If you are using SSH on a remote server, use the --console-only flag to prevent the command from launching a browser:

      gcloud init --console-only
    2. Follow the instructions to authorize the gcloud CLI to use your Google Cloud account.
    3. Create a new configuration or select an existing one.
    4. Choose a Google Cloud project.
    5. Choose a default Compute Engine zone.
    6. Choose a default Compute Engine region.

    gcloud config

    1. Set your default project ID:
      gcloud config set project PROJECT_ID
    2. Set your default Compute Engine region (for example, us-central1):
      gcloud config set compute/region COMPUTE_REGION
    3. Set your default Compute Engine zone (for example, us-central1-c):
      gcloud config set compute/zone COMPUTE_ZONE
    4. Update gcloud to the latest version:
      gcloud components update

    By setting default locations, you can avoid errors in gcloud CLI like the following: One of [--zone, --region] must be supplied: Please specify location.

Enable Confidential GKE Nodes on clusters

You can create a new cluster with Confidential GKE Nodes enabled by using gcloud CLI or Google Cloud console. If you enable Confidential GKE Nodes at the cluster level, all the nodes in the cluster are Confidential VM.

gcloud

When creating a new cluster, specify the --enable-confidential-nodes option in the Google Cloud CLI:

gcloud beta container clusters create CLUSTER_NAME \
    --machine-type=N2D_MACHINE_TYPE \
    --enable-confidential-nodes

Replace the following:

  • CLUSTER_NAME: the name of your new cluster.
  • N2D_MACHINE_TYPE: the machine type for your cluster's default node pool, which must be an N2d machine type.

Console

  1. Go to the Google Kubernetes Engine page in the Cloud console.

    Go to Google Kubernetes Engine

  2. Click Create.

  3. In the Standard section, click Configure.

  4. From the navigation pane, under Cluster, click Security.

  5. Select the Enable Confidential GKE Nodes checkbox.

  6. Configure your cluster as desired.

  7. Click Create.

See Creating a cluster for more details about creating clusters.

After creating a cluster with Confidential GKE Nodes, any node pools created in this cluster can only use confidential nodes. You cannot create regular node pools in clusters with Confidential GKE Nodes enabled. You also cannot disable Confidential GKE Nodes on individual node pools when you enable Confidential GKE Nodes at the cluster level.

Enable Confidential GKE Nodes on node pools

You can enable Confidential GKE Nodes on specific node pools if Confidential GKE Nodes is disabled at the cluster level.

On a new node pool

To create a new node pool with Confidential GKE Nodes enabled, run the following command:

gcloud beta container node-pools create NODE_POOL_NAME \
    --cluster=CLUSTER_NAME \
    --machine-type=N2D_MACHINE_TYPE \
    --enable-confidential-nodes

Replace the following:

  • NODE_POOL_NAME: the name of your new node pool.
  • CLUSTER_NAME: the name of your cluster.
  • N2D_MACHINE_TYPE: the machine type for your node pool, which must be an N2D machine type.

On an existing node pool

You can enable Confidential GKE Nodes on existing node pools that use the N2D machine type. Run the following command:

gcloud beta container node-pools update NODE_POOL_NAME \
    --cluster=CLUSTER_NAME \
    --enable-confidential-nodes

Replace the following:

  • NODE_POOL_NAME: the name of your node pool.
  • CLUSTER_NAME: the name of your cluster.

Verifying that Confidential GKE Nodes are enabled

On clusters

You can verify that your cluster is using Confidential GKE Nodes with the Google Cloud CLI or Google Cloud console.

gcloud

Describe the cluster:

gcloud beta container clusters describe CLUSTER_NAME

If Confidential GKE Nodes is enabled, the output of the command will include these lines:

confidentialNodes:
  enabled: true

Console

  1. Go to the Google Kubernetes Engine page in Cloud console.

    Go to Google Kubernetes Engine

  2. Click the name of the cluster you want to inspect.

  3. Under Security, in the Confidential GKE Nodes field, verify that Confidential GKE Nodes is Enabled.

On node pools

To verify that your node pool is using Confidential GKE Nodes, run the following command:

gcloud beta container node-pools describe NODE_POOL_NAME \
    --cluster=CLUSTER_NAME

If Confidential GKE Nodes is enabled, the output is similar to the following:

confidentialNodes:
  enabled: true

On nodes

To validate the confidentiality of specific nodes, you can:

  1. Validate AMD SEV is enabled, or
  2. Validate Confidential VM using Cloud Monitoring.

Running applications on Confidential GKE Nodes

Google's approach to confidential computing is to enable an effortless lift and shift for existing applications. GKE workloads that you run today can run on Confidential GKE Nodes without code changes.

Optionally, if you want to declaratively express that your workloads must only run on clusters with Confidential GKE Nodes, you can use the cloud.google.com/gke-confidential-nodes node selector. Here's an example Pod spec that uses this selector:

apiVersion: v1
kind: Pod
spec:
  containers:
  - name: my-confidential-app
    image: us-docker.pkg.dev/myproject/myrepo/my-confidential-app
    nodeSelector: cloud.google.com/gke-confidential-nodes:true

Limitations

Consider the following limitations before enabling Confidential GKE Nodes on a new cluster:

  • Confidential GKE Nodes does not support PersistentVolumes backed by persistent disks.
  • Confidential GKE Nodes is not compatible with GPUs.
  • Confidential GKE Nodes is not compatible with sole tenant nodes.
  • Confidential GKE Nodes does not support local SSD in general, but only supports using ephemeral storage on local SSDs.
  • Only Container-Optimized OS nodes are supported. Ubuntu and Windows nodes are not supported.

Disable Confidential GKE Nodes

Disabling Confidential GKE Nodes only works for node pools that have enabled Confidential GKE Nodes. If the cluster is created with Confidential GKE Nodes, you cannot disable the feature. Run the following command to disable Confidential GKE Nodes on a node pool:

gcloud beta container node-pools update NODE_POOL_NAME \
    --cluster=CLUSTER_NAME \
    --no-enable-confidential-nodes

What's next