k8s报错解决思路
问题1
1.报错信息如下
[root@ken1 ~]# kubectl get po
The connection to the server 192.168.64.11:6443 was refused - did you specify the right host or port?
解决思路:
1.首先检查kubelet以及dockers是否启动
2.检查交换分区是否关闭
本机是因为交换分区没有关闭造成的,在/etc/fstab文件中禁用重启系统即可
[root@ken1 ~]# free -h
total used free shared buff/cache available
Mem: 1.8G 188M 1.0G 8.6M 593M 1.4G
Swap: 2.0G 0B 2.0G
[root@ken1 ~]# vim /etc/fstab
[root@ken1 ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Wed Aug 14 15:30:02 2019
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/cl-root / xfs defaults 0 0
UUID=5ab6cfa4-d753-4d73-b3d6-ebf408b58b56 /boot xfs defaults 0 0
#/dev/mapper/cl-swap swap swap defaults 0 0
再次查看,问题解决
[root@ken1 ~]# kubectl get no
NAME STATUS ROLES AGE VERSION
ken1 Ready master 3d15h v1.15.2
ken2 Ready <none> 3d15h v1.15.2
ken3 Ready <none> 3d15h v1.15.2
==============================================================================
问题2
节点加入集群中报如下的错误
[root@ken2 ~]# kubeadm join 192.168.232.199:6443 --token 5fsbj7.3iobmze5ow8jcz4w --discovery-token-ca-cert-hash sha256:c17bcdcf9b65fef975527d3b02d9cc22621b77916a974a35b112fc5639cb4e77
[preflight] Running pre-flight checks
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[WARNING SystemVerification]: this Docker version is not on the list of validated versions: 19.03.1. Latest validated version: 18.09
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
[kubelet-start] Downloading configuration for the kubelet from the "kubelet-config-1.15" ConfigMap in the kube-system namespace
[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] Activating the kubelet service
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...
[kubelet-check] Initial timeout of 40s passed.
error execution phase kubelet-start: error uploading crisocket: timed out waiting for the condition
解决办法
在从节点执行如下的命令
[root@ken2 ~]# kubeadm reset
[reset] WARNING: Changes made to this host by 'kubeadm init' or 'kubeadm join' will be reverted.
[reset] Are you sure you want to proceed? [y/N]: y
[preflight] Running pre-flight checks
W0820 16:03:33.400935 56927 removeetcdmember.go:79] [reset] No kubeadm config, using etcd pod spec to get data directory
[reset] No etcd config found. Assuming external etcd
[reset] Please, manually reset etcd to prevent further issues
[reset] Stopping the kubelet service
[reset] Unmounting mounted directories in "/var/lib/kubelet"
[reset] Deleting contents of config directories: [/etc/kubernetes/manifests /etc/kubernetes/pki]
[reset] Deleting files: [/etc/kubernetes/admin.conf /etc/kubernetes/kubelet.conf /etc/kubernetes/bootstrap-kubelet.conf /etc/kubernetes/controller-manager.conf /etc/kubernetes/scheduler.conf]
[reset] Deleting contents of stateful directories: [/var/lib/kubelet /etc/cni/net.d /var/lib/dockershim /var/run/kubernetes]
The reset process does not reset or clean up iptables rules or IPVS tables.
If you wish to reset iptables, you must do so manually.
For example:
iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X
If your cluster was setup to utilize IPVS, run ipvsadm --clear (or similar)
to reset your system's IPVS tables.
The reset process does not clean your kubeconfig files and you must remove them manually.
Please, check the contents of the $HOME/.kube/config file.
然后根据提示执行下面的命令
[root@ken2 ~]# iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X
再次加入即可成功
======================================================================
Continue Reading
k8s报错解决思路的更多相关文章
- OOS 预览报错解决思路
预览报错解决思路: 官方链接:https://docs.microsoft.com/zh-cn/officeonlineserver/office-online-server :> 查看服务器内 ...
- k8s报错解决
. Jul :: lab3 etcd[]: the server is already initialized as member before, starting as etcd member... ...
- PA模块报错-实际返回的行数超出请求的行数(分析标准FORM报错解决思路)
录入预算报错时报错: 分析:这个错误是select into 语句返回多行的结果,但具体在哪? 两种方法查找,trace 或者debug 1.trace 启用调试 获取trace文件 -bash-3. ...
- 在vue中使用lang="scss"出现报错解决思路
最近在学习vue框架,使用lang="scss" 出现如下错误: This dependency was not found: * !!vue-style-loader!css-l ...
- dubbo配置文件报错解决思路
导入dubbo项目到Eclipse,配置文件报了如下异常: Multiple annotations found at this line: - cvc-complex-type.2.4.c: The ...
- MacOS 导入MySQLdb 报错解决思路(解决ImportError: this is MySQLdb version (1, 2, 3, 'beta', 1), but _mysql is version (1, 2, 5, 'final', 1))
cd /Library/Python/2.7/site-packages ls rm -rf MySQL_python-1.2.5-py2.7.egg-info 然后重新import 即可
- CentOS 6.5 Maven 编译 Apache Tez 0.8.3 踩坑/报错解决记录
最近准备学习使用Tez,因此从官网下载了最新的Tez 0.8.3源码,按照安装教程编译使用.平时使用的集群环境是离线的,本打算这一次也进行离线编译,无奈一编译就开始报缺少jar包的错,即使手动下载ja ...
- sphinx :undefined reference to `libiconv' 报错解决办法
sphinx :undefined reference to `libiconv' 报错解决办法 2013-11-30 21:45:39 安装sphinx时不停报错...郁闷在make时报错,错误 ...
- redis运用连接池报错解决
redis使用连接池报错解决redis使用十几小时就一直报异常 redis.clients.jedis.exceptions.JedisConnectionException: Could not g ...
随机推荐
- 利用C#实现OPC-UA服务端
前言 最近接手了一个项目,做一个 OPC-UA 服务端?刚听到这个消息我是一脸懵,发自灵魂的三问“OPC-UA是什么?”.“要怎么做?”.“有什么用?”.我之前都是做互联网相关的东西,这种物联网的还真 ...
- 【TTS】文本转语音?如何不调用第三方api来实现,使用pyttsx3
@ 目录 前言 安装pyttsx3 实现TTS接口 后言 前言 本次的实现需求有点困难,所以也就记录下来,别到时候都忘了. 首先先不说正题,有兴趣的可以看一看: 1.目标是实现一个可以传一个文本就返回 ...
- Jmeter 常用函数(13)- 详解 __machineIP
如果你想查看更多 Jmeter 常用函数可以在这篇文章找找哦 https://www.cnblogs.com/poloyy/p/13291704.html 作用 返回机器(电脑)IP 语法格式 ${_ ...
- centos7 nginx yum 配置
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/7/$basearch/ gpgcheck= enabled=
- 弱校验之@NotNull@NotEmpty@NotBlank
@NotNull 适用于非空判断 The annotated element must not be {@code null}. CharSequence, Collection, Map 和 Arr ...
- Java面试题(Spring Boot/Spring Cloud篇)
Spring Boot/Spring Cloud 104.什么是 spring boot? SpringBoot是一个框架,一种全新的编程规范,他的产生简化了框架的使用,所谓简化是指简化了Spring ...
- 搜索会抓取网站域名的whoise信息吗
http://www.wocaoseo.com/thread-309-1-1.html 网站是否在信产部备案,这是不是会成为影响网站收录和排名的一个因素?百度是否会抓取域名注册人的相关whois信息吗 ...
- python3+pyqt5+opencv3简单使用
python3+pyqt5+opencv3简单使用(转载) 关于python3下搭建pyqt5(pycharm)参考这条链接. 对于pyqt的使用个人比较建议ui设计与逻辑功能分开开发. 下面介绍下简 ...
- Inno Setup Compiler 中文使用教程
一.概要 该文章主要解决,Inno Setup Compiler工具的使用问题. 如有什么建议欢迎提出,本人及时修改.[如有任何疑惑可以加Q群:580749909] 二.步骤 (1)下载地址:http ...
- Labview学习之路(十)文本文件再次写入不覆盖