k8s + dashboard cluster deployment in centos7 --- (1) Environment and docker ready to deploy

Preface:
time prior to the deployment of online tutorials to see very much, did most of the general direction of error, but after repeated verification of the actual discovery unavoidable there will be some errors, for finishing a summary of deployment:
Preparation:
This deployments topology 1master, 2node node, all devices preparations comprising:
A) off each node firewall, and set the power-off
systemctl STOP firewalld
systemctl disable firewalld
B) Close the system SELinux
the setenforce 0
Sed -i 'S / enforcing / Disabled /' / etc / SELinux / config
C) Close swap
The swapoff swapon -a -a closed open
top to see whether the swap 0
/ etc / fastb commented swap permanently closed
d) the host name and hosts configuration
hostnamectl set-hostname master (centos7 set the host name )
CAT / etc / the hosts
172.16.32.10 master.tdr.com Master
172.16.32.11 node01.tdr.com amdha01
172.16.32.12 node02.tdr.com amdha02
E) IPv4 traffic will be transmitted to the bridging chain iptables
net.bridge.bridge -nf-call-ip6tables = 1
NF-Call--net.bridge.bridge = iptables. 1
is named net.ipv4.ip_forward and =. 1
performs: modprobe br_netfilter
sysctl -p /etc/sysctl.d/k8s.conf
1.docker install and deploy
first configure yum source, the use aliyun source to yum
wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo
yum makecache the FAST
yum repolist View under source
yum list docker-ce.x86_64 --showduplicates | sort -r View docker version you want to install, I installed here-ce is 18.03.1.
yum -y install Obsoletes --setopt = = 0 18.03.1. ce-1.el7.centos
start docker and boot from Kai:
systemctl start docker
systemctl enable docker
iptabels -nvL
confirm iptables filter table, the default policy FOWARD chain (pllicy) is ACCEPT, because k8s the Node and pod communication needs FORWARD chain .

Guess you like

Origin blog.51cto.com/10901766/2427722
Recommended