KubeadmConfigTemplate [bootstrap.cluster.x-k8s.io/v1beta1]

描述
KubeadmConfigTemplate is the Schema for the kubeadmconfigtemplates API.
类型
object

规格

属性类型描述
apiVersionstring

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kindstring

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadataObjectMeta

ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

specobject

spec is the desired state of KubeadmConfigTemplate.

.spec

描述
spec is the desired state of KubeadmConfigTemplate.
类型
object
必填
template
属性类型描述
templateobject

template defines the desired state of KubeadmConfigTemplate.

.spec.template

描述
template defines the desired state of KubeadmConfigTemplate.
类型
object
属性类型描述
metadataObjectMeta

metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

specobject

spec is the desired state of KubeadmConfig.

.spec.template.spec

描述
spec is the desired state of KubeadmConfig.
类型
object
属性类型描述
bootCommandsarray

bootCommands specifies extra commands to run very early in the boot process via the cloud-init bootcmd module. bootcmd will run on every boot, 'cloud-init-per' command can be used to make bootcmd run exactly once. This is typically run in the cloud-init.service systemd unit. This has no effect in Ignition.

clusterConfigurationobject

clusterConfiguration along with InitConfiguration are the configurations necessary for the init command

diskSetupobject

diskSetup specifies options for the creation of partition tables and file systems on devices.

filesarray

files specifies extra files to be passed to user_data upon creation.

formatstring

format specifies the output format of the bootstrap data

ignitionobject

ignition contains Ignition specific configuration.

initConfigurationobject

initConfiguration along with ClusterConfiguration are the configurations necessary for the init command

joinConfigurationobject

joinConfiguration is the kubeadm configuration for the join command

mountsarray

mounts specifies a list of mount points to be setup.

ntpobject

ntp specifies NTP configuration

postKubeadmCommandsarray

postKubeadmCommands specifies extra commands to run after kubeadm runs. With cloud-init, this is appended to the runcmd module configuration, and is typically executed in the cloud-final.service systemd unit. In Ignition, this is appended to /etc/kubeadm.sh.

preKubeadmCommandsarray

preKubeadmCommands specifies extra commands to run before kubeadm runs. With cloud-init, this is prepended to the runcmd module configuration, and is typically executed in the cloud-final.service systemd unit. In Ignition, this is prepended to /etc/kubeadm.sh.

useExperimentalRetryJoinboolean

useExperimentalRetryJoin replaces a basic kubeadm command with a shell script with retries for joins.

This is meant to be an experimental temporary workaround on some environments where joins fail due to timing (and other issues). The long term goal is to add retries to kubeadm proper and use that functionality.

This will add about 40KB to userdata

For more information, refer to https://github.com/kubernetes-sigs/cluster-api/pull/2763#discussion_r397306055.

Deprecated: This experimental fix is no longer needed and this field will be removed in a future release. When removing also remove from staticcheck exclude-rules for SA1019 in golangci.yml

usersarray

users specifies extra users to add

verbosityinteger

verbosity is the number for the kubeadm log level verbosity. It overrides the --v flag in kubeadm commands.

.spec.template.spec.bootCommands

描述
bootCommands specifies extra commands to run very early in the boot process via the cloud-init bootcmd module. bootcmd will run on every boot, 'cloud-init-per' command can be used to make bootcmd run exactly once. This is typically run in the cloud-init.service systemd unit. This has no effect in Ignition.
类型
array

.spec.template.spec.bootCommands[]

类型
string

.spec.template.spec.clusterConfiguration

描述
clusterConfiguration along with InitConfiguration are the configurations necessary for the init command
类型
object
属性类型描述
apiServerobject

apiServer contains extra settings for the API server control plane component

apiVersionstring

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

certificatesDirstring

certificatesDir specifies where to store or look for all required certificates. NB: if not provided, this will default to /etc/kubernetes/pki

clusterNamestring

clusterName is the cluster name

controlPlaneEndpointstring

controlPlaneEndpoint sets a stable IP address or DNS name for the control plane; it can be a valid IP address or a RFC-1123 DNS subdomain, both with optional TCP port. In case the ControlPlaneEndpoint is not specified, the AdvertiseAddress + BindPort are used; in case the ControlPlaneEndpoint is specified but without a TCP port, the BindPort is used. Possible usages are: e.g. In a cluster with more than one control plane instances, this field should be assigned the address of the external load balancer in front of the control plane instances. e.g. in environments with enforced node recycling, the ControlPlaneEndpoint could be used for assigning a stable DNS to the control plane. NB: This value defaults to the first value in the Cluster object status.apiEndpoints array.

controllerManagerobject

controllerManager contains extra settings for the controller manager control plane component

dnsobject

dns defines the options for the DNS add-on installed in the cluster.

etcdobject

etcd holds configuration for etcd. NB: This value defaults to a Local (stacked) etcd

featureGatesobject

featureGates enabled by the user.

imageRepositorystring

imageRepository sets the container registry to pull images from.

  • If not set, the default registry of kubeadm will be used, i.e.
    • registry.k8s.io (new registry): >= v1.22.17, >= v1.23.15, >= v1.24.9, >= v1.25.0
    • k8s.gcr.io (old registry): all older versions Please note that when imageRepository is not set we don't allow upgrades to versions >= v1.22.0 which use the old registry (k8s.gcr.io). Please use a newer patch version with the new registry instead (i.e. >= v1.22.17,

    = v1.23.15, >= v1.24.9, >= v1.25.0).

  • If the version is a CI build (kubernetes version starts with ci/ or ci-cross/) gcr.io/k8s-staging-ci-images will be used as a default for control plane components and for kube-proxy, while registry.k8s.io will be used for all the other images.
kindstring

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

kubernetesVersionstring

kubernetesVersion is the target version of the control plane. NB: This value defaults to the Machine object spec.version

networkingobject

networking holds configuration for the networking topology of the cluster. NB: This value defaults to the Cluster object spec.clusterNetwork.

schedulerobject

scheduler contains extra settings for the scheduler control plane component

.spec.template.spec.clusterConfiguration.apiServer

描述
apiServer contains extra settings for the API server control plane component
类型
object
属性类型描述
certSANsarray

certSANs sets extra Subject Alternative Names for the API Server signing cert.

extraArgsobject

extraArgs is an extra set of flags to pass to the control plane component.

extraEnvsarray

extraEnvs is an extra set of environment variables to pass to the control plane component. Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. This option takes effect only on Kubernetes >=1.31.0.

extraVolumesarray

extraVolumes is an extra set of host volumes, mounted to the control plane component.

timeoutForControlPlanestring

timeoutForControlPlane controls the timeout that we use for API server to appear

.spec.template.spec.clusterConfiguration.apiServer.certSANs

描述
certSANs sets extra Subject Alternative Names for the API Server signing cert.
类型
array

.spec.template.spec.clusterConfiguration.apiServer.certSANs[]

类型
string

.spec.template.spec.clusterConfiguration.apiServer.extraArgs

描述
extraArgs is an extra set of flags to pass to the control plane component.
类型
object

.spec.template.spec.clusterConfiguration.apiServer.extraEnvs

描述
extraEnvs is an extra set of environment variables to pass to the control plane component. Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. This option takes effect only on Kubernetes >=1.31.0.
类型
array

.spec.template.spec.clusterConfiguration.apiServer.extraEnvs[]

描述
EnvVar represents an environment variable present in a Container.
类型
object
必填
name
属性类型描述
namestring

Name of the environment variable. Must be a C_IDENTIFIER.

valuestring

Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".

valueFromobject

Source for the environment variable's value. Cannot be used if value is not empty.

.spec.template.spec.clusterConfiguration.apiServer.extraEnvs[].valueFrom

描述
Source for the environment variable's value. Cannot be used if value is not empty.
类型
object
属性类型描述
configMapKeyRefobject

Selects a key of a ConfigMap.

fieldRefobject

Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels['<KEY>'], metadata.annotations['<KEY>'], spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.

resourceFieldRefobject

Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.

secretKeyRefobject

Selects a key of a secret in the pod's namespace

.spec.template.spec.clusterConfiguration.apiServer.extraEnvs[].valueFrom.configMapKeyRef

描述
Selects a key of a ConfigMap.
类型
object
必填
key
属性类型描述
keystring

The key to select.

namestring

Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

optionalboolean

Specify whether the ConfigMap or its key must be defined

.spec.template.spec.clusterConfiguration.apiServer.extraEnvs[].valueFrom.fieldRef

描述
Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
类型
object
必填
fieldPath
属性类型描述
apiVersionstring

Version of the schema the FieldPath is written in terms of, defaults to "v1".

fieldPathstring

Path of the field to select in the specified API version.

.spec.template.spec.clusterConfiguration.apiServer.extraEnvs[].valueFrom.resourceFieldRef

描述
Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
类型
object
必填
resource
属性类型描述
containerNamestring

Container name: required for volumes, optional for env vars

divisorinteger|string

Specifies the output format of the exposed resources, defaults to "1"

resourcestring

Required: resource to select

.spec.template.spec.clusterConfiguration.apiServer.extraEnvs[].valueFrom.secretKeyRef

描述
Selects a key of a secret in the pod's namespace
类型
object
必填
key
属性类型描述
keystring

The key of the secret to select from. Must be a valid secret key.

namestring

Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

optionalboolean

Specify whether the Secret or its key must be defined

.spec.template.spec.clusterConfiguration.apiServer.extraVolumes

描述
extraVolumes is an extra set of host volumes, mounted to the control plane component.
类型
array

.spec.template.spec.clusterConfiguration.apiServer.extraVolumes[]

描述
HostPathMount contains elements describing volumes that are mounted from the host.
类型
object
必填
hostPathmountPathname
属性类型描述
hostPathstring

hostPath is the path in the host that will be mounted inside the pod.

mountPathstring

mountPath is the path inside the pod where hostPath will be mounted.

namestring

name of the volume inside the pod template.

pathTypestring

pathType is the type of the HostPath.

readOnlyboolean

readOnly controls write access to the volume

.spec.template.spec.clusterConfiguration.controllerManager

描述
controllerManager contains extra settings for the controller manager control plane component
类型
object
属性类型描述
extraArgsobject

extraArgs is an extra set of flags to pass to the control plane component.

extraEnvsarray

extraEnvs is an extra set of environment variables to pass to the control plane component. Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. This option takes effect only on Kubernetes >=1.31.0.

extraVolumesarray

extraVolumes is an extra set of host volumes, mounted to the control plane component.

.spec.template.spec.clusterConfiguration.controllerManager.extraArgs

描述
extraArgs is an extra set of flags to pass to the control plane component.
类型
object

.spec.template.spec.clusterConfiguration.controllerManager.extraEnvs

描述
extraEnvs is an extra set of environment variables to pass to the control plane component. Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. This option takes effect only on Kubernetes >=1.31.0.
类型
array

.spec.template.spec.clusterConfiguration.controllerManager.extraEnvs[]

描述
EnvVar represents an environment variable present in a Container.
类型
object
必填
name
属性类型描述
namestring

Name of the environment variable. Must be a C_IDENTIFIER.

valuestring

Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".

valueFromobject

Source for the environment variable's value. Cannot be used if value is not empty.

.spec.template.spec.clusterConfiguration.controllerManager.extraEnvs[].valueFrom

描述
Source for the environment variable's value. Cannot be used if value is not empty.
类型
object
属性类型描述
configMapKeyRefobject

Selects a key of a ConfigMap.

fieldRefobject

Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels['<KEY>'], metadata.annotations['<KEY>'], spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.

resourceFieldRefobject

Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.

secretKeyRefobject

Selects a key of a secret in the pod's namespace

.spec.template.spec.clusterConfiguration.controllerManager.extraEnvs[].valueFrom.configMapKeyRef

描述
Selects a key of a ConfigMap.
类型
object
必填
key
属性类型描述
keystring

The key to select.

namestring

Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

optionalboolean

Specify whether the ConfigMap or its key must be defined

.spec.template.spec.clusterConfiguration.controllerManager.extraEnvs[].valueFrom.fieldRef

描述
Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
类型
object
必填
fieldPath
属性类型描述
apiVersionstring

Version of the schema the FieldPath is written in terms of, defaults to "v1".

fieldPathstring

Path of the field to select in the specified API version.

.spec.template.spec.clusterConfiguration.controllerManager.extraEnvs[].valueFrom.resourceFieldRef

描述
Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
类型
object
必填
resource
属性类型描述
containerNamestring

Container name: required for volumes, optional for env vars

divisorinteger|string

Specifies the output format of the exposed resources, defaults to "1"

resourcestring

Required: resource to select

.spec.template.spec.clusterConfiguration.controllerManager.extraEnvs[].valueFrom.secretKeyRef

描述
Selects a key of a secret in the pod's namespace
类型
object
必填
key
属性类型描述
keystring

The key of the secret to select from. Must be a valid secret key.

namestring

Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

optionalboolean

Specify whether the Secret or its key must be defined

.spec.template.spec.clusterConfiguration.controllerManager.extraVolumes

描述
extraVolumes is an extra set of host volumes, mounted to the control plane component.
类型
array

.spec.template.spec.clusterConfiguration.controllerManager.extraVolumes[]

描述
HostPathMount contains elements describing volumes that are mounted from the host.
类型
object
必填
hostPathmountPathname
属性类型描述
hostPathstring

hostPath is the path in the host that will be mounted inside the pod.

mountPathstring

mountPath is the path inside the pod where hostPath will be mounted.

namestring

name of the volume inside the pod template.

pathTypestring

pathType is the type of the HostPath.

readOnlyboolean

readOnly controls write access to the volume

.spec.template.spec.clusterConfiguration.dns

描述
dns defines the options for the DNS add-on installed in the cluster.
类型
object
属性类型描述
imageRepositorystring

imageRepository sets the container registry to pull images from. if not set, the ImageRepository defined in ClusterConfiguration will be used instead.

imageTagstring

imageTag allows to specify a tag for the image. In case this value is set, kubeadm does not change automatically the version of the above components during upgrades.

.spec.template.spec.clusterConfiguration.etcd

描述
etcd holds configuration for etcd. NB: This value defaults to a Local (stacked) etcd
类型
object
属性类型描述
externalobject

external describes how to connect to an external etcd cluster Local and External are mutually exclusive

localobject

local provides configuration knobs for configuring the local etcd instance Local and External are mutually exclusive

.spec.template.spec.clusterConfiguration.etcd.external

描述
external describes how to connect to an external etcd cluster Local and External are mutually exclusive
类型
object
必填
caFilecertFileendpointskeyFile
属性类型描述
caFilestring

caFile is an SSL Certificate Authority file used to secure etcd communication. Required if using a TLS connection.

certFilestring

certFile is an SSL certification file used to secure etcd communication. Required if using a TLS connection.

endpointsarray

endpoints of etcd members. Required for ExternalEtcd.

keyFilestring

keyFile is an SSL key file used to secure etcd communication. Required if using a TLS connection.

.spec.template.spec.clusterConfiguration.etcd.external.endpoints

描述
endpoints of etcd members. Required for ExternalEtcd.
类型
array

.spec.template.spec.clusterConfiguration.etcd.external.endpoints[]

类型
string

.spec.template.spec.clusterConfiguration.etcd.local

描述
local provides configuration knobs for configuring the local etcd instance Local and External are mutually exclusive
类型
object
属性类型描述
dataDirstring

dataDir is the directory etcd will place its data. Defaults to "/var/lib/etcd".

extraArgsobject

extraArgs are extra arguments provided to the etcd binary when run inside a static pod.

extraEnvsarray

extraEnvs is an extra set of environment variables to pass to the control plane component. Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. This option takes effect only on Kubernetes >=1.31.0.

imageRepositorystring

imageRepository sets the container registry to pull images from. if not set, the ImageRepository defined in ClusterConfiguration will be used instead.

imageTagstring

imageTag allows to specify a tag for the image. In case this value is set, kubeadm does not change automatically the version of the above components during upgrades.

peerCertSANsarray

peerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert.

serverCertSANsarray

serverCertSANs sets extra Subject Alternative Names for the etcd server signing cert.

.spec.template.spec.clusterConfiguration.etcd.local.extraArgs

描述
extraArgs are extra arguments provided to the etcd binary when run inside a static pod.
类型
object

.spec.template.spec.clusterConfiguration.etcd.local.extraEnvs

描述
extraEnvs is an extra set of environment variables to pass to the control plane component. Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. This option takes effect only on Kubernetes >=1.31.0.
类型
array

.spec.template.spec.clusterConfiguration.etcd.local.extraEnvs[]

描述
EnvVar represents an environment variable present in a Container.
类型
object
必填
name
属性类型描述
namestring

Name of the environment variable. Must be a C_IDENTIFIER.

valuestring

Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".

valueFromobject

Source for the environment variable's value. Cannot be used if value is not empty.

.spec.template.spec.clusterConfiguration.etcd.local.extraEnvs[].valueFrom

描述
Source for the environment variable's value. Cannot be used if value is not empty.
类型
object
属性类型描述
configMapKeyRefobject

Selects a key of a ConfigMap.

fieldRefobject

Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels['<KEY>'], metadata.annotations['<KEY>'], spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.

resourceFieldRefobject

Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.

secretKeyRefobject

Selects a key of a secret in the pod's namespace

.spec.template.spec.clusterConfiguration.etcd.local.extraEnvs[].valueFrom.configMapKeyRef

描述
Selects a key of a ConfigMap.
类型
object
必填
key
属性类型描述
keystring

The key to select.

namestring

Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

optionalboolean

Specify whether the ConfigMap or its key must be defined

.spec.template.spec.clusterConfiguration.etcd.local.extraEnvs[].valueFrom.fieldRef

描述
Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
类型
object
必填
fieldPath
属性类型描述
apiVersionstring

Version of the schema the FieldPath is written in terms of, defaults to "v1".

fieldPathstring

Path of the field to select in the specified API version.

.spec.template.spec.clusterConfiguration.etcd.local.extraEnvs[].valueFrom.resourceFieldRef

描述
Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
类型
object
必填
resource
属性类型描述
containerNamestring

Container name: required for volumes, optional for env vars

divisorinteger|string

Specifies the output format of the exposed resources, defaults to "1"

resourcestring

Required: resource to select

.spec.template.spec.clusterConfiguration.etcd.local.extraEnvs[].valueFrom.secretKeyRef

描述
Selects a key of a secret in the pod's namespace
类型
object
必填
key
属性类型描述
keystring

The key of the secret to select from. Must be a valid secret key.

namestring

Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

optionalboolean

Specify whether the Secret or its key must be defined

.spec.template.spec.clusterConfiguration.etcd.local.peerCertSANs

描述
peerCertSANs sets extra Subject Alternative Names for the etcd peer signing cert.
类型
array

.spec.template.spec.clusterConfiguration.etcd.local.peerCertSANs[]

类型
string

.spec.template.spec.clusterConfiguration.etcd.local.serverCertSANs

描述
serverCertSANs sets extra Subject Alternative Names for the etcd server signing cert.
类型
array

.spec.template.spec.clusterConfiguration.etcd.local.serverCertSANs[]

类型
string

.spec.template.spec.clusterConfiguration.featureGates

描述
featureGates enabled by the user.
类型
object

.spec.template.spec.clusterConfiguration.networking

描述
networking holds configuration for the networking topology of the cluster. NB: This value defaults to the Cluster object spec.clusterNetwork.
类型
object
属性类型描述
dnsDomainstring

dnsDomain is the dns domain used by k8s services. Defaults to "cluster.local".

podSubnetstring

podSubnet is the subnet used by pods. If unset, the API server will not allocate CIDR ranges for every node. Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.services.cidrBlocks if that is set

serviceSubnetstring

serviceSubnet is the subnet used by k8s services. Defaults to a comma-delimited string of the Cluster object's spec.clusterNetwork.pods.cidrBlocks, or to "10.96.0.0/12" if that's unset.

.spec.template.spec.clusterConfiguration.scheduler

描述
scheduler contains extra settings for the scheduler control plane component
类型
object
属性类型描述
extraArgsobject

extraArgs is an extra set of flags to pass to the control plane component.

extraEnvsarray

extraEnvs is an extra set of environment variables to pass to the control plane component. Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. This option takes effect only on Kubernetes >=1.31.0.

extraVolumesarray

extraVolumes is an extra set of host volumes, mounted to the control plane component.

.spec.template.spec.clusterConfiguration.scheduler.extraArgs

描述
extraArgs is an extra set of flags to pass to the control plane component.
类型
object

.spec.template.spec.clusterConfiguration.scheduler.extraEnvs

描述
extraEnvs is an extra set of environment variables to pass to the control plane component. Environment variables passed using ExtraEnvs will override any existing environment variables, or *_proxy environment variables that kubeadm adds by default. This option takes effect only on Kubernetes >=1.31.0.
类型
array

.spec.template.spec.clusterConfiguration.scheduler.extraEnvs[]

描述
EnvVar represents an environment variable present in a Container.
类型
object
必填
name
属性类型描述
namestring

Name of the environment variable. Must be a C_IDENTIFIER.

valuestring

Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".

valueFromobject

Source for the environment variable's value. Cannot be used if value is not empty.

.spec.template.spec.clusterConfiguration.scheduler.extraEnvs[].valueFrom

描述
Source for the environment variable's value. Cannot be used if value is not empty.
类型
object
属性类型描述
configMapKeyRefobject

Selects a key of a ConfigMap.

fieldRefobject

Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels['<KEY>'], metadata.annotations['<KEY>'], spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.

resourceFieldRefobject

Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.

secretKeyRefobject

Selects a key of a secret in the pod's namespace

.spec.template.spec.clusterConfiguration.scheduler.extraEnvs[].valueFrom.configMapKeyRef

描述
Selects a key of a ConfigMap.
类型
object
必填
key
属性类型描述
keystring

The key to select.

namestring

Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

optionalboolean

Specify whether the ConfigMap or its key must be defined

.spec.template.spec.clusterConfiguration.scheduler.extraEnvs[].valueFrom.fieldRef

描述
Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
类型
object
必填
fieldPath
属性类型描述
apiVersionstring

Version of the schema the FieldPath is written in terms of, defaults to "v1".

fieldPathstring

Path of the field to select in the specified API version.

.spec.template.spec.clusterConfiguration.scheduler.extraEnvs[].valueFrom.resourceFieldRef

描述
Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
类型
object
必填
resource
属性类型描述
containerNamestring

Container name: required for volumes, optional for env vars

divisorinteger|string

Specifies the output format of the exposed resources, defaults to "1"

resourcestring

Required: resource to select

.spec.template.spec.clusterConfiguration.scheduler.extraEnvs[].valueFrom.secretKeyRef

描述
Selects a key of a secret in the pod's namespace
类型
object
必填
key
属性类型描述
keystring

The key of the secret to select from. Must be a valid secret key.

namestring

Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

optionalboolean

Specify whether the Secret or its key must be defined

.spec.template.spec.clusterConfiguration.scheduler.extraVolumes

描述
extraVolumes is an extra set of host volumes, mounted to the control plane component.
类型
array

.spec.template.spec.clusterConfiguration.scheduler.extraVolumes[]

描述
HostPathMount contains elements describing volumes that are mounted from the host.
类型
object
必填
hostPathmountPathname
属性类型描述
hostPathstring

hostPath is the path in the host that will be mounted inside the pod.

mountPathstring

mountPath is the path inside the pod where hostPath will be mounted.

namestring

name of the volume inside the pod template.

pathTypestring

pathType is the type of the HostPath.

readOnlyboolean

readOnly controls write access to the volume

.spec.template.spec.diskSetup

描述
diskSetup specifies options for the creation of partition tables and file systems on devices.
类型
object
属性类型描述
filesystemsarray

filesystems specifies the list of file systems to setup.

partitionsarray

partitions specifies the list of the partitions to setup.

.spec.template.spec.diskSetup.filesystems

描述
filesystems specifies the list of file systems to setup.
类型
array

.spec.template.spec.diskSetup.filesystems[]

描述
Filesystem defines the file systems to be created.
类型
object
必填
devicefilesystem
属性类型描述
devicestring

device specifies the device name

extraOptsarray

extraOpts defined extra options to add to the command for creating the file system.

filesystemstring

filesystem specifies the file system type.

labelstring

label specifies the file system label to be used. If set to None, no label is used.

overwriteboolean

overwrite defines whether or not to overwrite any existing filesystem. If true, any pre-existing file system will be destroyed. Use with Caution.

partitionstring

partition specifies the partition to use. The valid options are: "auto|any", "auto", "any", "none", and , where NUM is the actual partition number.

replaceFSstring

replaceFS is a special directive, used for Microsoft Azure that instructs cloud-init to replace a file system of <FS_TYPE>. NOTE: unless you define a label, this requires the use of the 'any' partition directive.

.spec.template.spec.diskSetup.filesystems[].extraOpts

描述
extraOpts defined extra options to add to the command for creating the file system.
类型
array

.spec.template.spec.diskSetup.filesystems[].extraOpts[]

类型
string

.spec.template.spec.diskSetup.partitions

描述
partitions specifies the list of the partitions to setup.
类型
array

.spec.template.spec.diskSetup.partitions[]

描述
Partition defines how to create and layout a partition.
类型
object
必填
devicelayout
属性类型描述
devicestring

device is the name of the device.

layoutboolean

layout specifies the device layout. If it is true, a single partition will be created for the entire device. When layout is false, it means don't partition or ignore existing partitioning.

overwriteboolean

overwrite describes whether to skip checks and create the partition if a partition or filesystem is found on the device. Use with caution. Default is 'false'.

tableTypestring

tableType specifies the tupe of partition table. The following are supported: 'mbr': default and setups a MS-DOS partition table 'gpt': setups a GPT partition table

.spec.template.spec.files

描述
files specifies extra files to be passed to user_data upon creation.
类型
array

.spec.template.spec.files[]

描述
File defines the input for generating write_files in cloud-init.
类型
object
必填
path
属性类型描述
appendboolean

append specifies whether to append Content to existing file if Path exists.

contentstring

content is the actual content of the file.

contentFromobject

contentFrom is a referenced source of content to populate the file.

encodingstring

encoding specifies the encoding of the file contents.

ownerstring

owner specifies the ownership of the file, e.g. "root:root".

pathstring

path specifies the full path on disk where to store the file.

permissionsstring

permissions specifies the permissions to assign to the file, e.g. "0640".

.spec.template.spec.files[].contentFrom

描述
contentFrom is a referenced source of content to populate the file.
类型
object
必填
secret
属性类型描述
secretobject

secret represents a secret that should populate this file.

.spec.template.spec.files[].contentFrom.secret

描述
secret represents a secret that should populate this file.
类型
object
必填
keyname
属性类型描述
keystring

key is the key in the secret's data map for this value.

namestring

name of the secret in the KubeadmBootstrapConfig's namespace to use.

.spec.template.spec.ignition

描述
ignition contains Ignition specific configuration.
类型
object
属性类型描述
containerLinuxConfigobject

containerLinuxConfig contains CLC specific configuration.

.spec.template.spec.ignition.containerLinuxConfig

描述
containerLinuxConfig contains CLC specific configuration.
类型
object
属性类型描述
additionalConfigstring

additionalConfig contains additional configuration to be merged with the Ignition configuration generated by the bootstrapper controller. More info: https://coreos.github.io/ignition/operator-notes/#config-merging

The data format is documented here: https://kinvolk.io/docs/flatcar-container-linux/latest/provisioning/cl-config/

strictboolean

strict controls if AdditionalConfig should be strictly parsed. If so, warnings are treated as errors.

.spec.template.spec.initConfiguration

描述
initConfiguration along with ClusterConfiguration are the configurations necessary for the init command
类型
object
属性类型描述
apiVersionstring

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

bootstrapTokensarray

bootstrapTokens is respected at kubeadm init time and describes a set of Bootstrap Tokens to create. This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature

kindstring

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

localAPIEndpointobject

localAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint is the global endpoint for the cluster, which then loadbalances the requests to each individual API server. This configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible on. By default, kubeadm tries to auto-detect the IP of the default interface and use that, but in case that process fails you may set the desired value here.

nodeRegistrationobject

nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. When used in the context of control plane nodes, NodeRegistration should remain consistent across both InitConfiguration and JoinConfiguration

patchesobject

patches contains options related to applying patches to components deployed by kubeadm during "kubeadm init". The minimum kubernetes version needed to support Patches is v1.22

skipPhasesarray

skipPhases is a list of phases to skip during command execution. The list of phases can be obtained with the "kubeadm init --help" command. This option takes effect only on Kubernetes >=1.22.0.

.spec.template.spec.initConfiguration.bootstrapTokens

描述
bootstrapTokens is respected at `kubeadm init` time and describes a set of Bootstrap Tokens to create. This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature
类型
array

.spec.template.spec.initConfiguration.bootstrapTokens[]

描述
BootstrapToken describes one bootstrap token, stored as a Secret in the cluster.
类型
object
必填
token
属性类型描述
descriptionstring

description sets a human-friendly message why this token exists and what it's used for, so other administrators can know its purpose.

expiresstring

expires specifies the timestamp when this token expires. Defaults to being set dynamically at runtime based on the TTL. Expires and TTL are mutually exclusive.

groupsarray

groups specifies the extra groups that this token will authenticate as when/if used for authentication

tokenstring

token is used for establishing bidirectional trust between nodes and control-planes. Used for joining nodes in the cluster.

ttlstring

ttl defines the time to live for this token. Defaults to 24h. Expires and TTL are mutually exclusive.

usagesarray

usages describes the ways in which this token can be used. Can by default be used for establishing bidirectional trust, but that can be changed here.

.spec.template.spec.initConfiguration.bootstrapTokens[].groups

描述
groups specifies the extra groups that this token will authenticate as when/if used for authentication
类型
array

.spec.template.spec.initConfiguration.bootstrapTokens[].groups[]

类型
string

.spec.template.spec.initConfiguration.bootstrapTokens[].usages

描述
usages describes the ways in which this token can be used. Can by default be used for establishing bidirectional trust, but that can be changed here.
类型
array

.spec.template.spec.initConfiguration.bootstrapTokens[].usages[]

类型
string

.spec.template.spec.initConfiguration.localAPIEndpoint

描述
localAPIEndpoint represents the endpoint of the API server instance that's deployed on this control plane node In HA setups, this differs from ClusterConfiguration.ControlPlaneEndpoint in the sense that ControlPlaneEndpoint is the global endpoint for the cluster, which then loadbalances the requests to each individual API server. This configuration object lets you customize what IP/DNS name and port the local API server advertises it's accessible on. By default, kubeadm tries to auto-detect the IP of the default interface and use that, but in case that process fails you may set the desired value here.
类型
object
属性类型描述
advertiseAddressstring

advertiseAddress sets the IP address for the API server to advertise.

bindPortinteger

bindPort sets the secure port for the API Server to bind to. Defaults to 6443.

.spec.template.spec.initConfiguration.nodeRegistration

描述
nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. When used in the context of control plane nodes, NodeRegistration should remain consistent across both InitConfiguration and JoinConfiguration
类型
object
属性类型描述
criSocketstring

criSocket is used to retrieve container runtime info. This information will be annotated to the Node API object, for later re-use

ignorePreflightErrorsarray

ignorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered.

imagePullPolicystring

imagePullPolicy specifies the policy for image pulling during kubeadm "init" and "join" operations. The value of this field must be one of "Always", "IfNotPresent" or "Never". Defaults to "IfNotPresent". This can be used only with Kubernetes version equal to 1.22 and later.

imagePullSerialboolean

imagePullSerial specifies if image pulling performed by kubeadm must be done serially or in parallel. This option takes effect only on Kubernetes >=1.31.0. Default: true (defaulted in kubeadm)

kubeletExtraArgsobject

kubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on.

namestring

name is the .Metadata.Name field of the Node API object that will be created in this kubeadm init or kubeadm join operation. This field is also used in the CommonName field of the kubelet's client certificate to the API server. Defaults to the hostname of the node if not provided.

taintsarray

taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the kubeadm init process it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an empty slice, i.e. taints: [] in the YAML file. This field is solely used for Node registration.

.spec.template.spec.initConfiguration.nodeRegistration.ignorePreflightErrors

描述
ignorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered.
类型
array

.spec.template.spec.initConfiguration.nodeRegistration.ignorePreflightErrors[]

类型
string

.spec.template.spec.initConfiguration.nodeRegistration.kubeletExtraArgs

描述
kubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on.
类型
object

.spec.template.spec.initConfiguration.nodeRegistration.taints

描述
taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an empty slice, i.e. `taints: []` in the YAML file. This field is solely used for Node registration.
类型
array

.spec.template.spec.initConfiguration.nodeRegistration.taints[]

描述
The node this Taint is attached to has the "effect" on any pod that does not tolerate the Taint.
类型
object
必填
effectkey
属性类型描述
effectstring

Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.

keystring

Required. The taint key to be applied to a node.

timeAddedstring

TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.

valuestring

The taint value corresponding to the taint key.

.spec.template.spec.initConfiguration.patches

描述
patches contains options related to applying patches to components deployed by kubeadm during "kubeadm init". The minimum kubernetes version needed to support Patches is v1.22
类型
object
属性类型描述
directorystring

directory is a path to a directory that contains files named "target[suffix][+patchtype].extension". For example, "kube-apiserver0+merge.yaml" or just "etcd.json". "target" can be one of "kube-apiserver", "kube-controller-manager", "kube-scheduler", "etcd". "patchtype" can be one of "strategic" "merge" or "json" and they match the patch formats supported by kubectl. The default "patchtype" is "strategic". "extension" must be either "json" or "yaml". "suffix" is an optional string that can be used to determine which patches are applied first alpha-numerically. These files can be written into the target directory via KubeadmConfig.Files which specifies additional files to be created on the machine, either with content inline or by referencing a secret.

.spec.template.spec.initConfiguration.skipPhases

描述
skipPhases is a list of phases to skip during command execution. The list of phases can be obtained with the "kubeadm init --help" command. This option takes effect only on Kubernetes >=1.22.0.
类型
array

.spec.template.spec.initConfiguration.skipPhases[]

类型
string

.spec.template.spec.joinConfiguration

描述
joinConfiguration is the kubeadm configuration for the join command
类型
object
属性类型描述
apiVersionstring

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

caCertPathstring

caCertPath is the path to the SSL certificate authority used to secure comunications between node and control-plane. Defaults to "/etc/kubernetes/pki/ca.crt".

controlPlaneobject

controlPlane defines the additional control plane instance to be deployed on the joining node. If nil, no additional control plane instance will be deployed.

discoveryobject

discovery specifies the options for the kubelet to use during the TLS Bootstrap process

kindstring

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

nodeRegistrationobject

nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. When used in the context of control plane nodes, NodeRegistration should remain consistent across both InitConfiguration and JoinConfiguration

patchesobject

patches contains options related to applying patches to components deployed by kubeadm during "kubeadm join". The minimum kubernetes version needed to support Patches is v1.22

skipPhasesarray

skipPhases is a list of phases to skip during command execution. The list of phases can be obtained with the "kubeadm init --help" command. This option takes effect only on Kubernetes >=1.22.0.

.spec.template.spec.joinConfiguration.controlPlane

描述
controlPlane defines the additional control plane instance to be deployed on the joining node. If nil, no additional control plane instance will be deployed.
类型
object
属性类型描述
localAPIEndpointobject

localAPIEndpoint represents the endpoint of the API server instance to be deployed on this node.

.spec.template.spec.joinConfiguration.controlPlane.localAPIEndpoint

描述
localAPIEndpoint represents the endpoint of the API server instance to be deployed on this node.
类型
object
属性类型描述
advertiseAddressstring

advertiseAddress sets the IP address for the API server to advertise.

bindPortinteger

bindPort sets the secure port for the API Server to bind to. Defaults to 6443.

.spec.template.spec.joinConfiguration.discovery

描述
discovery specifies the options for the kubelet to use during the TLS Bootstrap process
类型
object
属性类型描述
bootstrapTokenobject

bootstrapToken is used to set the options for bootstrap token based discovery BootstrapToken and File are mutually exclusive

fileobject

file is used to specify a file or URL to a kubeconfig file from which to load cluster information BootstrapToken and File are mutually exclusive

timeoutstring

timeout modifies the discovery timeout

tlsBootstrapTokenstring

tlsBootstrapToken is a token used for TLS bootstrapping. If .BootstrapToken is set, this field is defaulted to .BootstrapToken.Token, but can be overridden. If .File is set, this field must be set in case the KubeConfigFile does not contain any other authentication information

.spec.template.spec.joinConfiguration.discovery.bootstrapToken

描述
bootstrapToken is used to set the options for bootstrap token based discovery BootstrapToken and File are mutually exclusive
类型
object
属性类型描述
apiServerEndpointstring

apiServerEndpoint is an IP or domain name to the API server from which info will be fetched.

caCertHashesarray

caCertHashes specifies a set of public key pins to verify when token-based discovery is used. The root CA found during discovery must match one of these values. Specifying an empty set disables root CA pinning, which can be unsafe. Each hash is specified as ":", where the only currently supported type is "sha256". This is a hex-encoded SHA-256 hash of the Subject Public Key Info (SPKI) object in DER-encoded ASN.1. These hashes can be calculated using, for example, OpenSSL: openssl x509 -pubkey -in ca.crt openssl rsa -pubin -outform der 2>&/dev/null | openssl dgst -sha256 -hex

tokenstring

token is a token used to validate cluster information fetched from the control-plane.

unsafeSkipCAVerificationboolean

unsafeSkipCAVerification allows token-based discovery without CA verification via CACertHashes. This can weaken the security of kubeadm since other nodes can impersonate the control-plane.

.spec.template.spec.joinConfiguration.discovery.bootstrapToken.caCertHashes

描述
caCertHashes specifies a set of public key pins to verify when token-based discovery is used. The root CA found during discovery must match one of these values. Specifying an empty set disables root CA pinning, which can be unsafe. Each hash is specified as "<type>:<value>", where the only currently supported type is "sha256". This is a hex-encoded SHA-256 hash of the Subject Public Key Info (SPKI) object in DER-encoded ASN.1. These hashes can be calculated using, for example, OpenSSL: openssl x509 -pubkey -in ca.crt openssl rsa -pubin -outform der 2>&/dev/null | openssl dgst -sha256 -hex
类型
array

.spec.template.spec.joinConfiguration.discovery.bootstrapToken.caCertHashes[]

类型
string

.spec.template.spec.joinConfiguration.discovery.file

描述
file is used to specify a file or URL to a kubeconfig file from which to load cluster information BootstrapToken and File are mutually exclusive
类型
object
必填
kubeConfigPath
属性类型描述
kubeConfigobject

kubeConfig is used (optionally) to generate a KubeConfig based on the KubeadmConfig's information. The file is generated at the path specified in KubeConfigPath.

Host address (server field) information is automatically populated based on the Cluster's ControlPlaneEndpoint. Certificate Authority (certificate-authority-data field) is gathered from the cluster's CA secret.

kubeConfigPathstring

kubeConfigPath is used to specify the actual file path or URL to the kubeconfig file from which to load cluster information

.spec.template.spec.joinConfiguration.discovery.file.kubeConfig

描述
kubeConfig is used (optionally) to generate a KubeConfig based on the KubeadmConfig's information. The file is generated at the path specified in KubeConfigPath. Host address (server field) information is automatically populated based on the Cluster's ControlPlaneEndpoint. Certificate Authority (certificate-authority-data field) is gathered from the cluster's CA secret.
类型
object
必填
user
属性类型描述
clusterobject

cluster contains information about how to communicate with the kubernetes cluster.

By default the following fields are automatically populated:

  • Server with the Cluster's ControlPlaneEndpoint.
  • CertificateAuthorityData with the Cluster's CA certificate.
userobject

user contains information that describes identity information. This is used to tell the kubernetes cluster who you are.

.spec.template.spec.joinConfiguration.discovery.file.kubeConfig.cluster

描述
cluster contains information about how to communicate with the kubernetes cluster. By default the following fields are automatically populated: - Server with the Cluster's ControlPlaneEndpoint. - CertificateAuthorityData with the Cluster's CA certificate.
类型
object
属性类型描述
certificateAuthorityDatastring

certificateAuthorityData contains PEM-encoded certificate authority certificates.

Defaults to the Cluster's CA certificate if empty.

insecureSkipTLSVerifyboolean

insecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure.

proxyURLstring

proxyURL is the URL to the proxy to be used for all requests made by this client. URLs with "http", "https", and "socks5" schemes are supported. If this configuration is not provided or the empty string, the client attempts to construct a proxy configuration from http_proxy and https_proxy environment variables. If these environment variables are not set, the client does not attempt to proxy requests.

socks5 proxying does not currently support spdy streaming endpoints (exec, attach, port forward).

serverstring

server is the address of the kubernetes cluster (https://hostname:port).

Defaults to https:// + Cluster.Spec.ControlPlaneEndpoint.

tlsServerNamestring

tlsServerName is used to check server certificate. If TLSServerName is empty, the hostname used to contact the server is used.

.spec.template.spec.joinConfiguration.discovery.file.kubeConfig.user

描述
user contains information that describes identity information. This is used to tell the kubernetes cluster who you are.
类型
object
属性类型描述
authProviderobject

authProvider specifies a custom authentication plugin for the kubernetes cluster.

execobject

exec specifies a custom exec-based authentication plugin for the kubernetes cluster.

.spec.template.spec.joinConfiguration.discovery.file.kubeConfig.user.authProvider

描述
authProvider specifies a custom authentication plugin for the kubernetes cluster.
类型
object
必填
name
属性类型描述
configobject

config holds the parameters for the authentication plugin.

namestring

name is the name of the authentication plugin.

.spec.template.spec.joinConfiguration.discovery.file.kubeConfig.user.authProvider.config

描述
config holds the parameters for the authentication plugin.
类型
object

.spec.template.spec.joinConfiguration.discovery.file.kubeConfig.user.exec

描述
exec specifies a custom exec-based authentication plugin for the kubernetes cluster.
类型
object
必填
command
属性类型描述
apiVersionstring

apiVersion is preferred input version of the ExecInfo. The returned ExecCredentials MUST use the same encoding version as the input. Defaults to client.authentication.k8s.io/v1 if not set.

argsarray

args is the arguments to pass to the command when executing it.

commandstring

command to execute.

envarray

env defines additional environment variables to expose to the process. These are unioned with the host's environment, as well as variables client-go uses to pass argument to the plugin.

provideClusterInfoboolean

provideClusterInfo determines whether or not to provide cluster information, which could potentially contain very large CA data, to this exec plugin as a part of the KUBERNETES_EXEC_INFO environment variable. By default, it is set to false. Package k8s.io/client-go/tools/auth/exec provides helper methods for reading this environment variable.

.spec.template.spec.joinConfiguration.discovery.file.kubeConfig.user.exec.args

描述
args is the arguments to pass to the command when executing it.
类型
array

.spec.template.spec.joinConfiguration.discovery.file.kubeConfig.user.exec.args[]

类型
string

.spec.template.spec.joinConfiguration.discovery.file.kubeConfig.user.exec.env

描述
env defines additional environment variables to expose to the process. These are unioned with the host's environment, as well as variables client-go uses to pass argument to the plugin.
类型
array

.spec.template.spec.joinConfiguration.discovery.file.kubeConfig.user.exec.env[]

描述
KubeConfigAuthExecEnv is used for setting environment variables when executing an exec-based credential plugin.
类型
object
必填
namevalue
属性类型描述
namestring

name of the environment variable

valuestring

value of the environment variable

.spec.template.spec.joinConfiguration.nodeRegistration

描述
nodeRegistration holds fields that relate to registering the new control-plane node to the cluster. When used in the context of control plane nodes, NodeRegistration should remain consistent across both InitConfiguration and JoinConfiguration
类型
object
属性类型描述
criSocketstring

criSocket is used to retrieve container runtime info. This information will be annotated to the Node API object, for later re-use

ignorePreflightErrorsarray

ignorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered.

imagePullPolicystring

imagePullPolicy specifies the policy for image pulling during kubeadm "init" and "join" operations. The value of this field must be one of "Always", "IfNotPresent" or "Never". Defaults to "IfNotPresent". This can be used only with Kubernetes version equal to 1.22 and later.

imagePullSerialboolean

imagePullSerial specifies if image pulling performed by kubeadm must be done serially or in parallel. This option takes effect only on Kubernetes >=1.31.0. Default: true (defaulted in kubeadm)

kubeletExtraArgsobject

kubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on.

namestring

name is the .Metadata.Name field of the Node API object that will be created in this kubeadm init or kubeadm join operation. This field is also used in the CommonName field of the kubelet's client certificate to the API server. Defaults to the hostname of the node if not provided.

taintsarray

taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the kubeadm init process it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an empty slice, i.e. taints: [] in the YAML file. This field is solely used for Node registration.

.spec.template.spec.joinConfiguration.nodeRegistration.ignorePreflightErrors

描述
ignorePreflightErrors provides a slice of pre-flight errors to be ignored when the current node is registered.
类型
array

.spec.template.spec.joinConfiguration.nodeRegistration.ignorePreflightErrors[]

类型
string

.spec.template.spec.joinConfiguration.nodeRegistration.kubeletExtraArgs

描述
kubeletExtraArgs passes through extra arguments to the kubelet. The arguments here are passed to the kubelet command line via the environment file kubeadm writes at runtime for the kubelet to source. This overrides the generic base-level configuration in the kubelet-config-1.X ConfigMap Flags have higher priority when parsing. These values are local and specific to the node kubeadm is executing on.
类型
object

.spec.template.spec.joinConfiguration.nodeRegistration.taints

描述
taints specifies the taints the Node API object should be registered with. If this field is unset, i.e. nil, in the `kubeadm init` process it will be defaulted to []v1.Taint{'node-role.kubernetes.io/master=""'}. If you don't want to taint your control-plane node, set this field to an empty slice, i.e. `taints: []` in the YAML file. This field is solely used for Node registration.
类型
array

.spec.template.spec.joinConfiguration.nodeRegistration.taints[]

描述
The node this Taint is attached to has the "effect" on any pod that does not tolerate the Taint.
类型
object
必填
effectkey
属性类型描述
effectstring

Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.

keystring

Required. The taint key to be applied to a node.

timeAddedstring

TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.

valuestring

The taint value corresponding to the taint key.

.spec.template.spec.joinConfiguration.patches

描述
patches contains options related to applying patches to components deployed by kubeadm during "kubeadm join". The minimum kubernetes version needed to support Patches is v1.22
类型
object
属性类型描述
directorystring

directory is a path to a directory that contains files named "target[suffix][+patchtype].extension". For example, "kube-apiserver0+merge.yaml" or just "etcd.json". "target" can be one of "kube-apiserver", "kube-controller-manager", "kube-scheduler", "etcd". "patchtype" can be one of "strategic" "merge" or "json" and they match the patch formats supported by kubectl. The default "patchtype" is "strategic". "extension" must be either "json" or "yaml". "suffix" is an optional string that can be used to determine which patches are applied first alpha-numerically. These files can be written into the target directory via KubeadmConfig.Files which specifies additional files to be created on the machine, either with content inline or by referencing a secret.

.spec.template.spec.joinConfiguration.skipPhases

描述
skipPhases is a list of phases to skip during command execution. The list of phases can be obtained with the "kubeadm init --help" command. This option takes effect only on Kubernetes >=1.22.0.
类型
array

.spec.template.spec.joinConfiguration.skipPhases[]

类型
string

.spec.template.spec.mounts

描述
mounts specifies a list of mount points to be setup.
类型
array

.spec.template.spec.mounts[]

描述
MountPoints defines input for generated mounts in cloud-init.
类型
array

.spec.template.spec.ntp

描述
ntp specifies NTP configuration
类型
object
属性类型描述
enabledboolean

enabled specifies whether NTP should be enabled

serversarray

servers specifies which NTP servers to use

.spec.template.spec.ntp.servers

描述
servers specifies which NTP servers to use
类型
array

.spec.template.spec.ntp.servers[]

类型
string

.spec.template.spec.postKubeadmCommands

描述
postKubeadmCommands specifies extra commands to run after kubeadm runs. With cloud-init, this is appended to the runcmd module configuration, and is typically executed in the cloud-final.service systemd unit. In Ignition, this is appended to /etc/kubeadm.sh.
类型
array

.spec.template.spec.postKubeadmCommands[]

类型
string

.spec.template.spec.preKubeadmCommands

描述
preKubeadmCommands specifies extra commands to run before kubeadm runs. With cloud-init, this is prepended to the runcmd module configuration, and is typically executed in the cloud-final.service systemd unit. In Ignition, this is prepended to /etc/kubeadm.sh.
类型
array

.spec.template.spec.preKubeadmCommands[]

类型
string

.spec.template.spec.users

描述
users specifies extra users to add
类型
array

.spec.template.spec.users[]

描述
User defines the input for a generated user in cloud-init.
类型
object
必填
name
属性类型描述
gecosstring

gecos specifies the gecos to use for the user

groupsstring

groups specifies the additional groups for the user

homeDirstring

homeDir specifies the home directory to use for the user

inactiveboolean

inactive specifies whether to mark the user as inactive

lockPasswordboolean

lockPassword specifies if password login should be disabled

namestring

name specifies the user name

passwdstring

passwd specifies a hashed password for the user

passwdFromobject

passwdFrom is a referenced source of passwd to populate the passwd.

primaryGroupstring

primaryGroup specifies the primary group for the user

shellstring

shell specifies the user's shell

sshAuthorizedKeysarray

sshAuthorizedKeys specifies a list of ssh authorized keys for the user

sudostring

sudo specifies a sudo role for the user

.spec.template.spec.users[].passwdFrom

描述
passwdFrom is a referenced source of passwd to populate the passwd.
类型
object
必填
secret
属性类型描述
secretobject

secret represents a secret that should populate this password.

.spec.template.spec.users[].passwdFrom.secret

描述
secret represents a secret that should populate this password.
类型
object
必填
keyname
属性类型描述
keystring

key is the key in the secret's data map for this value.

namestring

name of the secret in the KubeadmBootstrapConfig's namespace to use.

.spec.template.spec.users[].sshAuthorizedKeys

描述
sshAuthorizedKeys specifies a list of ssh authorized keys for the user
类型
array

.spec.template.spec.users[].sshAuthorizedKeys[]

类型
string

API 端点

可用的 API 端点如下:

  • /apis/bootstrap.cluster.x-k8s.io/v1beta1/namespaces/{namespace}/kubeadmconfigtemplates
    • DELETE: delete collection of KubeadmConfigTemplate
    • GET: list objects of kind KubeadmConfigTemplate
    • POST: create a new KubeadmConfigTemplate
  • /apis/bootstrap.cluster.x-k8s.io/v1beta1/namespaces/{namespace}/kubeadmconfigtemplates/{name}
    • DELETE: delete the specified KubeadmConfigTemplate
    • GET: read the specified KubeadmConfigTemplate
    • PATCH: partially update the specified KubeadmConfigTemplate
    • PUT: replace the specified KubeadmConfigTemplate

/apis/bootstrap.cluster.x-k8s.io/v1beta1/namespaces/{namespace}/kubeadmconfigtemplates

HTTP 方法
DELETE
描述
delete collection of KubeadmConfigTemplate
HTTP 响应
HTTP 状态码响应体
200 - OKStatus schema
401 - UnauthorizedEmpty
HTTP 方法
GET
描述
list objects of kind KubeadmConfigTemplate
HTTP 响应
HTTP 状态码响应体
200 - OKKubeadmConfigTemplateList schema
401 - UnauthorizedEmpty
HTTP 方法
POST
描述
create a new KubeadmConfigTemplate
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
请求体参数
参数类型描述
bodyKubeadmConfigTemplate schemaapplication/json formatted
HTTP 响应
HTTP 状态码响应体
200 - OKKubeadmConfigTemplate schema
201 - CreatedKubeadmConfigTemplate schema
202 - AcceptedKubeadmConfigTemplate schema
401 - UnauthorizedEmpty

/apis/bootstrap.cluster.x-k8s.io/v1beta1/namespaces/{namespace}/kubeadmconfigtemplates/{name}

HTTP 方法
DELETE
描述
delete the specified KubeadmConfigTemplate
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
HTTP 响应
HTTP 状态码响应体
200 - OKStatus schema
202 - AcceptedStatus schema
401 - UnauthorizedEmpty
HTTP 方法
GET
描述
read the specified KubeadmConfigTemplate
HTTP 响应
HTTP 状态码响应体
200 - OKKubeadmConfigTemplate schema
401 - UnauthorizedEmpty
HTTP 方法
PATCH
描述
partially update the specified KubeadmConfigTemplate
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
HTTP 响应
HTTP 状态码响应体
200 - OKKubeadmConfigTemplate schema
401 - UnauthorizedEmpty
HTTP 方法
PUT
描述
replace the specified KubeadmConfigTemplate
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
请求体参数
参数类型描述
bodyKubeadmConfigTemplate schemaapplication/json formatted
HTTP 响应
HTTP 状态码响应体
200 - OKKubeadmConfigTemplate schema
201 - CreatedKubeadmConfigTemplate schema
401 - UnauthorizedEmpty