@ -1,4 +1,4 @@
apiVersion: kubeadm.k8s.io/v1beta2
apiVersion: kubeadm.k8s.io/v1beta3
kind: InitConfiguration
kind: InitConfiguration
{% if kubeadm_token is defined %}
{% if kubeadm_token is defined %}
bootstrapTokens:
bootstrapTokens:
@ -29,7 +29,7 @@ nodeRegistration:
cloud-provider: external
cloud-provider: external
{% endif %}
{% endif %}
---
---
apiVersion: kubeadm.k8s.io/v1beta2
apiVersion: kubeadm.k8s.io/v1beta3
kind: ClusterConfiguration
kind: ClusterConfiguration
clusterName: {{ cluster_name }}
clusterName: {{ cluster_name }}
etcd:
etcd:
@ -86,7 +86,6 @@ etcd:
{% endfor %}
{% endfor %}
{% endif %}
{% endif %}
dns:
dns:
type: CoreDNS
imageRepository: {{ coredns_image_repo | regex_replace('/coredns(?!/coredns).*$','') }}
imageRepository: {{ coredns_image_repo | regex_replace('/coredns(?!/coredns).*$','') }}
imageTag: {{ coredns_image_tag }}
imageTag: {{ coredns_image_tag }}
networking:
networking:
@ -125,7 +124,9 @@ apiServer:
{% if kube_apiserver_insecure_port|string != "0" %}
{% if kube_apiserver_insecure_port|string != "0" %}
insecure-bind-address: {{ kube_apiserver_insecure_bind_address }}
insecure-bind-address: {{ kube_apiserver_insecure_bind_address }}
{% endif %}
{% endif %}
{% if kube_version is version('v1.24.0','<') %}
insecure-port: "{{ kube_apiserver_insecure_port }}"
insecure-port: "{{ kube_apiserver_insecure_port }}"
{% endif %}
{% if kube_apiserver_enable_admission_plugins|length > 0 %}
{% if kube_apiserver_enable_admission_plugins|length > 0 %}
enable-admission-plugins: {{ kube_apiserver_enable_admission_plugins | join(',') }}
enable-admission-plugins: {{ kube_apiserver_enable_admission_plugins | join(',') }}
{% endif %}
{% endif %}