Skip to content

Commit 3c9c7fc

Browse files
authored
Merge pull request kubernetes#75027 from ping035627/k8s-190306
Add some logs for kubeadm join
2 parents 231e372 + 5a8174b commit 3c9c7fc

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,16 @@ func runKubeletStartJoinPhase(c workflow.RunData) error {
101101
}
102102
bootstrapKubeConfigFile := kubeadmconstants.GetBootstrapKubeletKubeConfigPath()
103103

104-
// Write the bootstrap kubelet config file or the TLS-Boostrapped kubelet config file down to disk
105-
klog.V(1).Infoln("[kubelet-start] writing bootstrap kubelet config file at", bootstrapKubeConfigFile)
104+
// Write the bootstrap kubelet config file or the TLS-Bootstrapped kubelet config file down to disk
105+
klog.V(1).Infof("[kubelet-start] writing bootstrap kubelet config file at %s", bootstrapKubeConfigFile)
106106
if err := kubeconfigutil.WriteToDisk(bootstrapKubeConfigFile, tlsBootstrapCfg); err != nil {
107107
return errors.Wrap(err, "couldn't save bootstrap-kubelet.conf to disk")
108108
}
109109

110110
// Write the ca certificate to disk so kubelet can use it for authentication
111111
cluster := tlsBootstrapCfg.Contexts[tlsBootstrapCfg.CurrentContext].Cluster
112112
if _, err := os.Stat(cfg.CACertPath); os.IsNotExist(err) {
113+
klog.V(1).Infof("[kubelet-start] writing CA certificate at %s", cfg.CACertPath)
113114
if err := certutil.WriteCert(cfg.CACertPath, tlsBootstrapCfg.Clusters[cluster].CertificateAuthorityData); err != nil {
114115
return errors.Wrap(err, "couldn't save the CA certificate to disk")
115116
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func runPreflight(c workflow.RunData) error {
118118
return errors.New(msg.String())
119119
}
120120

121-
// run kubeadm init preflight checks for checking all the prequisites
121+
// run kubeadm init preflight checks for checking all the prerequisites
122122
fmt.Println("[preflight] Running pre-flight checks before initializing the new control plane instance")
123123
if err := preflight.RunInitNodeChecks(utilsexec.New(), initCfg, j.IgnorePreflightErrors(), true); err != nil {
124124
return err

0 commit comments

Comments
 (0)