# Google Cloud Container V1 Client - Class LinuxNodeConfig (2.10.0)

2.10.0 (latest) 2.9.0 2.8.1 2.7.0 2.6.1 2.5.0 2.4.0 2.3.4 2.2.1 2.1.0 2.0.0 1.33.0 1.32.0 1.31.0 1.30.3 1.24.0 1.23.0 1.22.0 1.21.1 1.20.0 1.19.0 1.18.0 1.17.1 1.16.0 1.15.0 1.14.0 1.13.1 1.12.1 1.10.3 1.9.1 Reference documentation and code samples for the Google Cloud Container V1 Client class LinuxNodeConfig.

Parameters that can be configured on Linux nodes.

Generated from protobuf message `google.container.v1.LinuxNodeConfig`

## Namespace

Google \\ Cloud \\ Container \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ sysctls` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` The Linux kernel parameters to be applied to the nodes and all pods running on the nodes. The following parameters are supported. net.core.busy_poll net.core.busy_read net.core.netdev_max_backlog net.core.rmem_max net.core.rmem_default net.core.wmem_default net.core.wmem_max net.core.optmem_max net.core.somaxconn net.ipv4.neigh.default.gc_thresh1 net.ipv4.neigh.default.gc_thresh2 net.ipv4.neigh.default.gc_thresh3 net.ipv4.tcp_rmem net.ipv4.tcp_wmem net.ipv4.tcp_tw_reuse net.ipv4.tcp_mtu_probing net.ipv4.tcp_max_orphans net.ipv4.tcp_max_tw_buckets net.ipv4.tcp_syn_retries net.ipv4.tcp_ecn net.ipv4.tcp_congestion_control net.netfilter.nf_conntrack_max net.netfilter.nf_conntrack_buckets net.netfilter.nf_conntrack_tcp_timeout_close_wait net.netfilter.nf_conntrack_tcp_timeout_time_wait net.netfilter.nf_conntrack_tcp_timeout_established net.netfilter.nf_conntrack_acct kernel.keys.maxkeys kernel.keys.maxbytes kernel.shmmni kernel.shmmax kernel.shmall kernel.perf_event_paranoid kernel.sched_rt_runtime_us kernel.softlockup_panic kernel.yama.ptrace_scope kernel.kptr_restrict kernel.dmesg_restrict kernel.sysrq fs.aio-max-nr fs.file-max fs.inotify.max_user_instances fs.inotify.max_user_watches fs.nr_open vm.dirty_background_ratio vm.dirty_background_bytes vm.dirty_expire_centisecs vm.dirty_ratio vm.dirty_bytes vm.dirty_writeback_centisecs vm.max_map_count vm.overcommit_memory vm.overcommit_ratio vm.vfs_cache_pressure vm.swappiness vm.watermark_scale_factor vm.min_free_kbytes |
| `↳ cgroup_mode` | `int` cgroup_mode specifies the cgroup mode to be used on the node. |
| `↳ hugepages` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.HugepagesConfig` Optional. Amounts for 2M and 1G hugepages |
| `↳ transparent_hugepage_enabled` | `int` Optional. Transparent hugepage support for anonymous memory can be entirely disabled (mostly for debugging purposes) or only enabled inside MADV_HUGEPAGE regions (to avoid the risk of consuming more memory resources) or enabled system wide. See <https://docs.kernel.org/admin-guide/mm/transhuge.html> for more details. |
| `↳ transparent_hugepage_defrag` | `int` Optional. Defines the transparent hugepage defrag configuration on the node. VM hugepage allocation can be managed by either limiting defragmentation for delayed allocation or skipping it entirely for immediate allocation only. See <https://docs.kernel.org/admin-guide/mm/transhuge.html> for more details. |
| `↳ custom_node_init` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.CustomNodeInit` Optional. Allow users to run arbitrary bash script or container on the node. |
| `↳ swap_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.SwapConfig` Optional. Enables and configures swap space on nodes. If omitted, swap is disabled. |
| `↳ node_kernel_module_loading` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.NodeKernelModuleLoading` Optional. Configuration for kernel module loading on nodes. When enabled, the node pool will be provisioned with a Container-Optimized OS image that enforces kernel module signature verification. |
| `↳ accurate_time_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.AccurateTimeConfig` Optional. The accurate time configuration for the node pool. |

### getSysctls

The Linux kernel parameters to be applied to the nodes and all pods running
on the nodes.

The following parameters are supported.
net.core.busy_poll
net.core.busy_read
net.core.netdev_max_backlog
net.core.rmem_max
net.core.rmem_default
net.core.wmem_default
net.core.wmem_max
net.core.optmem_max
net.core.somaxconn
net.ipv4.neigh.default.gc_thresh1
net.ipv4.neigh.default.gc_thresh2
net.ipv4.neigh.default.gc_thresh3
net.ipv4.tcp_rmem
net.ipv4.tcp_wmem
net.ipv4.tcp_tw_reuse
net.ipv4.tcp_mtu_probing
net.ipv4.tcp_max_orphans
net.ipv4.tcp_max_tw_buckets
net.ipv4.tcp_syn_retries
net.ipv4.tcp_ecn
net.ipv4.tcp_congestion_control
net.netfilter.nf_conntrack_max
net.netfilter.nf_conntrack_buckets
net.netfilter.nf_conntrack_tcp_timeout_close_wait
net.netfilter.nf_conntrack_tcp_timeout_time_wait
net.netfilter.nf_conntrack_tcp_timeout_established
net.netfilter.nf_conntrack_acct
kernel.keys.maxkeys
kernel.keys.maxbytes
kernel.shmmni
kernel.shmmax
kernel.shmall
kernel.perf_event_paranoid
kernel.sched_rt_runtime_us
kernel.softlockup_panic
kernel.yama.ptrace_scope
kernel.kptr_restrict
kernel.dmesg_restrict
kernel.sysrq
fs.aio-max-nr
fs.file-max
fs.inotify.max_user_instances
fs.inotify.max_user_watches
fs.nr_open
vm.dirty_background_ratio
vm.dirty_background_bytes
vm.dirty_expire_centisecs
vm.dirty_ratio
vm.dirty_bytes
vm.dirty_writeback_centisecs
vm.max_map_count
vm.overcommit_memory
vm.overcommit_ratio
vm.vfs_cache_pressure
vm.swappiness
vm.watermark_scale_factor
vm.min_free_kbytes

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setSysctls

The Linux kernel parameters to be applied to the nodes and all pods running
on the nodes.

The following parameters are supported.
net.core.busy_poll
net.core.busy_read
net.core.netdev_max_backlog
net.core.rmem_max
net.core.rmem_default
net.core.wmem_default
net.core.wmem_max
net.core.optmem_max
net.core.somaxconn
net.ipv4.neigh.default.gc_thresh1
net.ipv4.neigh.default.gc_thresh2
net.ipv4.neigh.default.gc_thresh3
net.ipv4.tcp_rmem
net.ipv4.tcp_wmem
net.ipv4.tcp_tw_reuse
net.ipv4.tcp_mtu_probing
net.ipv4.tcp_max_orphans
net.ipv4.tcp_max_tw_buckets
net.ipv4.tcp_syn_retries
net.ipv4.tcp_ecn
net.ipv4.tcp_congestion_control
net.netfilter.nf_conntrack_max
net.netfilter.nf_conntrack_buckets
net.netfilter.nf_conntrack_tcp_timeout_close_wait
net.netfilter.nf_conntrack_tcp_timeout_time_wait
net.netfilter.nf_conntrack_tcp_timeout_established
net.netfilter.nf_conntrack_acct
kernel.keys.maxkeys
kernel.keys.maxbytes
kernel.shmmni
kernel.shmmax
kernel.shmall
kernel.perf_event_paranoid
kernel.sched_rt_runtime_us
kernel.softlockup_panic
kernel.yama.ptrace_scope
kernel.kptr_restrict
kernel.dmesg_restrict
kernel.sysrq
fs.aio-max-nr
fs.file-max
fs.inotify.max_user_instances
fs.inotify.max_user_watches
fs.nr_open
vm.dirty_background_ratio
vm.dirty_background_bytes
vm.dirty_expire_centisecs
vm.dirty_ratio
vm.dirty_bytes
vm.dirty_writeback_centisecs
vm.max_map_count
vm.overcommit_memory
vm.overcommit_ratio
vm.vfs_cache_pressure
vm.swappiness
vm.watermark_scale_factor
vm.min_free_kbytes

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCgroupMode

cgroup_mode specifies the cgroup mode to be used on the node.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [CgroupMode](https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.CgroupMode). |

### setCgroupMode

cgroup_mode specifies the cgroup mode to be used on the node.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [CgroupMode](https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.CgroupMode). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getHugepages

Optional. Amounts for 2M and 1G hugepages

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.HugepagesConfig|null` |   |

### hasHugepages

### clearHugepages

### setHugepages

Optional. Amounts for 2M and 1G hugepages

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.HugepagesConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTransparentHugepageEnabled

Optional. Transparent hugepage support for anonymous memory can be entirely
disabled (mostly for debugging purposes) or only enabled inside
MADV_HUGEPAGE regions (to avoid the risk of consuming more memory
resources) or enabled system wide.

See <https://docs.kernel.org/admin-guide/mm/transhuge.html>
for more details.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [TransparentHugepageEnabled](https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.TransparentHugepageEnabled). |

### setTransparentHugepageEnabled

Optional. Transparent hugepage support for anonymous memory can be entirely
disabled (mostly for debugging purposes) or only enabled inside
MADV_HUGEPAGE regions (to avoid the risk of consuming more memory
resources) or enabled system wide.

See <https://docs.kernel.org/admin-guide/mm/transhuge.html>
for more details.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [TransparentHugepageEnabled](https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.TransparentHugepageEnabled). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTransparentHugepageDefrag

Optional. Defines the transparent hugepage defrag configuration on the
node. VM hugepage allocation can be managed by either limiting
defragmentation for delayed allocation or skipping it entirely for
immediate allocation only.

See <https://docs.kernel.org/admin-guide/mm/transhuge.html>
for more details.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [TransparentHugepageDefrag](https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.TransparentHugepageDefrag). |

### setTransparentHugepageDefrag

Optional. Defines the transparent hugepage defrag configuration on the
node. VM hugepage allocation can be managed by either limiting
defragmentation for delayed allocation or skipping it entirely for
immediate allocation only.

See <https://docs.kernel.org/admin-guide/mm/transhuge.html>
for more details.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [TransparentHugepageDefrag](https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.TransparentHugepageDefrag). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCustomNodeInit

Optional. Allow users to run arbitrary bash script or container on the
node.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.CustomNodeInit|null` |   |

### hasCustomNodeInit

### clearCustomNodeInit

### setCustomNodeInit

Optional. Allow users to run arbitrary bash script or container on the
node.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.CustomNodeInit` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSwapConfig

Optional. Enables and configures swap space on nodes.

If omitted, swap is disabled.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.SwapConfig|null` |   |

### hasSwapConfig

### clearSwapConfig

### setSwapConfig

Optional. Enables and configures swap space on nodes.

If omitted, swap is disabled.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.SwapConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getNodeKernelModuleLoading

Optional. Configuration for kernel module loading on nodes.

When enabled, the node pool will be provisioned with a Container-Optimized
OS image that enforces kernel module signature verification.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.NodeKernelModuleLoading|null` |   |

### hasNodeKernelModuleLoading

### clearNodeKernelModuleLoading

### setNodeKernelModuleLoading

Optional. Configuration for kernel module loading on nodes.

When enabled, the node pool will be provisioned with a Container-Optimized
OS image that enforces kernel module signature verification.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.NodeKernelModuleLoading` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAccurateTimeConfig

Optional. The accurate time configuration for the node pool.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.AccurateTimeConfig|null` |   |

### hasAccurateTimeConfig

### clearAccurateTimeConfig

### setAccurateTimeConfig

Optional. The accurate time configuration for the node pool.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.LinuxNodeConfig.AccurateTimeConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |