apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
...
spec:
template:
spec:
providerSpec:
value:
disks:
type: pd-ssd (1)
You can enable or change the configuration of features for your control plane machines by editing values in the control plane machine set specification.
When you save an update to the control plane machine set, the Control Plane Machine Set Operator updates the control plane machines according to your configured update strategy. For more information, see "Updating the control plane configuration".
You can configure the type of persistent disk that a machine set deploys machines on by editing the machine set YAML file.
For more information about persistent disk types, compatibility, regional availability, and limitations, see the Google Cloud Compute Engine documentation about persistent disks.
In a text editor, open the YAML file for an existing machine set or create a new one.
Edit the following line under the providerSpec field:
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
...
spec:
template:
spec:
providerSpec:
value:
disks:
type: pd-ssd (1)
| 1 | Control plane nodes must use the pd-ssd disk type. |
Using the Google Cloud console, review the details for a machine deployed by the machine set and verify that the Type field matches the configured disk type.
By editing the machine set YAML file, you can configure the Confidential VM options that a machine set uses for machines that it deploys.
For more information about Confidential VM features, functions, and compatibility, see the Google Cloud Compute Engine documentation about Confidential VM.
|
Confidential VMs are currently not supported on 64-bit ARM architectures. |
|
OKD 4.18 does not support some Confidential Compute features, such as Confidential VMs with AMD Secure Encrypted Virtualization Secure Nested Paging (SEV-SNP). |
In a text editor, open the YAML file for an existing machine set or create a new one.
Edit the following section under the providerSpec field:
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
...
spec:
template:
spec:
providerSpec:
value:
confidentialCompute: Enabled (1)
onHostMaintenance: Terminate (2)
machineType: n2d-standard-8 (3)
...
| 1 | Specify whether Confidential VM is enabled. Valid values are Disabled or Enabled. |
| 2 | Specify the behavior of the VM during a host maintenance event, such as a hardware or software update. For a machine that uses Confidential VM, this value must be set to Terminate, which stops the VM. Confidential VM does not support live VM migration. |
| 3 | Specify a machine type that supports Confidential VM. Confidential VM supports the N2D and C2D series of machine types. |
On the Google Cloud console, review the details for a machine deployed by the machine set and verify that the Confidential VM options match the values that you configured.
By editing the machine set YAML file, you can configure the Shielded VM options that a machine set uses for machines that it deploys.
For more information about Shielded VM features and functionality, see the Google Cloud Compute Engine documentation about Shielded VM.
In a text editor, open the YAML file for an existing machine set or create a new one.
Edit the following section under the providerSpec field:
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
# ...
spec:
template:
spec:
providerSpec:
value:
shieldedInstanceConfig: (1)
integrityMonitoring: Enabled (2)
secureBoot: Disabled (3)
virtualizedTrustedPlatformModule: Enabled (4)
# ...
| 1 | In this section, specify any Shielded VM options that you want. | ||
| 2 | Specify whether integrity monitoring is enabled. Valid values are Disabled or Enabled.
|
||
| 3 | Specify whether UEFI Secure Boot is enabled. Valid values are Disabled or Enabled. |
||
| 4 | Specify whether vTPM is enabled. Valid values are Disabled or Enabled. |
Using the Google Cloud console, review the details for a machine deployed by the machine set and verify that the Shielded VM options match the values that you configured.
Google Cloud Compute Engine allows users to supply an encryption key to encrypt data on disks at rest. The key is used to encrypt the data encryption key, not to encrypt the customer’s data. By default, Compute Engine encrypts this data by using Compute Engine keys.
You can enable encryption with a customer-managed key in clusters that use the Machine API. You must first create a KMS key and assign the correct permissions to a service account. The KMS key name, key ring name, and location are required to allow a service account to use your key.
|
If you do not want to use a dedicated service account for the KMS encryption, the Compute Engine default service account is used instead. You must grant the default service account permission to access the keys if you do not use a dedicated service account. The Compute Engine default service account name follows the |
To allow a specific service account to use your KMS key and to grant the service account the correct IAM role, run the following command with your KMS key name, key ring name, and location:
$ gcloud kms keys add-iam-policy-binding <key_name> \
--keyring <key_ring_name> \
--location <key_ring_location> \
--member "serviceAccount:service-<project_number>@compute-system.iam.gserviceaccount.com” \
--role roles/cloudkms.cryptoKeyEncrypterDecrypter
Configure the encryption key under the providerSpec field in your machine set YAML file. For example:
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
...
spec:
template:
spec:
providerSpec:
value:
disks:
- type:
encryptionKey:
kmsKey:
name: machine-encryption-key (1)
keyRing: openshift-encrpytion-ring (2)
location: global (3)
projectID: openshift-gcp-project (4)
kmsKeyServiceAccount: openshift-service-account@openshift-gcp-project.iam.gserviceaccount.com (5)
| 1 | The name of the customer-managed encryption key that is used for the disk encryption. |
| 2 | The name of the KMS key ring that the KMS key belongs to. |
| 3 | The Google Cloud location in which the KMS key ring exists. |
| 4 | Optional: The ID of the project in which the KMS key ring exists. If a project ID is not set, the machine set projectID in which the machine set was created is used. |
| 5 | Optional: The service account that is used for the encryption request for the given KMS key. If a service account is not set, the Compute Engine default service account is used. |
When a new machine is created by using the updated providerSpec object configuration, the disk encryption key is encrypted with the KMS key.