k8s报错解决
、 Jul :: lab3 etcd[]: the server is already initialized as member before, starting as etcd member... https://www.cnblogs.com/ericnie/p/6886016.html [root@lab3 k8s]# systemctl start etcd
Job for etcd.service failed because the control process exited with error code. See "systemctl status etcd.service" and "journalctl -xe" for details [root@lab3 k8s]# journalctl -xe Jul :: lab3 etcd[]: the server is already initialized as member before, starting as etcd member... 核心语句 raft save state and entries error: open /var/lib/etcd/default.etcd/member/wal/.tmp: is a directory 解决: 进入相关目录,删除0.tmp,然后就可以启动啦! 删除后,把node3 上的配置的目录全部删除,然后再重新配置。 、 WARNING: all flags other than --config, --write-config-to, and --cleanup are deprecated. Please begin using a config file ASAP. [root@lab1 ~]# systemctl status kube-scheduler -l
● kube-scheduler.service - Kubernetes Scheduler Plugin
Loaded: loaded (/etc/systemd/system/kube-scheduler.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Thu -- :: EDT; 13min ago
Docs: https://github.com/kubernetes/kubernetes
Process: ExecStart=/usr/local/kubernetes/bin/kube-scheduler $KUBE_LOGTOSTDERR $KUBE_LOG_LEVEL $KUBECONFIG $KUBE_SCHEDULER_ARGS (code=exited, status=/FAILURE)
Main PID: (code=exited, status=/FAILURE) Jul :: lab1 systemd[]: kube-scheduler.service: main process exited, code=exited, status=/FAILURE
Jul :: lab1 kube-scheduler[]: W0719 ::06.562968 options.go:] WARNING: all flags other than --config, --write-config-to, and --cleanup are deprecated. Please begin using a config file ASAP. 原因:没有仔细按照文档操作,文档配置这一步:生成kubeconfig,我是全部复制进去了,其实分开了好多小步骤, 解决:重新安装,每一步都要做,不要省事, 、 问题: [root@lab1 ~]# systemctl status kubelet
● kubelet.service - Kubernetes Kubelet Server
Loaded: loaded (/etc/systemd/system/kubelet.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Thu -- :: EDT; 3s ago
Docs: https://github.com/kubernetes/kubernetes
Process: ExecStart=/usr/local/kubernetes/bin/kubelet $KUBE_LOGTOSTDERR $KUBE_LOG_LEVEL $KUBELET_CONFIG $KUBELET_HOSTNAME $KUBELET_POD_INFRA_CONTAINER $KUBELET_ARGS (code=exited, status=)
Main PID: (code=exited, status=) 解决:node节点也安装k8s文件,文档在node加点没有安装k8s ,所以报错 cd /server/software/k8s
wget https://dl.k8s.io/v1.11.0/kubernetes-server-linux-amd64.tar.gz
tar xf kubernetes-server-linux-amd64.tar.gz
cd kubernetes/server/bin
mkdir -pv /usr/local/kubernetes-v1.11.0/bin
cp kube-apiserver kube-controller-manager kube-scheduler kube-proxy kubelet kubectl /usr/local/kubernetes-v1.11.0/bin
ln -sv /usr/local/kubernetes-v1.11.0 /usr/local/kubernetes
cp /usr/local/kubernetes/bin/kubectl /usr/local/bin/kubectl
kubectl version
cd $HOME 、 问题: [root@lab2 k8s]# kubectl version
Client Version: version.Info{Major:"", Minor:"", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-27T20:17:28Z", GoVersion:"go1.10.2", Compiler:"gc", Platform:"linux/amd64"}
The connection to the server localhost: was refused - did you specify the right host or port? 解决: 方法一: [root@lab2 kubernetes]# export KUBECONFIG=/etc/kubernetes/admin.conf # 这句话是加授权的意思, 方法二: 把master节点的配置文件admin.conf 复制到 node节点的 /etc/kubernetes/ 然后执行: rm -rf $HOME/.kube
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
kubectl get no 、 报错: [root@lab1 flannel]# kubectl get pods -n kube-system
NAME READY STATUS RESTARTS AGE
kube-flannel-ds-4hdsh / ErrImagePull 1m
kube-flannel-ds-7gmwt / ErrImagePull 1m
kube-flannel-ds-cbk5z / ErrImagePull 1m
[root@lab1 flannel]# 解决:等一会,这个启动比较慢,上次启动没起来,吓一跳,过了几分钟就running起来, [root@lab1 flannel]# kubectl get pods -n kube-system
NAME READY STATUS RESTARTS AGE
kube-flannel-ds-4hdsh / Running 6m
kube-flannel-ds-7gmwt / Running 6m
kube-flannel-ds-cbk5z / Running 6m 、 coredns 无法启动, [root@lab1 coredns]# kubectl get pods -n kube-system
NAME READY STATUS RESTARTS AGE
coredns--d6q9z / ContainerCreating 21s
coredns--k48wq / ContainerCreating 21s
kube-flannel-ds-d2tff / Running 3m
kube-flannel-ds-qnnpg / Running 3m
kube-flannel-ds-t2pxx / Running 3m 解决: 配置使用flannel网络kube-flannel.yml,这步要修改网卡,把kube-flannel.yml 里面的- --iface=eth1 修改成自己本机的网卡 、 [root@lab1 ~]# systemctl status etcd
Aug :: lab1 etcd[]: failed to dial d35b4e3738b04cd7 on stream MsgApp v2 (dial tcp 10.1.1.111:: getsockopt:...efused) 解决: master的防火墙没有关, 关掉就可以 、 [root@lab1 ~]# kubectl get no
Unable to connect to the server: Forbidden 解决: 实在找不到原因,重启这三台 就好 、 问题: 创建flnal 后 一会runing 一会挂掉 解决: 安装kube-kube-proxy ,不要选择ipvs模式,centos7环境,ipvs模式在1..0不行, 在1..1之后就ok了 、 下面报错,与此同时,测试的数据库也出现了mysql连接问题。 [root@lab2 ~]# kubectl get no
E0828 ::56.233812 round_trippers.go:] CancelRequest not implemented
E0828 ::56.235504 round_trippers.go:] CancelRequest not implemented
E0828 ::56.235505 round_trippers.go:] CancelRequest not implemented
E0828 ::56.236281 round_trippers.go:] CancelRequest not implemented
E0828 ::56.236765 round_trippers.go:] CancelRequest not implemented
E0828 ::56.236772 round_trippers.go:] CancelRequest not implemented
E0828 ::56.237298 round_trippers.go:] CancelRequest not implemented 解决: [root@lab1 ~]# 什么都不管用, 第一种情况是云主机之间不畅通, 第二种情况是被黑了, 第一种情况占的大 、 pod一直处理ContainerCreating 状态 [root@node2 coredns]# kubectl get po -n kube-system
NAME READY STATUS RESTARTS AGE
coredns-55f86bf584-4rzwj / ContainerCreating 8s
coredns-55f86bf584-dp8gp / ContainerCreating 8s 解决: http://www.mamicode.com/info-detail-2310522.html 查看/etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt (该链接就是上图中的说明) 是一个软链接,但是链接过去后并没有真实的/etc/rhsm,所以需要使用yum安装:
yum install *rhsm* -y wget http://mirror.centos.org/centos/7/os/x86_64/Packages/python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm
rpm2cpio python-rhsm-certificates-1.19.-.el7_4.x86_64.rpm | cpio -iv --to-stdout ./etc/rhsm/ca/redhat-uep.pem | tee /etc/rhsm/ca/redhat-uep.pem 这两个命令会生成/etc/rhsm/ca/redhat-uep.pem文件. 重启docker
systemctl restart docker [root@node2 coredns]# docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest
latest: Pulling from rhel7/pod-infrastructure
26e5ed6899db: Pull complete
66dbe984a319: Pull complete
9138e7863e08: Pull complete
Digest: sha256:92d43c37297da3ab187fc2b9e9ebfb243c1110d446c783ae1b989088495db931
Status: Image is up to date for registry.access.redhat.com/rhel7/pod-infrastructure:latest [root@node2 coredns]# kubectl delete -f .
[root@node2 coredns]# kubectl create -f .
[root@node2 coredns]# kubectl get po -n kube-system
NAME READY STATUS RESTARTS AGE
coredns-55f86bf584-4rzwj / Running 5m
coredns-55f86bf584-dp8gp / Running 5m 、 pod一直处理terminating 状态 使用命令 kubectl delete pods --all --grace-period= –force 强制删除 重启 kube-apiserver 重启 kubelet docker 实在不行就重启系统 重启后如果发现还在就再强制删除
k8s报错解决的更多相关文章
- k8s报错解决思路
问题1 1.报错信息如下 [root@ken1 ~]# kubectl get po The connection to the server 192.168.64.11:6443 was refus ...
- 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 ...
- linux下启动dbca或netmgr类的图形界面报错解决
linux下启动dbca或netmgr类的图形界面报错解决 Xlib: connection to ":0.0" refused by server Xlib: No pro ...
- CentOS 6.5 Maven 编译 Apache Tez 0.8.3 踩坑/报错解决记录
最近准备学习使用Tez,因此从官网下载了最新的Tez 0.8.3源码,按照安装教程编译使用.平时使用的集群环境是离线的,本打算这一次也进行离线编译,无奈一编译就开始报缺少jar包的错,即使手动下载ja ...
- spring boot jpa 使用update 报错解决办法
在spring boot jpa 中自定义sql,执行update操作报错解决办法: 在@Query(...)上添加 @Modifying@Transactional注解
- eclipse创建的maven项目,pom.xml文件报错解决方法
[错误一:]maven 编译级别过低 [解决办法:] 使用 maven-compiler-plugin 将 maven 编译级别改为 jdk1.6 以上: <!-- java编译插件 --> ...
- 搭建oracle linux虚拟机报错解决
sysctl -P 报错解决办法问题症状修改 linux 内核文件 #vi /etc/sysctl.conf后执行sysctl -P 报错error: "net.bridge.bridge ...
- Aasible中cryptography兼容性报错解决办法
Aasible中cryptography兼容性报错解决办法 1 Ansible中使用ansible --version查看版本,报错信息如下: ERROR! Unexpected Exception, ...
随机推荐
- 无法连接Web 的 IIE 问题
我一个解决方案里有两个项目在一块,其中一个就突然凉凉了 然后在网上找了很多,基本都是删除vs文件,在启动,幸运的是,并没什么用. 最后我用了这个: 打开Visual Studio, 右键单击网站 &g ...
- Linux启动原理
Linux系统启动原理 #!此文章参考某godedu,用于复习查看 centos6系统 centos6系统启动过程 1. 加载 BIOS 的硬件信息,跟据设定取得第一个可开机引导设置,如:光驱,硬盘, ...
- Acwing-197-阶乘分解(质数)
链接: https://www.acwing.com/problem/content/199/ 题意: 给定整数 N ,试把阶乘 N! 分解质因数,按照算术基本定理的形式输出分解结果中的 pi 和 c ...
- hdu 6046 hash
题: OwO http://acm.hdu.edu.cn/showproblem.php?pid=6046 (2017 Multi-University Training Contest - Team ...
- redis异步处理
$reids = new Redis; $redis->connect('localhost',6379); $redis->auth(''); //将数组转换成字符串再存到redis中 ...
- C/C++ - malloc/free和new/delete的区分
new/delete与malloc/free的区别主要表现在以下几个方面: 注意:最主要的区别,new/delete是运算符,而malloc/free是函数 (1).new能够自动计算需要分配的内存空 ...
- 交换机配置——Cisco(思科)-交换机初始化配置
一.实验目的:完成一台交换机的初始化配置,并且可以用telnet登录 二.拓扑图如下: 三.实验步骤 1.创建一台交换机(S1)和一台主机(PC1) 2.先给PC1主机设置IP地址: 3.S1配置: ...
- sh_20_for语法演练
sh_20_for语法演练 for num in [1, 2, 3]: print(num) if num == 2: break else: # 如果循环体内部使用break退出了循环 # else ...
- 删除git的远程分支
命令:$ git push origin [空格][冒号][需要删除的分支名字] git push origin :dev 删除git的凭证的方法: 控制面板\用户帐户\凭据管理器 --->普 ...
- P1427 小鱼的数字游戏
输入格式: 一行内输入一串整数,以0结束,以空格间隔. 输出格式: 一行内倒着输出这一串整数,以空格间隔. 直接上代码: #include<iostream> using namespac ...