mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
kubeadm: cleanup command output
This commit is contained in:
parent
737d74d12d
commit
3b4dbe6e30
@ -68,7 +68,7 @@ var (
|
||||
This command will print out a secure randomly-generated certificate key that can be used with
|
||||
the "init" command.
|
||||
|
||||
You can also use "kubeadm init --experimental-upload-certs" without specifying a certificate key and it will
|
||||
You can also use "kubeadm init --upload-certs" without specifying a certificate key and it will
|
||||
generate and print one for you.
|
||||
`)
|
||||
)
|
||||
|
@ -32,7 +32,7 @@ import (
|
||||
var joinCommandTemplate = template.Must(template.New("join").Parse(`` +
|
||||
`kubeadm join {{.ControlPlaneHostPort}} --token {{.Token}} \
|
||||
{{range $h := .CAPubKeyPins}}--discovery-token-ca-cert-hash {{$h}} {{end}}{{if .ControlPlane}}\
|
||||
--experimental-control-plane {{if .CertificateKey}}--certificate-key {{.CertificateKey}}{{end}}{{end}}`,
|
||||
--control-plane {{if .CertificateKey}}--certificate-key {{.CertificateKey}}{{end}}{{end}}`,
|
||||
))
|
||||
|
||||
// GetJoinWorkerCommand returns the kubeadm join command for a given token and
|
||||
|
@ -262,7 +262,7 @@ func getSecret(client clientset.Interface) (*v1.Secret, error) {
|
||||
secret, err := client.CoreV1().Secrets(metav1.NamespaceSystem).Get(kubeadmconstants.KubeadmCertsSecret, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
if apierrors.IsNotFound(err) {
|
||||
return nil, errors.Errorf("Secret %q was not found in the %q Namespace. This Secret might have expired. Please, run `kubeadm init phase upload-certs --experimental-upload-certs` on a control plane to generate a new one", kubeadmconstants.KubeadmCertsSecret, metav1.NamespaceSystem)
|
||||
return nil, errors.Errorf("Secret %q was not found in the %q Namespace. This Secret might have expired. Please, run `kubeadm init phase upload-certs --upload-certs` on a control plane to generate a new one", kubeadmconstants.KubeadmCertsSecret, metav1.NamespaceSystem)
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user