kubeadm cleanup: master -> control-plane

This commit is contained in:
vanduc95 2019-02-13 09:46:46 +07:00
parent a3877b1776
commit 0e8941f7ec
4 changed files with 6 additions and 6 deletions

View File

@ -64,7 +64,7 @@ var (
* Certificate signing request was sent to apiserver and approval was received.
* The Kubelet was informed of the new secure connection details.
* Master label and taint were applied to the new node.
* Control plane (master) label and taint were applied to the new node.
* The Kubernetes control plane instances scaled up.
{{.etcdMessage}}

View File

@ -46,7 +46,7 @@ type BootstrapTokenOptions struct {
func (bto *BootstrapTokenOptions) AddTokenFlag(fs *pflag.FlagSet) {
fs.StringVar(
&bto.TokenStr, TokenStr, "",
"The token to use for establishing bidirectional trust between nodes and masters. The format is [a-z0-9]{6}\\.[a-z0-9]{16} - e.g. abcdef.0123456789abcdef",
"The token to use for establishing bidirectional trust between nodes and control-plane nodes. The format is [a-z0-9]{6}\\.[a-z0-9]{16} - e.g. abcdef.0123456789abcdef",
)
}

View File

@ -93,7 +93,7 @@ func RetrieveValidatedConfigInfo(cfg *kubeadmapi.JoinConfiguration) (*clientcmda
}
detachedJWSToken, ok := insecureClusterInfo.Data[bootstrapapi.JWSSignatureKeyPrefix+token.ID]
if !ok || len(detachedJWSToken) == 0 {
return nil, errors.Errorf("token id %q is invalid for this cluster or it has expired. Use \"kubeadm token create\" on the master node to creating a new valid token", token.ID)
return nil, errors.Errorf("token id %q is invalid for this cluster or it has expired. Use \"kubeadm token create\" on the control-plane node to create a new valid token", token.ID)
}
if !bootstrap.DetachedTokenIsValid(detachedJWSToken, insecureKubeconfigString, token.ID, token.Secret) {
return nil, errors.New("failed to verify JWS signature of received cluster info object, can't trust this API Server")

View File

@ -109,16 +109,16 @@ func masterNodesReady(client clientset.Interface) error {
LabelSelector: selector.String(),
})
if err != nil {
return errors.Wrap(err, "couldn't list masters in cluster")
return errors.Wrap(err, "couldn't list control-planes in cluster")
}
if len(masters.Items) == 0 {
return errors.New("failed to find any nodes with master role")
return errors.New("failed to find any nodes with a control-plane role")
}
notReadyMasters := getNotReadyNodes(masters.Items)
if len(notReadyMasters) != 0 {
return errors.Errorf("there are NotReady masters in the cluster: %v", notReadyMasters)
return errors.Errorf("there are NotReady control-planes in the cluster: %v", notReadyMasters)
}
return nil
}