Skip to content

Commit 20a314e

Browse files
committed
add workaround for bootstrap-token phase
1 parent ec10153 commit 20a314e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

deploy/helm/kubernetes/scripts/configure-cluster.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ kubeadm init phase upload-config kubelet --config /config/kubeadmcfg.yaml -v1 2>
3131

3232
# setup bootstrap-tokens
3333
# TODO: https://github.com/kvaps/kubernetes-in-kubernetes/issues/7
34-
kubeadm init phase bootstrap-token --config /config/kubeadmcfg.yaml --skip-token-print
34+
# TODO: https://github.com/kubernetes/kubernetes/issues/98881
35+
flatconfig=$(mktemp)
36+
kubectl config view --flatten > "$flatconfig"
37+
kubeadm init phase bootstrap-token --config /config/kubeadmcfg.yaml --skip-token-print --kubeconfig="$flatconfig"
38+
rm -f "$flatconfig"
3539

3640
# correct apiserver address for the external clients
3741
kubectl apply -n kube-public -f - <<EOT

0 commit comments

Comments
 (0)