一步步安装k8s步骤及注意事项

本人根据github上的指引一步步安装了k8s的插件,包括1.6与1.8版本,详情见https://github.com/opsnull/follow-me-install-kubernetes-cluster

具体的安装步骤就不提了,这儿主要提一下安装过程中遇到的坑和注意事项。

参考:

https://blog.qikqiak.com/post/manual-install-high-available-kubernetes-cluster/?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io#node

 

1.etcd集群安装时,注意关闭防火墙

2..kube/config需要授权

3,kubectl得在apiserver装完之后才能使用,被误导了

4.注意修改kubelet中的镜像

5.exec执行时:Error fromserver: error dialing backend: dial tcp 192.168.101.93:10250: getsockopt:connection timed out

 

iptables -I INPUT -p tcp -m tcp --dport10250 -j ACCEPT

 

 

6.(安装etcd集群)

etcd[12559]: request sent was ignored(cluster ID mismatch: remote[f87a4e0dc647059a]=4e2ac6101dae49a2,local=1d3352092049d79d)

删除掉配置文件/var/lib/etcd中的配置文件,因为第一次的配置和第二次不一样,系统认定为两个集群,所以连接不上

 

7.

证书只有ca证书是共享的,其他的证书都是各个机器自己生成的;

 

 

8.

kubelet cgroup driver: "cgroupfs"is different from docker cgroup driver: "systemd"

在kubelet.service最后一行加的--cgroup-driver=systemd

 

9.

 podsis forbidden: User "system:node:192.168.101.96" cannot list pods atthe cluster scope

 

kubectl create clusterrolebindingkubelet-node-clusterbinding --clusterrole=system:node--user=system:node:192.168.101.93

 

10.

 [Failed to start ContainerManager failed toinitialise top level QOS containers: failed to create top level Burstable QOScgroup : Unit kubepods-burstable.slice already exists.]

常见错误:https://jimmysong.io/posts/kubernetes-network-config/

 

11.

 

注意env文件中的token是一样的(各个机器)

 

 

四、安装node节点时报错:

https://www.cnblogs.com/fengjian2016/p/6689212.html?utm_source=itdadao&utm_medium=referral

 

有个文件也不存在--kube-config改为了/etc/kubernetes/bootstrap.kubeconfig还是不对,报新的错误

 

都不是前面这些错,重新执行了一遍所有命令,然后把rolebinding放到最后面就好了;

 

二、【可能】

 

http://blog.csdn.net/freewebsys/article/details/70159228;

 

 

记录:journalctl -f -u kubelet

 

 

 


评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值