Set initial kubeadm token if specified in kubeadm init (#5057)
Change-Id: I7fd94ec6d195af60d237b3cfe91668ca1f707d26
This commit is contained in:
parent
fc456ff0cd
commit
771ce96e6d
2 changed files with 12 additions and 0 deletions
|
@ -1,5 +1,11 @@
|
||||||
apiVersion: kubeadm.k8s.io/v1beta1
|
apiVersion: kubeadm.k8s.io/v1beta1
|
||||||
kind: InitConfiguration
|
kind: InitConfiguration
|
||||||
|
{% if kubeadm_token is defined %}
|
||||||
|
bootstrapTokens:
|
||||||
|
- token: "{{ kubeadm_token }}"
|
||||||
|
description: "kubespray kubeadm bootstrap token"
|
||||||
|
ttl: "24h"
|
||||||
|
{% endif %}
|
||||||
localAPIEndpoint:
|
localAPIEndpoint:
|
||||||
advertiseAddress: {{ ip | default(fallback_ips[inventory_hostname]) }}
|
advertiseAddress: {{ ip | default(fallback_ips[inventory_hostname]) }}
|
||||||
bindPort: {{ kube_apiserver_port }}
|
bindPort: {{ kube_apiserver_port }}
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
apiVersion: kubeadm.k8s.io/v1beta2
|
apiVersion: kubeadm.k8s.io/v1beta2
|
||||||
kind: InitConfiguration
|
kind: InitConfiguration
|
||||||
|
{% if kubeadm_token is defined %}
|
||||||
|
bootstrapTokens:
|
||||||
|
- token: "{{ kubeadm_token }}"
|
||||||
|
description: "kubespray kubeadm bootstrap token"
|
||||||
|
ttl: "24h"
|
||||||
|
{% endif %}
|
||||||
localAPIEndpoint:
|
localAPIEndpoint:
|
||||||
advertiseAddress: {{ ip | default(fallback_ips[inventory_hostname]) }}
|
advertiseAddress: {{ ip | default(fallback_ips[inventory_hostname]) }}
|
||||||
bindPort: {{ kube_apiserver_port }}
|
bindPort: {{ kube_apiserver_port }}
|
||||||
|
|
Loading…
Reference in a new issue