Merge pull request #75027 from ping035627/k8s-190306

Add some logs for kubeadm join
k3s-v1.15.3
Kubernetes Prow Robot 2019-03-25 03:23:07 -07:00 committed by GitHub
commit 3c9c7fca64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -101,8 +101,8 @@ func runKubeletStartJoinPhase(c workflow.RunData) error {
}
bootstrapKubeConfigFile := kubeadmconstants.GetBootstrapKubeletKubeConfigPath()
// Write the bootstrap kubelet config file or the TLS-Boostrapped kubelet config file down to disk
klog.V(1).Infoln("[kubelet-start] writing bootstrap kubelet config file at", bootstrapKubeConfigFile)
// Write the bootstrap kubelet config file or the TLS-Bootstrapped kubelet config file down to disk
klog.V(1).Infof("[kubelet-start] writing bootstrap kubelet config file at %s", bootstrapKubeConfigFile)
if err := kubeconfigutil.WriteToDisk(bootstrapKubeConfigFile, tlsBootstrapCfg); err != nil {
return errors.Wrap(err, "couldn't save bootstrap-kubelet.conf to disk")
}
@ -110,6 +110,7 @@ func runKubeletStartJoinPhase(c workflow.RunData) error {
// Write the ca certificate to disk so kubelet can use it for authentication
cluster := tlsBootstrapCfg.Contexts[tlsBootstrapCfg.CurrentContext].Cluster
if _, err := os.Stat(cfg.CACertPath); os.IsNotExist(err) {
klog.V(1).Infof("[kubelet-start] writing CA certificate at %s", cfg.CACertPath)
if err := certutil.WriteCert(cfg.CACertPath, tlsBootstrapCfg.Clusters[cluster].CertificateAuthorityData); err != nil {
return errors.Wrap(err, "couldn't save the CA certificate to disk")
}

View File

@ -118,7 +118,7 @@ func runPreflight(c workflow.RunData) error {
return errors.New(msg.String())
}
// run kubeadm init preflight checks for checking all the prequisites
// run kubeadm init preflight checks for checking all the prerequisites
fmt.Println("[preflight] Running pre-flight checks before initializing the new control plane instance")
if err := preflight.RunInitNodeChecks(utilsexec.New(), initCfg, j.IgnorePreflightErrors(), true); err != nil {
return err