Set host name first
set-hostname k8s-1
Modify the/etc/hosts file
cat/etc/hosts127.0. 0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost Localhost.localdomain localhost6 localhost6.localdomain6192.168. 0.105 k8s-1192.168. 0.106 k8s-2192.168. 0.107 k8s-3
Modify the network configuration to static IP, and then
Service Network restart
Installing Docker
Yum Install Docker
Verifying Docker version
[[Email protected] ~]# Service Docker startredirecting to/bin/systemctl start Docker.service[[email protected]-master1 ~]# Docker versionclient:version:1.12.6API Version:1.24Package Version:docker-1.12.6- A. git85d7426.el7.centos.x86_64 Go version:go1.8.3Git commit:85d7426/1.12.6Built:tue Oct - the: +: + .OS/arch:linux/amd64server:version:1.12.6API Version:1.24Package Version:docker-1.12.6- A. git85d7426.el7.centos.x86_64 Go version:go1.8.3Git commit:85d7426/1.12.6Built:tue Oct - the: +: + .OS/arch:linux/amd64
Boot up
[Email protected] ~ from/etc/systemd/system/multi-user.target.wants/docker.service to/usr/lib/ systemd/system/docker.service.[ [Email protected] -master1 ~]# Systemctl Start Docker
Kubeadm Installing the Kubernetes cluster environment