KubeletConfig Class

  • java.lang.Object
    • com.azure.resourcemanager.containerservice.models.KubeletConfig

Implements

public final class KubeletConfig
implements JsonSerializable<KubeletConfig>

Kubelet configurations of agent nodes. See [AKS custom node configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details.

Constructor Summary

Constructor Description
KubeletConfig()

Creates an instance of KubeletConfig class.

Method Summary

Modifier and Type Method and Description
List<String> allowedUnsafeSysctls()

Get the allowedUnsafeSysctls property: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`).

Integer containerLogMaxFiles()

Get the containerLogMaxFiles property: The maximum number of container log files that can be present for a container.

Integer containerLogMaxSizeMB()

Get the containerLogMaxSizeMB property: The maximum size (e.g.

Boolean cpuCfsQuota()

Get the cpuCfsQuota property: The default is true.

String cpuCfsQuotaPeriod()

Get the cpuCfsQuotaPeriod property: The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix.

String cpuManagerPolicy()

Get the cpuManagerPolicy property: The default is 'none'.

Boolean failSwapOn()

Get the failSwapOn property: If set to true it will make the Kubelet fail to start if swap is enabled on the node.

static KubeletConfig fromJson(JsonReader jsonReader)

Reads an instance of KubeletConfig from the JsonReader.

Integer imageGcHighThreshold()

Get the imageGcHighThreshold property: To disable image garbage collection, set to 100.

Integer imageGcLowThreshold()

Get the imageGcLowThreshold property: This cannot be set higher than imageGcHighThreshold.

Integer podMaxPids()

Get the podMaxPids property: The maximum number of processes per pod.

JsonWriter toJson(JsonWriter jsonWriter)
String topologyManagerPolicy()

Get the topologyManagerPolicy property: For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager).

void validate()

Validates the instance.

KubeletConfig withAllowedUnsafeSysctls(List<String> allowedUnsafeSysctls)

Set the allowedUnsafeSysctls property: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`).

KubeletConfig withContainerLogMaxFiles(Integer containerLogMaxFiles)

Set the containerLogMaxFiles property: The maximum number of container log files that can be present for a container.

KubeletConfig withContainerLogMaxSizeMB(Integer containerLogMaxSizeMB)

Set the containerLogMaxSizeMB property: The maximum size (e.g.

KubeletConfig withCpuCfsQuota(Boolean cpuCfsQuota)

Set the cpuCfsQuota property: The default is true.

KubeletConfig withCpuCfsQuotaPeriod(String cpuCfsQuotaPeriod)

Set the cpuCfsQuotaPeriod property: The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix.

KubeletConfig withCpuManagerPolicy(String cpuManagerPolicy)

Set the cpuManagerPolicy property: The default is 'none'.

KubeletConfig withFailSwapOn(Boolean failSwapOn)

Set the failSwapOn property: If set to true it will make the Kubelet fail to start if swap is enabled on the node.

KubeletConfig withImageGcHighThreshold(Integer imageGcHighThreshold)

Set the imageGcHighThreshold property: To disable image garbage collection, set to 100.

KubeletConfig withImageGcLowThreshold(Integer imageGcLowThreshold)

Set the imageGcLowThreshold property: This cannot be set higher than imageGcHighThreshold.

KubeletConfig withPodMaxPids(Integer podMaxPids)

Set the podMaxPids property: The maximum number of processes per pod.

KubeletConfig withTopologyManagerPolicy(String topologyManagerPolicy)

Set the topologyManagerPolicy property: For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager).

Methods inherited from java.lang.Object

Constructor Details

KubeletConfig

public KubeletConfig()

Creates an instance of KubeletConfig class.

Method Details

allowedUnsafeSysctls

public List allowedUnsafeSysctls()

Get the allowedUnsafeSysctls property: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`).

Returns:

the allowedUnsafeSysctls value.

containerLogMaxFiles

public Integer containerLogMaxFiles()

Get the containerLogMaxFiles property: The maximum number of container log files that can be present for a container. The number must be \u2265 2.

Returns:

the containerLogMaxFiles value.

containerLogMaxSizeMB

public Integer containerLogMaxSizeMB()

Get the containerLogMaxSizeMB property: The maximum size (e.g. 10Mi) of container log file before it is rotated.

Returns:

the containerLogMaxSizeMB value.

cpuCfsQuota

public Boolean cpuCfsQuota()

Get the cpuCfsQuota property: The default is true.

Returns:

the cpuCfsQuota value.

cpuCfsQuotaPeriod

public String cpuCfsQuotaPeriod()

Get the cpuCfsQuotaPeriod property: The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'.

Returns:

the cpuCfsQuotaPeriod value.

cpuManagerPolicy

public String cpuManagerPolicy()

Get the cpuManagerPolicy property: The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/\#cpu-management-policies) for more information. Allowed values are 'none' and 'static'.

Returns:

the cpuManagerPolicy value.

failSwapOn

public Boolean failSwapOn()

Get the failSwapOn property: If set to true it will make the Kubelet fail to start if swap is enabled on the node.

Returns:

the failSwapOn value.

fromJson

public static KubeletConfig fromJson(JsonReader jsonReader)

Reads an instance of KubeletConfig from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of KubeletConfig if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the KubeletConfig.

imageGcHighThreshold

public Integer imageGcHighThreshold()

Get the imageGcHighThreshold property: To disable image garbage collection, set to 100. The default is 85%.

Returns:

the imageGcHighThreshold value.

imageGcLowThreshold

public Integer imageGcLowThreshold()

Get the imageGcLowThreshold property: This cannot be set higher than imageGcHighThreshold. The default is 80%.

Returns:

the imageGcLowThreshold value.

podMaxPids

public Integer podMaxPids()

Get the podMaxPids property: The maximum number of processes per pod.

Returns:

the podMaxPids value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

topologyManagerPolicy

public String topologyManagerPolicy()

Get the topologyManagerPolicy property: For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'.

Returns:

the topologyManagerPolicy value.

validate

public void validate()

Validates the instance.

withAllowedUnsafeSysctls

public KubeletConfig withAllowedUnsafeSysctls(List allowedUnsafeSysctls)

Set the allowedUnsafeSysctls property: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`).

Parameters:

allowedUnsafeSysctls - the allowedUnsafeSysctls value to set.

Returns:

the KubeletConfig object itself.

withContainerLogMaxFiles

public KubeletConfig withContainerLogMaxFiles(Integer containerLogMaxFiles)

Set the containerLogMaxFiles property: The maximum number of container log files that can be present for a container. The number must be \u2265 2.

Parameters:

containerLogMaxFiles - the containerLogMaxFiles value to set.

Returns:

the KubeletConfig object itself.

withContainerLogMaxSizeMB

public KubeletConfig withContainerLogMaxSizeMB(Integer containerLogMaxSizeMB)

Set the containerLogMaxSizeMB property: The maximum size (e.g. 10Mi) of container log file before it is rotated.

Parameters:

containerLogMaxSizeMB - the containerLogMaxSizeMB value to set.

Returns:

the KubeletConfig object itself.

withCpuCfsQuota

public KubeletConfig withCpuCfsQuota(Boolean cpuCfsQuota)

Set the cpuCfsQuota property: The default is true.

Parameters:

cpuCfsQuota - the cpuCfsQuota value to set.

Returns:

the KubeletConfig object itself.

withCpuCfsQuotaPeriod

public KubeletConfig withCpuCfsQuotaPeriod(String cpuCfsQuotaPeriod)

Set the cpuCfsQuotaPeriod property: The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'.

Parameters:

cpuCfsQuotaPeriod - the cpuCfsQuotaPeriod value to set.

Returns:

the KubeletConfig object itself.

withCpuManagerPolicy

public KubeletConfig withCpuManagerPolicy(String cpuManagerPolicy)

Set the cpuManagerPolicy property: The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/\#cpu-management-policies) for more information. Allowed values are 'none' and 'static'.

Parameters:

cpuManagerPolicy - the cpuManagerPolicy value to set.

Returns:

the KubeletConfig object itself.

withFailSwapOn

public KubeletConfig withFailSwapOn(Boolean failSwapOn)

Set the failSwapOn property: If set to true it will make the Kubelet fail to start if swap is enabled on the node.

Parameters:

failSwapOn - the failSwapOn value to set.

Returns:

the KubeletConfig object itself.

withImageGcHighThreshold

public KubeletConfig withImageGcHighThreshold(Integer imageGcHighThreshold)

Set the imageGcHighThreshold property: To disable image garbage collection, set to 100. The default is 85%.

Parameters:

imageGcHighThreshold - the imageGcHighThreshold value to set.

Returns:

the KubeletConfig object itself.

withImageGcLowThreshold

public KubeletConfig withImageGcLowThreshold(Integer imageGcLowThreshold)

Set the imageGcLowThreshold property: This cannot be set higher than imageGcHighThreshold. The default is 80%.

Parameters:

imageGcLowThreshold - the imageGcLowThreshold value to set.

Returns:

the KubeletConfig object itself.

withPodMaxPids

public KubeletConfig withPodMaxPids(Integer podMaxPids)

Set the podMaxPids property: The maximum number of processes per pod.

Parameters:

podMaxPids - the podMaxPids value to set.

Returns:

the KubeletConfig object itself.

withTopologyManagerPolicy

public KubeletConfig withTopologyManagerPolicy(String topologyManagerPolicy)

Set the topologyManagerPolicy property: For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'.

Parameters:

topologyManagerPolicy - the topologyManagerPolicy value to set.

Returns:

the KubeletConfig object itself.

Applies to