k8s基础环境配置:基于CentOS7.9

k8s基础环境配置:基于CentOS7.9

wmware15安装centos7.9:https://www.cnblogs.com/uncleyong/p/15261742.html

 

1.配置静态ip

TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="none"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
UUID="67760d22-eb54-4a07-9f48-c2306c51c5d3"
DEVICE="ens33"
ONBOOT="yes"
IPADDR="192.168.117.161"
PREFIX="24"
GATEWAY="192.168.117.2"
DNS1="192.168.117.2"
IPV6_PRIVACY="no"

 

2.关闭防火墙

 

3.关闭selinux

sed -ri '/^[^#]*swap/s@^@#@' /etc/fstab

 

4.关闭交换分区

 

5.修改yum源

 

6.修改内核参数

 

7.修改主机名

hostnamectl set-hostname k8s-master01

 

8.安装常用工具

 

9.同步时间

 

10.配置hosts文件

vim /etc/hosts 

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
 
 
192.168.117.161 k8s-master01
192.168.117.162 k8s-node01
192.168.117.163 k8s-node02

 

11.配置主机间无密码登录

 

12.升级系统及内核(4.x)

 

13.安装docker

yum install docker-ce-19.03.15* docker-ce-cli-19.03.15* -y

mkdir /etc/docker

cd /etc/docker

vim daemon.json

{
  "exec-opts": ["native.cgroupdriver=systemd"]
}

启动:systemctl daemon-reload && systemctl enable --now docker && systemctl status docker

 

 

虚拟机已经安装配置好(如有需要,请wx联系作者)

 

bak:https://www.cnblogs.com/uncleyong/p/15772887.html

 

============================= 提升自己 ==========================
> > > 1、咨询交流,请加微信,备注来意: ren168632201
> > > 2、性能测试实战:jmeter+k8s+微服务+skywalking+efk: https://www.cnblogs.com/uncleyong/p/15475614.html
> > > 3、自动化测试实战: https://www.cnblogs.com/uncleyong/p/12016690.html
> > > 4、测试基础汇总: https://www.cnblogs.com/uncleyong/p/10530261.html
> > > 5、声明:如有侵权,请联系删除。
============================= 升职加薪 ==========================
posted @ 2021-10-27 13:05  全栈测试笔记  阅读(294)  评论(0编辑  收藏  举报