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

【K8S:初始化】:执行kubeadm显示:connection refused.

文章目录

[root@10 kubernetes]# kubeadm init --kubernetes-version=v1.23.0 --image-repository=registry.aliyuncs.com/google_containers --apiserver-advertise-address=192.168.56.104
[init] Using Kubernetes version: v1.23.0
[preflight] Running pre-flight checks
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
[certs] Using certificateDir folder "/etc/kubernetes/pki"
[certs] Generating "ca" certificate and key
[certs] Generating "apiserver" certificate and key
[certs] apiserver serving cert is signed for DNS names [adam-init-master kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 192.168.56.104]
[certs] Generating "apiserver-kubelet-client" certificate and key
[certs] Generating "front-proxy-ca" certificate and key
[certs] Generating "front-proxy-client" certificate and key
[certs] Generating "etcd/ca" certificate and key
[certs] Generating "etcd/server" certificate and key
[certs] etcd/server serving cert is signed for DNS names [adam-init-master localhost] and IPs [192.168.56.104 127.0.0.1 ::1]
[certs] Generating "etcd/peer" certificate and key
[certs] etcd/peer serving cert is signed for DNS names [adam-init-master localhost] and IPs [192.168.56.104 127.0.0.1 ::1]
[certs] Generating "etcd/healthcheck-client" certificate and key
[certs] Generating "apiserver-etcd-client" certificate and key
[certs] Generating "sa" key and public key
[kubeconfig] Using kubeconfig folder "/etc/kubernetes"
[kubeconfig] Writing "admin.conf" kubeconfig file
[kubeconfig] Writing "kubelet.conf" kubeconfig file
[kubeconfig] Writing "controller-manager.conf" kubeconfig file
[kubeconfig] Writing "scheduler.conf" kubeconfig file
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Starting the kubelet
[control-plane] Using manifest folder "/etc/kubernetes/manifests"
[control-plane] Creating static Pod manifest for "kube-apiserver"
[control-plane] Creating static Pod manifest for "kube-controller-manager"
[control-plane] Creating static Pod manifest for "kube-scheduler"
[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[kubelet-check] Initial timeout of 40s passed.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.

第一行驱动配置没填写:“registry-mirrors”: [“https://hnkfbj7x.mirror.aliyuncs.com”],
补上去

tee /etc/docker/daemon.json <<-'EOF'
{"registry-mirrors": ["https://hnkfbj7x.mirror.aliyuncs.com"],"exec-opts": ["native.cgroupdriver=systemd"]
}
EOF重启docker 重启kubelet
http://www.lryc.cn/news/340726.html

相关文章:

  • msvcp140_1.dll是什么?找不到msvcp140_1.dll丢失解决方法
  • 【Java探索之旅】掌握数组操作,轻松应对编程挑战
  • 深入理解同步与异步编程及协程管理在Python中的应用
  • Win10本地更新无法升级win11 的0x80080005解决方法
  • 互联网轻量级框架整合之MyBatis核心组件
  • springboot websocket 持续打印 pod 日志
  • C代码编译过程与进程内存分布
  • Windows 部署ChatGLM3大语言模型
  • JS相关八股之什么是事件循环
  • SpringCloud集成Skywalking链路追踪和日志收集
  • HTTP 域名和主机是一回事吗?有了主机和域名,如何建站?
  • 运营干货:四个技巧掌握爆款选题方法
  • 柯桥商务口语之怎么样说英语更加礼貌?十个礼貌用语get起来!
  • 嵌入式工程师如何摸鱼?
  • C++语言题库(一)—— 基本知识类
  • gemini1.5 API调用
  • C++从入门到精通——const与取地址重载
  • 手写spring IOC底层源码来模拟spring如何利用多级缓存解决循环依赖的问题
  • C++11 Thead线程和线程池
  • Windows版Apache 2.4.59解压直用(免安装-绿色-项目打包直接使用)
  • 刀具表面上的微结构
  • css3实现微信扫码登陆动画
  • vue3 导入excel数据
  • C# linq 根据多字段动态Group by
  • C语言学习/复习22----阶段测评编程题
  • LeetCode-1766. 互质树【树 深度优先搜索 广度优先搜索 数组 数学 数论】
  • “数据安全服务能力”评定资格认证!不容错过
  • 【MATLAB 分类算法教程】_3麻雀搜索算法优化支持向量机SVM分类 - 教程和对应MATLAB代码
  • 利用机器学习库做动态定价策略的例子
  • Tcpdump -r 解析pcap文件