[K8S]error execution phase preflight: couldn‘t validate the identity of the API Server

这篇具有很好参考价值的文章主要介绍了[K8S]error execution phase preflight: couldn‘t validate the identity of the API Server。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

用kubeadm工具,k8s使用kubeadm join将工作节点加入到主控节点的时候遇到如下问题,执行命令卡顿很久后报错

[root@k8s2 ~]# kubeadm join 192.168.0.180:6443 --token uyylx2.7z02nonw8xgprh5y --discovery-token-ca-cert-hash sha256:0c81e2684c99b6af608f6cdc77c0a81a2d5284d72bcf3353d25fa37bd46839e2 --ignore-preflight-errors=SystemVerification
[preflight] Running pre-flight checks
[WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.6. Latest validated version: 19.03

error execution phase preflight: couldn't validate the identity of the API Server: could not find a JWS signature in the cluster-info ConfigMap for token ID "uyylx2"
To see the stack trace of this error execute with --v=5 or higher

问题原因 kubeadm主控节点安装好后,token有效期24小时,如果超过了24小时,工作节点加入到主控节点就会报错,需要重新刷新主控节点的token

解决:

1、在主控节点执行如下命令得到结果如下

[root@k8s1 ~]# kubeadm token create --print-join-command
kubeadm join 192.168.0.180:6443 --token ftuwlv.41r1rbvk17f2mb0w --discovery-token-ca-cert-hash sha256:0c81e2684c99b6af608f6cdc77c0a81a2d5284d72bcf3353d25fa37bd46839e2

2、复制上面的结果在工作节点执行即可文章来源地址https://www.toymoban.com/news/detail-447019.html

[root@k8s2 ~]# kubeadm join 192.168.0.180:6443 --token ftuwlv.41r1rbvk17f2mb0w --discovery-token-ca-cert-hash sha256:0c81e2684c99b6af608f6cdc77c0a81a2d5284d72bcf3353d25fa37bd46839e2
[preflight] Running pre-flight checks
[WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.6. Latest validated version: 19.03
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Starting the kubelet
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...

This node has joined the cluster:
* Certificate signing request was sent to apiserver and a response was received.
* The Kubelet was informed of the new secure connection details.

Run 'kubectl get nodes' on the control-plane to see this node join the cluster.

到了这里,关于[K8S]error execution phase preflight: couldn‘t validate the identity of the API Server的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包赞助服务器费用

相关文章

  • K8s Error: ImagePullBackOff 故障排除

    K8s Error: ImagePullBackOff 故障排除

    起因是要在一组k8s环境下做个Prometheus的测试,当时虚拟机用完直接暂停了. 启动完master和node节点后重启了这些节点. 当检查dashboard时候发现Pod处于ImagePullBackOff状态,使用命令查看详细情况 发现镜像拉取失败 这个故障明显是由于node节点拉取harbor中镜像失败造成.那么可能的原因就

    2024年01月25日
    浏览(12)
  • 已解决: Error: ErrImagePull (K8s) 问题

    已解决: Error: ErrImagePull (K8s) 问题

    🌷🍁 博主猫头虎(🐅🐾)带您 Go to New World✨🍁 🦄 博客首页 : 🐅🐾猫头虎的博客🎐 《面试题大全专栏》 🦕 文章图文并茂🦖生动形象🐅简单易学!欢迎大家来踩踩~🌺 《IDEA开发秘籍专栏》 🐾 学会IDEA常用操作,工作效率翻倍~💐 《100天精通Golang(基础入门篇)》 🐅

    2024年02月21日
    浏览(9)
  • K8S Error getting node问题的排查思路

    在安装K8S集群或者运行过程中,大家可能会遇到 \\\"Error gettting node\\\" 的问题,例如: 排查这类问题的方法是执行如下命令查看具体错误原因: 找到最初的报错,根据不同的错误进行处理。 根据我遇到过的问题,主要有以下可能: 没有禁用swap内存 pause镜像没有下载成功(这里尤

    2024年02月13日
    浏览(9)
  • k8s的error: metrics not available yet问题处理

    k8s的error: metrics not available yet问题处理

    因项目要求,需在k8s集群中使用 kubectl top node命令,但是一直报 error: metrics not available yet 错误。为了更好的复现问题,我们将本次解决问题的步骤整理如下。 k8s版本:v1.23.5 k8s部署方式:kubeadm 部署metric-server,使用yaml方式进行部署,因为git下载不下来,我提前下载下来,然后

    2024年01月24日
    浏览(8)
  • K8S异常之Unable to connect to the server: x509: certificate has expired or is not yet valid

    K8S异常之Unable to connect to the server: x509: certificate has expired or is not yet valid

    2.1 处理步骤 2.2 处理步骤详细情况 如上,发现很多证书都是 invalid 的状态,接着更新证书: 如下,更新证书后,证书过期时间已经更新为 365d 3.1 再次查看kubectl get node,发现有新的错误: error: You must be logged in to the server (Unauthorized) 3.2 上述错误解决方案 备份配置文件 cp -rp

    2024年02月03日
    浏览(43)
  • 记【k8s】:访问 Prometheus UI界面:Warning: Error fetching server time

    记【k8s】:访问 Prometheus UI界面:Warning: Error fetching server time

    💖The Begin💖点点关注,收藏不迷路💖 Warning: Error fetching server time: Detected 86338.77700018883 seconds time difference between your browser and the server. Prometheus relies on accurate time and time drift might cause unexpected query results. 这个警告表明您的浏览器和服务器之间存在大约 86338.777 秒的时间差异,这

    2024年04月17日
    浏览(34)
  • k8s报错的解决办法: kubelet的日志出现 Error getting node的报错。

    k8s报错的解决办法: kubelet的日志出现 Error getting node的报错。

    先看一下报错的图片 这是在初始化maser的时候报的错。 我的环境情况 k8s:1.22.12 docker: 18.06.3 操作系统以及内核版本 解决办法 首先检查你到底写没写错 确定你的主机名字无误后,那么就进行这一步吧,无奈之举了 修改docker的配置文件 修改kubelet的启动项 或者 直接使用老版本

    2023年04月09日
    浏览(14)
  • [k8s] error: Readiness probe failed: HTTP probe failed with statuscode: 503

    k8s issue:  error: Readiness probe failed: HTTP probe failed with statuscode: 503 explanation: Kubernetes为准备和活动探测返回HTTP 503错误的事实意味着到后端的连接可能有问题。 有趣的是,这不是重点。这些探针不是用来执行HTTP流的端到端测试的。探测只用于验证它们所监视的服务是否响应。 简

    2024年02月01日
    浏览(13)
  • 【云原生-k8s】kubectl top pod 报错:error: Metrics API not available

    🍁 博主简介   🏅云计算领域优质创作者   🏅华为云开发者社区专家博主   🏅阿里云开发者社区专家博主 💊 交流社区: 运维交流社区 欢迎大家的加入!

    2023年04月09日
    浏览(11)
  • K8S--安装metrics-server,解决error: Metrics API not available问题

    K8S--安装metrics-server,解决error: Metrics API not available问题

    原文网址:K8S--安装metrics-server,解决error: Metrics API not available问题-CSDN博客 本文介绍K8S通过安装metrics-server来解决error: Metrics API not available问题的方法。 Metrics Server采用了Kubernetes Metrics API的标准,它使用HTTP接口来暴露度量指标数据,通过轮询来收集这些数据,然后将其存储在

    2024年02月22日
    浏览(14)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包