fs.StringVar(kubeConfigFile,"kubeconfig",*kubeConfigFile,"The KubeConfig file to use when talking to the cluster. If the flag is not set, a set of standard locations are searched for an existing KubeConfig file.")
fs.StringVar(kubeConfigFile,"kubeconfig",*kubeConfigFile,"The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations are searched for an existing KubeConfig file.")
}
}
// AddConfigFlag adds the --config flag to the given flagset
// AddConfigFlag adds the --config flag to the given flagset
// buildSecureBootstrapKubeConfig makes a KubeConfig object that connects securely to the API Server for bootstrapping purposes (validating with the specified CA)
// buildSecureBootstrapKubeConfig makes a kubeconfig object that connects securely to the API Server for bootstrapping purposes (validating with the specified CA)
return[]error{fmt.Errorf("kubernetes version is greater than kubeadm version. Please consider to upgrade kubeadm. kubernetes version: %s. Kubeadm version: %d.%d.x",k8sVersion,kadmVersion.Components()[0],kadmVersion.Components()[1])},nil
return[]error{fmt.Errorf("Kubernetes version is greater than kubeadm version. Please consider to upgrade kubeadm. Kubernetes version: %s. Kubeadm version: %d.%d.x",k8sVersion,kadmVersion.Components()[0],kadmVersion.Components()[1])},nil
returnnil,[]error{fmt.Errorf("the kubelet version is higher than the control plane version. This is not a supported version skew and may lead to a malfunctional cluster. Kubelet version: %q Control plane version: %q",kubeletVersion,k8sVersion)}
returnnil,[]error{fmt.Errorf("the kubelet version is higher than the control plane version. This is not a supported version skew and may lead to a malfunctional cluster. Kubelet version: %q Control plane version: %q",kubeletVersion,k8sVersion)}
t.Errorf("KubeletVersionCheck: unexpected warnings for kubelet version %q and kubernetes version %q. Warnings: %v",tc.kubeletVersion,tc.k8sVersion,warnings)
t.Errorf("KubeletVersionCheck: unexpected warnings for kubelet version %q and Kubernetes version %q. Warnings: %v",tc.kubeletVersion,tc.k8sVersion,warnings)
casewarnings==nil&&tc.expectWarnings:
casewarnings==nil&&tc.expectWarnings:
t.Errorf("KubeletVersionCheck: expected warnings for kubelet version %q and kubernetes version %q but got nothing",tc.kubeletVersion,tc.k8sVersion)
t.Errorf("KubeletVersionCheck: expected warnings for kubelet version %q and Kubernetes version %q but got nothing",tc.kubeletVersion,tc.k8sVersion)
caseerrors!=nil&&!tc.expectErrors:
caseerrors!=nil&&!tc.expectErrors:
t.Errorf("KubeletVersionCheck: unexpected errors for kubelet version %q and kubernetes version %q. errors: %v",tc.kubeletVersion,tc.k8sVersion,errors)
t.Errorf("KubeletVersionCheck: unexpected errors for kubelet version %q and Kubernetes version %q. errors: %v",tc.kubeletVersion,tc.k8sVersion,errors)
caseerrors==nil&&tc.expectErrors:
caseerrors==nil&&tc.expectErrors:
t.Errorf("KubeletVersionCheck: expected errors for kubelet version %q and kubernetes version %q but got nothing",tc.kubeletVersion,tc.k8sVersion)
t.Errorf("KubeletVersionCheck: expected errors for kubelet version %q and Kubernetes version %q but got nothing",tc.kubeletVersion,tc.k8sVersion)
returnerrors.Errorf("this version of kubeadm only supports deploying clusters with the control plane version >= %s. Current version: %s",constants.MinimumControlPlaneVersion.String(),cfg.KubernetesVersion)
returnerrors.Errorf("this version of kubeadm only supports deploying clusters with the control plane version >= %s. Current version: %s",constants.MinimumControlPlaneVersion.String(),cfg.KubernetesVersion)