Machine provisioning and parameters are configured in the NodeGroup custom resource, where the instance class for the node group is specified (the cloudInstances.classReference parameter). For GCP, the instance class is a GCPInstanceClass custom resource that defines the machine parameters.

Enabling nested virtualization

To run virtual machine workloads (e.g., KVM-based VMs) inside GCP instances, enable nested virtualization.

Only specific machine types support nested virtualization. See the GCP documentation for the list of compatible types.

apiVersion: deckhouse.io/v1
kind: GCPInstanceClass
metadata:
  name: vm-nodes
spec:
  machineType: n2-standard-8
  nestedVirtualization: true

Adding CloudStatic nodes to the cluster

For virtual machines that will be nodes in the cluster, set a Network Tag matching the cluster prefix.

You can find the cluster prefix by running the following command:

d8 k get mc global -o jsonpath='{.spec.settings.prefix}{"\n"}'

If the value is empty, get it from the deprecated cloud.prefix parameter of ClusterConfiguration (the prefix has moved to the ModuleConfig global):

d8 k -n kube-system get secret d8-cluster-configuration -o json | jq -r '.data."cluster-configuration.yaml"' \
  | base64 -d | grep prefix

Preemptible nodes

Preemptible virtual machines in Google Cloud are called preemptible instances. To make a node group order them, set the preemptible parameter of the GCPInstanceClass resource to true.

How to create such nodes and how they behave is described in “How to create preemptible nodes in GCP?”.

Replacing the OS image

The OS image of the nodes is set by the image parameter of the GCPInstanceClass resource for CloudEphemeral nodes and in the instanceClass section of the GCPClusterConfiguration resource for CloudPermanent nodes and master nodes. To move the cluster nodes to a new image, follow the steps from “How do I replace the OS image in a cloud cluster?”.

Additional resources