Skip to content

Commit b984f59

Browse files
authored
Merge pull request kubernetes#89735 from rosti/kubeadm-fix-bootstrap-wait
kubeadm join: Properly wait for TLS bootstrapping
2 parents c158001 + d2c4426 commit b984f59

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cmd/kubeadm/app/cmd/phases/join/kubelet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ func waitForTLSBootstrappedClient() error {
204204
fmt.Println("[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...")
205205

206206
// Loop on every falsy return. Return with an error if raised. Exit successfully if true is returned.
207-
return wait.PollImmediate(kubeadmconstants.APICallRetryInterval, kubeadmconstants.TLSBootstrapTimeout, func() (bool, error) {
207+
return wait.PollImmediate(kubeadmconstants.TLSBootstrapRetryInterval, kubeadmconstants.TLSBootstrapTimeout, func() (bool, error) {
208208
// Check that we can create a client set out of the kubelet kubeconfig. This ensures not
209209
// only that the kubeconfig file exists, but that other files required by it also exist (like
210210
// client certificate and key)

cmd/kubeadm/app/constants/constants.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ const (
182182
// PatchNodeTimeout specifies how long kubeadm should wait for applying the label and taint on the control-plane before timing out
183183
PatchNodeTimeout = 2 * time.Minute
184184
// TLSBootstrapTimeout specifies how long kubeadm should wait for the kubelet to perform the TLS Bootstrap
185-
TLSBootstrapTimeout = 2 * time.Minute
185+
TLSBootstrapTimeout = 5 * time.Minute
186+
// TLSBootstrapRetryInterval specifies how long kubeadm should wait before retrying the TLS Bootstrap check
187+
TLSBootstrapRetryInterval = 5 * time.Second
186188
// PullImageRetry specifies how many times ContainerRuntime retries when pulling image failed
187189
PullImageRetry = 5
188190
// PrepullImagesInParallelTimeout specifies how long kubeadm should wait for prepulling images in parallel before timing out

0 commit comments

Comments
 (0)