当前位置: 首页 > wzjs >正文

企业网站开发说明wordpress的域名不备案

企业网站开发说明,wordpress的域名不备案,最便宜的网站叫什么名字,wordpress 虚拟币目录 Kubernetes/KubeSphere 安装踩坑记:从 context deadline exceeded 到成功部署的完整排障笔记 一、问题现象 二、第一手日志采集 三、定位思路 四、分步解决 4-1 处理 pause:3.8 4-2 处理 kube-apiserver:v1.31.0 五、再次安装并验证 六、经验总结 七…

目录

Kubernetes/KubeSphere 安装踩坑记:从 context deadline exceeded 到成功部署的完整排障笔记

一、问题现象

二、第一手日志采集

三、定位思路

四、分步解决

4-1 处理 pause:3.8

4-2 处理 kube-apiserver:v1.31.0

五、再次安装并验证

六、经验总结

七、尾声


Kubernetes/KubeSphere 安装踩坑记:从 context deadline exceeded 到成功部署的完整排障笔记

适用版本:Kubernetes 1.31.x / KubeSphere 4.1
运行时:containerd
操作系统:CentOS 7.9


一、问题现象

执行 ./kk create cluster -f config-sample.yaml 初始化节点,安装脚本在 wait-control-plane 阶段反复重试并最终报错:

context deadline exceeded
error execution phase wait-control-plane: could not initialize a Kubernetes cluster

此时主节点 kubelet 日志刷屏,集群始终无法启动。


二、第一手日志采集

# kubelet 当前状态
systemctl status kubelet -l# 10 分钟内关键错误
sudo journalctl -u kubelet --since "10 minutes ago" | grep -Ei "error|failed|cgroup"

核心错误片段:

failed to get sandbox image "registry.k8s.io/pause:3.8":
dial tcp 173.194.203.82:443: i/o timeout

以及后续安装 KubeSphere 组件时:

failed to pull image "docker.io/kubesphere/kube-apiserver:v1.31.0":
500 Internal Server Error

三、定位思路

线索结论
pod sandbox 创建失败 无法拉取 pause:3.8根因:国外镜像仓库被墙,pull 超时
kube-apiserver 镜像 500 错误Docker Hub 临时故障 / 国内网络劣化

两个核心镜像拉取失败 → kubelet 无法启动沙箱容器 → control plane 卡死。


四、分步解决

详细离线导入方法请见:
《从零实现 registry.k8s.io/pause:3.8 镜像的导出与导入》
《从零实现 crictl pull kubesphere/kube-apiserver:v1.31.0 的全流程操作》

4-1 处理 pause:3.8
  1. 在能出网的跳板机

    docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.8
    docker tag  registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.8 \registry.k8s.io/pause:3.8
    docker save registry.k8s.io/pause:3.8 -o pause-3.8.tar
    
  2. 拷贝至目标节点并导入 containerd

    scp pause-3.8.tar node1:/tmp/
    sudo ctr -n k8s.io images import /tmp/pause-3.8.tar
    
  3. 确认导入成功

    crictl images | grep pause
    
4-2 处理 kube-apiserver:v1.31.0
  1. 预拉镜像并导出

    docker pull kubesphere/kube-apiserver:v1.31.0
    docker save kubesphere/kube-apiserver:v1.31.0 -o kube-apiserver-1.31.0.tar
    
  2. 目标节点导入

    sudo ctr -n k8s.io images import kube-apiserver-1.31.0.tar
    

技巧:直接用 crictl pull --image-endpoint 也行,但离线文件更稳妥,可反复使用。


五、再次安装并验证

./kk create cluster -f config-sample.yaml --with-local-storage
  • kubelet 不再报 failed to get sandbox image

  • control-plane 组件全部 Running

  • kubectl get node -o wide 显示所有节点 Ready


六、经验总结

类别建议
镜像策略对所有 基础镜像(pause、coredns、etcd)控制面镜像 预先离线导入,彻底规避外网依赖
containerd 命名空间使用 ctr -n k8s.io images import,否则镜像导入到 default 后 kubelet 依旧找不到
crictl 调试`crictl ps -a
自动化脚本建议编写 image-cache.sh 批量处理 docker pull/tag/save,上线时一键导入
网络排障镜像 HEAD/GET 超时 ≈ DNS 劫持 / 443 被阻断,优先切换国内镜像源或自建 Harbor

七、尾声

这次“context deadline exceeded” 看似是 kubeadm 的错误,实则暴露了离线镜像策略的不完备。只要掌握 日志定位 → 镜像补全 → 再次验证 的闭环套路,类似问题能在 10 分钟内搞定。希望本文的实战笔记能帮助你在下一次部署 Kubernetes / KubeSphere 时一路绿灯 🚦。

以下是完整的错误记录

报错详情

Unfortunately, an error has occurred:
        context deadline exceeded

This error is likely caused by:
        - The kubelet is not running
        - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)

If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
        - 'systemctl status kubelet'
        - 'journalctl -xeu kubelet'

Additionally, a control plane component may have crashed or exited when started by the container runtime.
To troubleshoot, list all containers using your preferred container runtimes CLI.
Here is one example how you may list all running Kubernetes containers by using crictl:
        - 'crictl --runtime-endpoint unix:///run/containerd/containerd.sock ps -a | grep kube | grep -v pause'
        Once you have found the failing container, you can inspect its logs with:
        - 'crictl --runtime-endpoint unix:///run/containerd/containerd.sock logs CONTAINERID'
error execution phase wait-control-plane: could not initialize a Kubernetes cluster
To see the stack trace of this error execute with --v=5 or higher: Process exited with status 1
14:35:44 CST retry: [node1]

检查日志 systemctl status kubelet

看到报错内容

Apr 23 14:39:42 node1 kubelet[44232]: E0423 14:39:42.697307   44232 eviction_manager.go:285] "Eviction manager: failed to get summary stats" err="failed to get node info: node \"node1\" not found"
Apr 23 14:39:48 node1 kubelet[44232]: E0423 14:39:48.736613   44232 event.go:368] "Unable to write event (may retry after sleeping)" err="Post \"https://lb.kubesphere.local:6443/api/v1/namespaces/default/events\": dial tcp 10.33.34.166:6443: connect: connection refused" event="&Event{ObjectMeta:{node1.1838df18aab26a9c  default    0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] [] []},InvolvedObject:ObjectReference{Kind:Node,Namespace:,Name:node1,UID:node1,APIVersion:,ResourceVersion:,FieldPath:,},Reason:NodeHasSufficientMemory,Message:Node node1 status is now: NodeHasSufficientMemory,Source:EventSource{Component:kubelet,Host:node1,},FirstTimestamp:2025-04-23 14:35:52.642095772 +0800 CST m=+0.729483809,LastTimestamp:2025-04-23 14:35:52.642095772 +0800 CST m=+0.729483809,Count:1,Type:Normal,EventTime:0001-01-01 00:00:00 +0000 UTC,Series:nil,Action:,Related:nil,ReportingController:kubelet,ReportingInstance:node1,}"
Apr 23 14:39:49 node1 kubelet[44232]: E0423 14:39:49.241750   44232 controller.go:145] "Failed to ensure lease exists, will retry" err="Get \"https://lb.kubesphere.local:6443/apis/coordination.k8s.io/v1/namespaces/kube-node-lease/leases/node1?timeout=10s\": dial tcp 10.33.34.166:6443: connect: connection refused" interval="7s"
Apr 23 14:39:49 node1 kubelet[44232]: I0423 14:39:49.468021   44232 kubelet_node_status.go:72] "Attempting to register node" node="node1"
Apr 23 14:39:49 node1 kubelet[44232]: E0423 14:39:49.468592   44232 kubelet_node_status.go:95] "Unable to register node with API server" err="Post \"https://lb.kubesphere.local:6443/api/v1/nodes\": dial tcp 10.33.34.166:6443: connect: connection refused" node="node1"
Apr 23 14:39:52 node1 kubelet[44232]: E0423 14:39:52.698356   44232 eviction_manager.go:285] "Eviction manager: failed to get summary stats" err="failed to get node info: node \"node1\" not found"
Apr 23 14:39:53 node1 systemd[1]: Stopping kubelet: The Kubernetes Node Agent...
Apr 23 14:39:53 node1 systemd[1]: kubelet.service: Deactivated successfully.
Apr 23 14:39:53 node1 systemd[1]: Stopped kubelet: The Kubernetes Node Agent.
Apr 23 14:39:53 node1 systemd[1]: kubelet.service: Consumed 5.322s CPU time.

仔细检查日志, 发现报错

sudo journalctl -u kubelet --since "10 minutes ago" | grep -iE "error|cgroup|failed"

Apr 23 15:17:13 node1 kubelet[48293]: E0423 15:17:13.238787   48293 log.go:32] "RunPodSandbox from runtime service failed" err="rpc error: code = Unknown desc = failed to get sandbox image \"registry.k8s.io/pause:3.8\": failed to pull image \"registry.k8s.io/pause:3.8\": failed to pull and unpack image \"registry.k8s.io/pause:3.8\": failed to resolve reference \"registry.k8s.io/pause:3.8\": failed to do request: Head \"https://us-west2-docker.pkg.dev/v2/k8s-artifacts-prod/images/pause/manifests/3.8\": dial tcp 173.194.203.82:443: i/o timeout"

解决pause:3.8的问题参考文章 从零实现 registry.k8s.io/pause:3.8 镜像的导出与导入

另外查看日志也可能遇到 kube-apiserver下载失败的情况

pull image failed: Failed to exec command: sudo -E /bin/bash -c "env PATH=$PATH crictl pull kubesphere/kube-apiserver:v1.31.0" 
E0424 10:32:36.669380   14293 remote_image.go:180] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"docker.io/kubesphere/kube-apiserver:v1.31.0\": failed to resolve reference \"docker.io/kubesphere/kube-apiserver:v1.31.0\": unexpected status from HEAD request to https://docker.1ms.run/v2/kubesphere/kube-apiserver/manifests/v1.31.0?ns=docker.io: 500 Internal Server Error" image="kubesphere/kube-apiserver:v1.31.0"
FATA[0031] pulling image: failed to pull and unpack image "docker.io/kubesphere/kube-apiserver:v1.31.0": failed to resolve reference "docker.io/kubesphere/kube-apiserver:v1.31.0": unexpected status from HEAD request to https://docker.1ms.run/v2/kubesphere/kube-apiserver/manifests/v1.31.0?ns=docker.io: 500 Internal Server Error: Process exited with status 1
10:32:36 CST retry: [node1]

参考: 从零实现 crictl pull kubesphere/kube-apiserver:v1.31.0 的全流程操作

然后再执行安装即可成功了

./kk create cluster -f config-sample.yaml --with-local-storage


文章转载自:

http://2hwXP6A5.rqwmt.cn
http://UGe37C1a.rqwmt.cn
http://z1BRKlF1.rqwmt.cn
http://6nYqtsu0.rqwmt.cn
http://ZZgx5w5s.rqwmt.cn
http://KLUy2vbH.rqwmt.cn
http://dDOFWFyK.rqwmt.cn
http://a3C0YoEn.rqwmt.cn
http://whg991bF.rqwmt.cn
http://XJYA094z.rqwmt.cn
http://0gTUMzcj.rqwmt.cn
http://ITWAtyRx.rqwmt.cn
http://KfVjB5Kh.rqwmt.cn
http://DeyEr82C.rqwmt.cn
http://QKECf7kN.rqwmt.cn
http://Z2UOpmlL.rqwmt.cn
http://9lmWlOmG.rqwmt.cn
http://QtG7tkRo.rqwmt.cn
http://Gp4ow4WK.rqwmt.cn
http://heOeiv4Z.rqwmt.cn
http://lawADHDV.rqwmt.cn
http://WvnH1f6U.rqwmt.cn
http://uhdQ6fla.rqwmt.cn
http://A6VDxW6G.rqwmt.cn
http://k2vstr31.rqwmt.cn
http://VOxKSRBX.rqwmt.cn
http://nWCLnbWT.rqwmt.cn
http://K1MhcEbS.rqwmt.cn
http://jfUBRFt4.rqwmt.cn
http://pkUZ1Hsj.rqwmt.cn
http://www.dtcms.com/wzjs/631283.html

相关文章:

  • 网站seo优化合同淘宝怎么做引流和推广
  • PHP+Ajax网站开发典型实例全国做网站公司前十名
  • 物流公司网站建设系统规划那个网站建设好
  • 写文案要看的网站怎样自己做公司网站
  • 网站备案有什么好处理网站制作费用多少
  • 河源市做网站wordpress编辑写文章失败
  • 个人网站设计与实现结论滁州seo优化
  • 网站 成功案例seo排名优化北京
  • 网站优化怎样的湖南建设监理协会网站
  • 第三方网站开发优缺点优质的外国网站
  • 吉他谱网站如何建设WordPress缩略图太模糊
  • 网站建设中 英文深圳外贸建设网站
  • 如何查看一个网站的浏览量百度开放云做网站
  • 自己想做一个网站怎么做企业组织架构
  • 朋友圈海报用什么网站做的昆明优化网站公司
  • 推广业务网站建设网站建设的步骤过程视频
  • 建行手机网站新品上市的营销方案
  • html网站设计源码带后台的响应式网站
  • 网站总浏览量免费建手机商城网站
  • 网站批量上传服务器wordpress播放视频播放
  • 福州企业高端网站建设制作哪家好做网站多少钱西宁君博示范
  • 重庆网站建设冒号网站代码怎么写
  • 单页产品网站源码带后台免费的网站推广软件
  • 丹麦网站后缀专做白酒的网站
  • 网站搜索引擎关键字怎么做网站建站公司多少钱
  • 申请了域名 网站怎么建设呢网站推广公司兴田德润官网多少
  • 上海高端模板建站网站流量如何提高
  • 网站开发感受东莞网站建设 石化
  • 济南网站中企动力重庆快速网站推广
  • 网站推广排名有什么技巧jquery 个人网站