本文主要内容是 Kubernetes 集群搭建前的实验环境准备。

以下是实验操作过程:

实验环境声明

Host OS :Windows 7 with SP1 64Bit
Host CPU :AMD Ryzen 3900X
Host RAM :Kingston DDR4 3200M 32GB
Virtual Machine :VMware Workstation Pro 15
Board OS :CentOS 7 1804 64Bit
vCPU :2 Core-Processor
VMem:2 GB
IP地址 主机名 集群角色
192.168.20.195 kubernetes-master master
192.168.20.196 kubernetes-node00 work
192.168.20.197 kubernetes-node01 work

查看OS环境

【master机械】
[master@localhost ~]$ cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
[master@localhost ~]$ uname -r
3.10.0-862.el7.x86_64
[master@localhost ~]$ hostnamectl status
Static hostname: localhost.localdomain
Icon name: computer-vm
Chassis: vm
Machine ID: 6191eb7683f84b63a36c1c4d8a68fcfb
Boot ID: 92e6aa3941f048f8a5ef99d86b30e990
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-862.el7.x86_64
Architecture: x86-64
[master@localhost ~]$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:e0:11:ec brd ff:ff:ff:ff:ff:ff
inet 192.168.20.195/24 brd 192.168.20.255 scope global noprefixroute dynamic ens33
valid_lft 1236sec preferred_lft 1236sec
inet6 fe80::9aff:a7b5:eafd:950c/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:7d:e5:3e brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN group default qlen 1000
link/ether 52:54:00:7d:e5:3e brd ff:ff:ff:ff:ff:ff
[master@localhost ~]$


【work0机械】
[work0@localhost ~]$ rpm -q centos-release
centos-release-7-5.1804.el7.centos.x86_64
[work0@localhost ~]$ cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
[work0@localhost ~]$ uname -r
3.10.0-862.el7.x86_64
[work0@localhost ~]$
[work0@localhost ~]$ hostnamectl status
Static hostname: localhost.localdomain
Icon name: computer-vm
Chassis: vm
Machine ID: 6bfc0a20ffc345c0b9a6e8f183b41ab5
Boot ID: 6312a3bd740e4718b6e102120957769f
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-862.el7.x86_64
Architecture: x86-64
[work0@localhost ~]$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:f4:17:0d brd ff:ff:ff:ff:ff:ff
inet 192.168.20.196/24 brd 192.168.20.255 scope global noprefixroute dynamic ens33
valid_lft 1076sec preferred_lft 1076sec
inet6 fe80::1fc8:d09e:226c:e9fd/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:c0:fd:d4 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN group default qlen 1000
link/ether 52:54:00:c0:fd:d4 brd ff:ff:ff:ff:ff:ff
[work0@localhost ~]$


【work1机械】
[work1@localhost ~]$ rpm -q centos-release
centos-release-7-5.1804.el7.centos.x86_64
[work1@localhost ~]$ cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
[work1@localhost ~]$ uname -r
3.10.0-862.el7.x86_64
[work1@localhost ~]$ hostnamectl status
Static hostname: localhost.localdomain
Icon name: computer-vm
Chassis: vm
Machine ID: 8a968f63778d447587873c082ee483d1
Boot ID: b33f693a1d8149238a5e8fabd263b383
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-862.el7.x86_64
Architecture: x86-64
[work1@localhost ~]$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:45:40:4a brd ff:ff:ff:ff:ff:ff
inet 192.168.20.197/24 brd 192.168.20.255 scope global noprefixroute dynamic ens33
valid_lft 1285sec preferred_lft 1285sec
inet6 fe80::de55:a25:6c5c:efdd/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:a1:9e:1c brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN group default qlen 1000
link/ether 52:54:00:a1:9e:1c brd ff:ff:ff:ff:ff:ff
[work1@localhost ~]$

孟伯,20200411

交流联系:微信 1807479153 ,QQ 1807479153