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 ...
随机推荐
- node-sass 报错的解决方法
今天在运行项目发现原来好好的项目报错了.报错大致信息如下: 这段代码是我升级node之后里面根据不同的项目位置什么的会有所不同. 简单的说,这段代码意思是node-sass 不兼容 node v8 的 ...
- Fiddler+模拟器+APP抓包HTTPS 为什么有时候抓不到?
抓包的原理是什么? 代理 客户端请求 -> 经过代理 -> 到达服务端 服务端返回 -> 经过代理 -> 到达客户端 任何Https的App都能抓到包么? Android7.0 ...
- 洛谷 P6218 [USACO06NOV] Round Numbers S
洛谷 P6218 [USACO06NOV] Round Numbers S 题目描述 如果一个正整数的二进制表示中,\(0\) 的数目不小于 \(1\) 的数目,那么它就被称为「圆数」. 例如,\(9 ...
- peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 133
调试nordic 52840 hids_keyboard 例程时,和手机配对,配对失败,提示:peer_manager_handler: Connection security failed: rol ...
- linux下top命令详细介绍
linux下top命令详细介绍 top 命令是 Linux 下常用的系统资源占用查看及性能分析工具,能够实时显示系统中各个进程的资源(比如cpu.内存的使用)占用状况,top命令的执行结果是一个动态显 ...
- 第7章 Spark SQL 的运行原理(了解)
第7章 Spark SQL 的运行原理(了解) 7.1 Spark SQL运行架构 Spark SQL对SQL语句的处理和关系型数据库类似,即词法/语法解析.绑定.优化.执行.Spark SQL会先将 ...
- Neurosurgeon: Collaborative Intelligence Between the Cloud and Mobile Edge
郑重声明:原文参见标题,如有侵权,请联系作者,将会撤销发布! ASPLOS ’17, April 08-12, 2017, Xi’an, China Abstract 如今的智能个人助理,如Apple ...
- 01.图文理解RDB和AOF两种持久化机制
一.RDB和AOF两种持久化机制的介绍 RDB:对redis中的数据执行周期性的持久化,每隔一个时刻生成一个RDB文件,这个RDB文件包含这个时刻所有的数据. AOF:记录每条写入命令,以append ...
- ReentrantLock可中断锁和synchronized区别
ReentrantLock中的lockInterruptibly()方法使得线程可以在被阻塞时响应中断,比如一个线程t1通过lockInterruptibly()方法获取到一个可重入锁,并执行一个长时 ...
- Labview学习之路(十)文本文件再次写入不覆盖