Reference documentation and code samples for the Google Cloud Dataproc V1 Client class GkeNodeConfig.
Parameters that describe cluster nodes.
Generated from protobuf messagegoogle.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig
Namespace
Google \ Cloud \ Dataproc \ V1 \ GkeNodePoolConfig
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ machine_type
string
Optional. The name of a Compute Enginemachine type.
↳ local_ssd_count
int
Optional. The number of local SSD disks to attach to the node, which is limited by the maximum number of disks allowable per zone (seeAdding Local SSDs).
↳ preemptible
bool
Optional. Whether the nodes are created as legacypreemptible VM instances. Also seeSpotVMs, preemptible VM instances without a maximum lifetime. Legacy and Spot preemptible nodes cannot be used in a node pool with theCONTROLLERroleor in the DEFAULT node pool if the CONTROLLER role is not assigned (the DEFAULT node pool will assume the CONTROLLER role).
Optional.Minimum CPU platformto be used by this instance. The instance may be scheduled on the specified or a newer CPU platform. Specify the friendly names of CPU platforms, such as "Intel Haswell"` or Intel Sandy Bridge".
↳ boot_disk_kms_key
string
Optional. TheCustomer Managed Encryption Key (CMEK)used to encrypt the boot disk attached to each node in the node pool. Specify the key using the following format:projects/KEY_PROJECT_ID/locations/LOCATION/keyRings/RING_NAME/cryptoKeys/KEY_NAME.
↳ spot
bool
Optional. Whether the nodes are created asSpot VM instances. Spot VMs are the latest update to legacypreemptible VMs. Spot VMs do not have a maximum lifetime. Legacy and Spot preemptible nodes cannot be used in a node pool with theCONTROLLERroleor in the DEFAULT node pool if the CONTROLLER role is not assigned (the DEFAULT node pool will assume the CONTROLLER role).
getMachineType
Optional. The name of a Compute Enginemachine
type.
Returns
Type
Description
string
setMachineType
Optional. The name of a Compute Enginemachine
type.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getLocalSsdCount
Optional. The number of local SSD disks to attach to the node, which is
limited by the maximum number of disks allowable per zone (seeAdding
Local SSDs).
Returns
Type
Description
int
setLocalSsdCount
Optional. The number of local SSD disks to attach to the node, which is
limited by the maximum number of disks allowable per zone (seeAdding
Local SSDs).
Also seeSpotVMs, preemptible VM instances without a maximum lifetime. Legacy and Spot
preemptible nodes cannot be used in a node pool with theCONTROLLERroleor in the DEFAULT node pool if the CONTROLLER role is not assigned (the
DEFAULT node pool will assume the CONTROLLER role).
Also seeSpotVMs, preemptible VM instances without a maximum lifetime. Legacy and Spot
preemptible nodes cannot be used in a node pool with theCONTROLLERroleor in the DEFAULT node pool if the CONTROLLER role is not assigned (the
DEFAULT node pool will assume the CONTROLLER role).
Optional.Minimum CPU
platformto be used by this instance. The instance may be scheduled on the
specified or a newer CPU platform. Specify the friendly names of CPU
platforms, such as "Intel Haswell"` or Intel Sandy Bridge".
Returns
Type
Description
string
setMinCpuPlatform
Optional.Minimum CPU
platformto be used by this instance. The instance may be scheduled on the
specified or a newer CPU platform. Specify the friendly names of CPU
platforms, such as "Intel Haswell"` or Intel Sandy Bridge".
Spot VMs are the latest update to legacypreemptible
VMs.
Spot VMs do not have a maximum lifetime. Legacy and Spot preemptible
nodes cannot be used in a node pool with theCONTROLLERroleor in the DEFAULT node pool if the CONTROLLER role is not assigned (the
DEFAULT node pool will assume the CONTROLLER role).
Spot VMs are the latest update to legacypreemptible
VMs.
Spot VMs do not have a maximum lifetime. Legacy and Spot preemptible
nodes cannot be used in a node pool with theCONTROLLERroleor in the DEFAULT node pool if the CONTROLLER role is not assigned (the
DEFAULT node pool will assume the CONTROLLER role).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Dataproc V1 Client - Class GkeNodeConfig (3.14.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.14.0 (latest)](/php/docs/reference/cloud-dataproc/latest/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [3.13.4](/php/docs/reference/cloud-dataproc/3.13.4/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [3.12.0](/php/docs/reference/cloud-dataproc/3.12.0/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [3.11.0](/php/docs/reference/cloud-dataproc/3.11.0/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [3.10.1](/php/docs/reference/cloud-dataproc/3.10.1/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [3.9.0](/php/docs/reference/cloud-dataproc/3.9.0/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [3.8.1](/php/docs/reference/cloud-dataproc/3.8.1/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [3.7.1](/php/docs/reference/cloud-dataproc/3.7.1/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [3.6.1](/php/docs/reference/cloud-dataproc/3.6.1/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [3.5.1](/php/docs/reference/cloud-dataproc/3.5.1/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [3.4.0](/php/docs/reference/cloud-dataproc/3.4.0/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [3.3.0](/php/docs/reference/cloud-dataproc/3.3.0/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [3.2.2](/php/docs/reference/cloud-dataproc/3.2.2/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [2.6.1](/php/docs/reference/cloud-dataproc/2.6.1/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [2.5.0](/php/docs/reference/cloud-dataproc/2.5.0/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [2.3.0](/php/docs/reference/cloud-dataproc/2.3.0/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [2.2.3](/php/docs/reference/cloud-dataproc/2.2.3/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [2.1.0](/php/docs/reference/cloud-dataproc/2.1.0/V1.GkeNodePoolConfig.GkeNodeConfig)\n- [2.0.0](/php/docs/reference/cloud-dataproc/2.0.0/V1.GkeNodePoolConfig.GkeNodeConfig) \nReference documentation and code samples for the Google Cloud Dataproc V1 Client class GkeNodeConfig.\n\nParameters that describe cluster nodes.\n\nGenerated from protobuf message `google.cloud.dataproc.v1.GkeNodePoolConfig.GkeNodeConfig`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dataproc \\\\ V1 \\\\ GkeNodePoolConfig\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getMachineType\n\nOptional. The name of a Compute Engine [machine\ntype](https://cloud.google.com/compute/docs/machine-types).\n\n### setMachineType\n\nOptional. The name of a Compute Engine [machine\ntype](https://cloud.google.com/compute/docs/machine-types).\n\n### getLocalSsdCount\n\nOptional. The number of local SSD disks to attach to the node, which is\nlimited by the maximum number of disks allowable per zone (see [Adding\nLocal SSDs](https://cloud.google.com/compute/docs/disks/local-ssd)).\n\n### setLocalSsdCount\n\nOptional. The number of local SSD disks to attach to the node, which is\nlimited by the maximum number of disks allowable per zone (see [Adding\nLocal SSDs](https://cloud.google.com/compute/docs/disks/local-ssd)).\n\n### getPreemptible\n\nOptional. Whether the nodes are created as legacy [preemptible VM\ninstances](https://cloud.google.com/compute/docs/instances/preemptible).\n\nAlso see\n[Spot](/php/docs/reference/cloud-dataproc/latest/V1.GkeNodePoolConfig.GkeNodeConfig#_Google_Cloud_Dataproc_V1_GkeNodePoolConfig_GkeNodeConfig__getSpot__)\nVMs, preemptible VM instances without a maximum lifetime. Legacy and Spot\npreemptible nodes cannot be used in a node pool with the `CONTROLLER`\n[role](/dataproc/docs/reference/rest/v1/projects.regions.clusters#role)\nor in the DEFAULT node pool if the CONTROLLER role is not assigned (the\nDEFAULT node pool will assume the CONTROLLER role).\n\n### setPreemptible\n\nOptional. Whether the nodes are created as legacy [preemptible VM\ninstances](https://cloud.google.com/compute/docs/instances/preemptible).\n\nAlso see\n[Spot](/php/docs/reference/cloud-dataproc/latest/V1.GkeNodePoolConfig.GkeNodeConfig#_Google_Cloud_Dataproc_V1_GkeNodePoolConfig_GkeNodeConfig__getSpot__)\nVMs, preemptible VM instances without a maximum lifetime. Legacy and Spot\npreemptible nodes cannot be used in a node pool with the `CONTROLLER`\n[role](/dataproc/docs/reference/rest/v1/projects.regions.clusters#role)\nor in the DEFAULT node pool if the CONTROLLER role is not assigned (the\nDEFAULT node pool will assume the CONTROLLER role).\n\n### getAccelerators\n\nOptional. A list of [hardware\naccelerators](https://cloud.google.com/compute/docs/gpus) to attach to\neach node.\n\n### setAccelerators\n\nOptional. A list of [hardware\naccelerators](https://cloud.google.com/compute/docs/gpus) to attach to\neach node.\n\n### getMinCpuPlatform\n\nOptional. [Minimum CPU\nplatform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)\nto be used by this instance. The instance may be scheduled on the\nspecified or a newer CPU platform. Specify the friendly names of CPU\nplatforms, such as \"Intel Haswell\"\\` or Intel Sandy Bridge\".\n\n### setMinCpuPlatform\n\nOptional. [Minimum CPU\nplatform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)\nto be used by this instance. The instance may be scheduled on the\nspecified or a newer CPU platform. Specify the friendly names of CPU\nplatforms, such as \"Intel Haswell\"\\` or Intel Sandy Bridge\".\n\n### getBootDiskKmsKey\n\nOptional. The [Customer Managed Encryption Key (CMEK)](https://cloud.google.com/kubernetes-engine/docs/how-to/using-cmek)\nused to encrypt the boot disk attached to each node in the node pool.\n\nSpecify the key using the following format:\n`projects/`\u003cvar translate=\"no\"\u003eKEY_PROJECT_ID\u003c/var\u003e`/locations/`\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e`/keyRings/`\u003cvar translate=\"no\"\u003eRING_NAME\u003c/var\u003e`/cryptoKeys/`\u003cvar translate=\"no\"\u003eKEY_NAME\u003c/var\u003e.\n\n### setBootDiskKmsKey\n\nOptional. The [Customer Managed Encryption Key (CMEK)](https://cloud.google.com/kubernetes-engine/docs/how-to/using-cmek)\nused to encrypt the boot disk attached to each node in the node pool.\n\nSpecify the key using the following format:\n`projects/`\u003cvar translate=\"no\"\u003eKEY_PROJECT_ID\u003c/var\u003e`/locations/`\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e`/keyRings/`\u003cvar translate=\"no\"\u003eRING_NAME\u003c/var\u003e`/cryptoKeys/`\u003cvar translate=\"no\"\u003eKEY_NAME\u003c/var\u003e.\n\n### getSpot\n\nOptional. Whether the nodes are created as [Spot VM instances](https://cloud.google.com/compute/docs/instances/spot).\n\nSpot VMs are the latest update to legacy\n[preemptible\nVMs](/php/docs/reference/cloud-dataproc/latest/V1.GkeNodePoolConfig.GkeNodeConfig#_Google_Cloud_Dataproc_V1_GkeNodePoolConfig_GkeNodeConfig__getPreemptible__).\nSpot VMs do not have a maximum lifetime. Legacy and Spot preemptible\nnodes cannot be used in a node pool with the `CONTROLLER`\n[role](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.clusters#role)\nor in the DEFAULT node pool if the CONTROLLER role is not assigned (the\nDEFAULT node pool will assume the CONTROLLER role).\n\n### setSpot\n\nOptional. Whether the nodes are created as [Spot VM instances](https://cloud.google.com/compute/docs/instances/spot).\n\nSpot VMs are the latest update to legacy\n[preemptible\nVMs](/php/docs/reference/cloud-dataproc/latest/V1.GkeNodePoolConfig.GkeNodeConfig#_Google_Cloud_Dataproc_V1_GkeNodePoolConfig_GkeNodeConfig__getPreemptible__).\nSpot VMs do not have a maximum lifetime. Legacy and Spot preemptible\nnodes cannot be used in a node pool with the `CONTROLLER`\n[role](https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.clusters#role)\nor in the DEFAULT node pool if the CONTROLLER role is not assigned (the\nDEFAULT node pool will assume the CONTROLLER role)."]]