Set initial kubeadm token if specified in kubeadm init (#5057)

Change-Id: I7fd94ec6d195af60d237b3cfe91668ca1f707d26
pull/5081/head
Matthew Mosesohn 2019-08-15 12:26:33 +03:00 committed by Kubernetes Prow Robot
parent fc456ff0cd
commit 771ce96e6d
2 changed files with 12 additions and 0 deletions

View File

@ -1,5 +1,11 @@
apiVersion: kubeadm.k8s.io/v1beta1
kind: InitConfiguration
{% if kubeadm_token is defined %}
bootstrapTokens:
- token: "{{ kubeadm_token }}"
description: "kubespray kubeadm bootstrap token"
ttl: "24h"
{% endif %}
localAPIEndpoint:
advertiseAddress: {{ ip | default(fallback_ips[inventory_hostname]) }}
bindPort: {{ kube_apiserver_port }}

View File

@ -1,5 +1,11 @@
apiVersion: kubeadm.k8s.io/v1beta2
kind: InitConfiguration
{% if kubeadm_token is defined %}
bootstrapTokens:
- token: "{{ kubeadm_token }}"
description: "kubespray kubeadm bootstrap token"
ttl: "24h"
{% endif %}
localAPIEndpoint:
advertiseAddress: {{ ip | default(fallback_ips[inventory_hostname]) }}
bindPort: {{ kube_apiserver_port }}