mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
kubeadm cleanup: master -> control-plane
This commit is contained in:
parent
a3877b1776
commit
0e8941f7ec
@ -64,7 +64,7 @@ var (
|
|||||||
|
|
||||||
* Certificate signing request was sent to apiserver and approval was received.
|
* Certificate signing request was sent to apiserver and approval was received.
|
||||||
* The Kubelet was informed of the new secure connection details.
|
* 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.
|
* The Kubernetes control plane instances scaled up.
|
||||||
{{.etcdMessage}}
|
{{.etcdMessage}}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ type BootstrapTokenOptions struct {
|
|||||||
func (bto *BootstrapTokenOptions) AddTokenFlag(fs *pflag.FlagSet) {
|
func (bto *BootstrapTokenOptions) AddTokenFlag(fs *pflag.FlagSet) {
|
||||||
fs.StringVar(
|
fs.StringVar(
|
||||||
&bto.TokenStr, TokenStr, "",
|
&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",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ func RetrieveValidatedConfigInfo(cfg *kubeadmapi.JoinConfiguration) (*clientcmda
|
|||||||
}
|
}
|
||||||
detachedJWSToken, ok := insecureClusterInfo.Data[bootstrapapi.JWSSignatureKeyPrefix+token.ID]
|
detachedJWSToken, ok := insecureClusterInfo.Data[bootstrapapi.JWSSignatureKeyPrefix+token.ID]
|
||||||
if !ok || len(detachedJWSToken) == 0 {
|
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) {
|
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")
|
return nil, errors.New("failed to verify JWS signature of received cluster info object, can't trust this API Server")
|
||||||
|
@ -109,16 +109,16 @@ func masterNodesReady(client clientset.Interface) error {
|
|||||||
LabelSelector: selector.String(),
|
LabelSelector: selector.String(),
|
||||||
})
|
})
|
||||||
if err != nil {
|
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 {
|
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)
|
notReadyMasters := getNotReadyNodes(masters.Items)
|
||||||
if len(notReadyMasters) != 0 {
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user