在部署k8s 集群以前,先作几件事情node
关闭selunux,关闭防火墙linux
第三步:修改主机名nginx
1、准备vim
1.确保时间同步api
yum install ntpdate -yssh
ntpdate 2.cn.pool.ntp.org 1.asia.pool.ntp.org 2.asia.pool.ntp.orgspa
/bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime #若是时区不对,再执行这个server
2.selinux关闭blog
sed -i 's/enforcing/disabled/g' /etc/sysconfig/selinux #重启生效ip
临时关闭:setenforce 0
3.修改主机名
vim /etc/hostname #修改重启有效
hostname k8s-master01 #修改当即生效
4.添加hosts
5.做等效 #方便拷贝数据等(master与node节点之间都作)
ssh-keygen -t rsa
ssh-copy-id k8s-node01
ssh-copy-id k8s-node02
6.内网搭建,能够不用防火墙,先关闭
systemctl stop firewalld
systemctl disable firewalld
yum install vim wget lrzsz unzip -y
7.修改最大链接数(新开一个窗口,ulimit -n查看,已经修改)
vim /etc/security/limits.conf #最后添加这两行
* soft nofile 65535
* hard nofile 65535
1、理解SSL证书,https证书介绍
etcd:
apiserver:提供的https的访问,比如nginx服务,给nginx服务提供一个https访问