• Welcome to the world's largest Chinese hacker forum

    Welcome to the world's largest Chinese hacker forum, our forum registration is open! You can now register for technical communication with us, this is a free and open to the world of the BBS, we founded the purpose for the study of network security, please don't release business of black/grey, or on the BBS posts, to seek help hacker if violations, we will permanently frozen your IP and account, thank you for your cooperation. Hacker attack and defense cracking or network Security

    business please click here: Creation Security  From CNHACKTEAM

Recommended Posts

1.修改主机名(分别操作)

主机名CTL集-主机名k8s-master 01 bash

主机名CTL集-主机名k8s-master 02 bash

主机名CTL集-主机名k8s-master 03 bash

主机名CTL集-主机名k8s-worker 01 bash

主机名CTL集-主机名k8s-worker 02 bash

主机名CTL集-主机名k8s-worker 03 bash

2.绑定主机

cat /etc/hosts EOF

k8s-master01

k8s-master02

k8s-master03

172 .31 .24 .99 k8s工人01

172 . 31 . 24 . 100 k8工人02

172 .31 .24 .101把k8s-工人03

文件结束

3.配置嘘免密钥

密钥

ssh-copy-id -i /root/.ssh/id _ RSA。pub root @ k8s-master 01

ssh-copy-id -i /root/.ssh/id _ RSA。pub root @ k8s-master 01

ssh-copy-id -i /root/.ssh/id _ RSA。pub root @ k8s-master 02

ssh-copy-id -i /root/.ssh/id _ RSA。pub root @ k8s-master 02

ssh-copy-id -i /root/.ssh/id _ RSA。pub root @ k8s-worker 01

ssh-copy-id -i /root/.ssh/id _ RSA。pub root @ k8s-worker 02

ssh-copy-id -i /root/.ssh/id _ RSA。pub root @ k8s-worker 03

4.修改机器内核参数

modprobe br_netfilter

echo ' modprobe br _ netfilter '/etc/profile

cat /etc/sysctl.d/k8s.conf EOF

网。大桥。网桥-nf-呼叫-IP 6表=1

网。大桥。bridge-nf-call-iptables=1

net.ipv4.ip_forward=1

文件结束

sysctl -p /etc/sysctl.d/k8s.conf

5.关闭防火墙d防火墙

系统停止防火墙d

启动脚本禁用防火墙d

6.关闭防火墙

sed-I ' s/SELINUX=enforcing/SELINUX=disabled/g '/etc/SELINUX/config

查看状态

7.配置阿里云的被卖方收回的汽车源

yum install -y wget

mv/etc/yum。回购。d以CentOS为基数。repo/etc/yum。回购。d以CentOS为基数。回购。支持

wgeto/etc/yum。回购。d以CentOS为基数。回购http://mirrors.aliyun.com/repo/Centos-7.repo

8.配置国内阿里云码头工人的被卖方收回的汽车源

yum install -y yum-utils

yum-config-manager-add-repo http://镜像。阿里云。com/docker-ce/Linux/centos/docker-ce。被卖方收回的汽车

9.配置安装k8s组件需要的阿里云的被卖方收回的汽车源

猫/etc/yum。回购。d/kubernetes。回购

[kubernetes]

name=Kubernetes

基本URL=https://个镜像。阿里云。com/kubernetes/yum/repos/kubernetes-el7-x86 _ 64/

启用=1

gpgcheck=0

文件结束

10.配置时间同步

妙的安装ntpdate -y

NTP日期cn.pool.ntp.org

可以使用

* */1 * * */usr/sbin/NTP日期cn.pool.ntp.org

11.开启改造的

卡特彼勒/etc/sys配置/模块/ipv。EOF模块

#!/bin/bash

ipvs _ modules=' IP _ vs IP _ vs _ LC IP _ vs _ wlc IP _ vs _ RR IP _ vs _ WRR IP _ vs _ LBL Cr IP _ vs _ DH IP _ vs _ sh IP _ vs _ NQ IP _ vs _ sed IP _ vs _ FTP nf _ conntrack '

\${ipvs_modules}中的内核模块做

/sbin/modinfo -F文件名\ $ {内核模块} /dev/null 21

if[0-eq 0];然后

/sbin/modprobe \ $ { kernel _ module }

船方不负担装货费用

完成的

文件结束

chmod 755/etc/sys config/modules/ipv。模块狂欢

12.安装基础软件包

yum install-y yum-utils device-mapper-persistent-data LV m2 wget net-tools NFS-utils lrzsz gcc gcc-c make cmake libxml 2-devel OpenSSL-devel curl-devel unzip NTP libaio-devel wget vim ncurses-devel autoconf automake zlib-devel python-devel epel-release OpenSSH-server socat ipvsadm connttrack date telnet rsync

Link to comment
Share on other sites