Quickly deploy a kubernetes cluster
The steps above in k8s-master:
[root@k8s-master ~] # cat / etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.111 k8s-master
192.168.1.112 k8s-node1
192.168.1.113 k8s-node2
[root@k8s-master ~] # cat > / etc/sysctl.d/k8s.conf] 2640 -.-Kacher's in 0s
2020-02-12 10:07:18 (716 MB/s) -'/ etc/yum.repos.d/docker-ce.repo' saved [2640ly2640]
[root@k8s-master ~] # yum list docker-ce-- showduplicates | sort-r
* updates: mirrors.aliyun.com
Loaded plugins: fastestmirror
* extras: mirrors.aliyun.com
Docker-ce.x86_64 3Rank 19.03.5-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 19.03.4-3.el7 docker-ce-stable
Docker-ce.x86_64 3VR 19.03.3-3.el7 docker-ce-stable
Docker-ce.x86_64 3vl 19.03.2-3.el7 docker-ce-stable
Docker-ce.x86_64 3VR 19.03.1-3.el7 docker-ce-stable
Docker-ce.x86_64 3vl 19.03.0-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.9-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.8-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.7-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.6-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.5-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.4-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.3-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.2-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.1-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.0-3.el7 docker-ce-stable
Docker-ce.x86_64 18.06.3.ce-3.el7 docker-ce-stable
Docker-ce.x86_64 18.06.2.ce-3.el7 docker-ce-stable
Docker-ce.x86_64 18.06.1.ce-3.el7 docker-ce-stable
Docker-ce.x86_64 18.06.0.ce-3.el7 docker-ce-stable
Docker-ce.x86_64 18.03.1.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 18.03.0.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.12.1.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.12.0.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.09.1.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.09.0.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.06.2.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.06.1.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.06.0.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.03.3.ce-1.el7 docker-ce-stable
Docker-ce.x86_64 17.03.2.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable
Determining fastest mirrors
* base: mirrors.aliyun.com
Available Packages
[root@k8s-master] # yum-y install docker-ce-18.09.9-3.el7
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies
-> Running transaction check
-> Package docker-ce.x86_64 3VR 18.09.9-3.el7 will be installed
-- > Processing Dependency: container-selinux > = 2RV 2.74 for package: 3:docker-ce-18.09.9-3.el7.x86_64
-- > Processing Dependency: containerd.io > = 1.2.2-3 for package: 3:docker-ce-18.09.9-3.el7.x86_64
-- > Processing Dependency: docker-ce-cli for package: 3:docker-ce-18.09.9-3.el7.x86_64
-- > Processing Dependency: libcgroup for package: 3:docker-ce-18.09.9-3.el7.x86_64
-> Running transaction check
-> Package container-selinux.noarch 2 2.107-3.el7 will be installed
-- > Processing Dependency: policycoreutils-python for package: 2:container-selinux-2.107-3.el7.noarch
-> Package containerd.io.x86_64 0purl 1.2.10-3.2.el7 will be installed
-> Package docker-ce-cli.x86_64 1 19.03.5-3.el7 will be installed
-> Package libcgroup.x86_64 0RU 0.41-21.el7 will be installed
-> Running transaction check
-> Package policycoreutils-python.x86_64 0Rank 2.5-33.el7 will be installed
-- > Processing Dependency: setools-libs > = 3.3.8-4 for package: policycoreutils-python-2.5-33.el7.x86_64
-- > Processing Dependency: libsemanage-python > = 2.5-14 for package: policycoreutils-python-2.5-33.el7.x86_64
-- > Processing Dependency: audit-libs-python > = 2.1.3-4 for package: policycoreutils-python-2.5-33.el7.x86_64
-- > Processing Dependency: python-IPy for package: policycoreutils-python-2.5-33.el7.x86_64
-> Processing Dependency: libqpol.so.1 (VERS_1.4) (64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
-> Processing Dependency: libqpol.so.1 (VERS_1.2) (64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
-> Processing Dependency: libapol.so.4 (VERS_4.0) (64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
-- > Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-33.el7.x86_64
-> Processing Dependency: libqpol.so.1 () (64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
-> Processing Dependency: libapol.so.4 () (64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
-> Running transaction check
-> Package audit-libs-python.x86_64 0RU 2.8.5-4.el7 will be installed
-> Package checkpolicy.x86_64 0Rank 2.5-8.el7 will be installed
-> Package libsemanage-python.x86_64 0Rank 2.5-14.el7 will be installed
-> Package python-IPy.noarch 0RU 0.75-6.el7 will be installed
-> Package setools-libs.x86_64 0RU 3.3.8-4.el7 will be installed
-> Finished Dependency Resolution
Dependencies Resolved
=
Package Arch Version Repository Size
=
Installing:
Docker-ce x86'64 3 18.09.9-3.el7 docker-ce-stable 21 M
Installing for dependencies:
Audit-libs-python x8631 64 2.8.5-4.el7 base 76k
Checkpolicy x8631 64 2.5k-8.el7 base 295k
Container-selinux noarch 2vl 2.107-3.el7 extras 39k
Containerd.io x8631 64 1.2.10-3.2.el7 docker-ce-stable 23 M
Docker-ce-cli x86x 64 1purl 19.03.5-3.el7 docker-ce-stable 39 m
Libcgroup x8631 64 0.41-21.el7 base 66k
Libsemanage-python x86 million 64 2.5-14.el7 base 113k
Policycoreutils-python x8631 64 2.5k-33.el7 base 457k
Python-IPy noarch 0.75-6.el7 base 32k
Setools-libs x8631 64 3.3.8-4.el7 base 620k
Transaction Summary
=
Install 1 Package (+ 10 Dependent packages)
Total download size: 85 M
Installed size: 354 M
Downloading packages:
(1go 11): container-selinux-2.107-3.el7.noarch.rpm | 39 kB 00:00
(2go 11): audit-libs-python-2.8.5-4.el7.x86_64.rpm | 76 kB 00:00
(3 kB 11): checkpolicy-2.5-8.el7.x86_64.rpm | 295 kB 00:01
Warning: / var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-ce-18.09.9-3.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Public key for docker-ce-18.09.9-3.el7.x86_64.rpm is not installed
(4 take 11): docker-ce-18.09.9-3.el7.x86_64.rpm | 21 MB 00:49
(5go 11): libcgroup-0.41-21.el7.x86_64.rpm | 66 kB 00:01
(6 take 11): python-IPy-0.75-6.el7.noarch.rpm | 32 kB 00:00
(7 take 11): libsemanage-python-2.5-14.el7.x86_64.rpm | 113 kB 00:02
(8 MB 11): containerd.io-1.2.10-3.2.el7.x86_64.rpm | 23 MB at 00:52
(9 kB 11): setools-libs-3.3.8-4.el7.x86_64.rpm | 620 kB 00:01
(10 take 11): policycoreutils-python-2.5-33.el7.x86_64.rpm | 457 kB 00:04
(11 take 11): docker-ce-cli-19.03.5-3.el7.x86_64.rpm | 39 MB 00:26
Total 1.1 MB/s | 85 MB 01:15
Retrieving key from https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
Importing GPG key 0x621E9F35:
Userid: "Docker Release (CE rpm)"
Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
From: https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing: libcgroup-0.41-21.el7.x86_64 1Comp11
Installing: setools-libs-3.3.8-4.el7.x86_64 2 Compact 11
Installing: 1:docker-ce-cli-19.03.5-3.el7.x86_64 3Comp11
Installing: audit-libs-python-2.8.5-4.el7.x86_64 4 Compact 11
Installing: python-IPy-0.75-6.el7.noarch 5Comp11
Installing: libsemanage-python-2.5-14.el7.x86_64 6Comp11
Installing: checkpolicy-2.5-8.el7.x86_64 7 Compact 11
Installing: policycoreutils-python-2.5-33.el7.x86_64 8Comp11
Installing: 2:container-selinux-2.107-3.el7.noarch 9 Compact 11
Setsebool: SELinux is disabled.
Installing: containerd.io-1.2.10-3.2.el7.x86_64 10 Universe 11
Installing: 3:docker-ce-18.09.9-3.el7.x86_64 11 Compact 11
Verifying: checkpolicy-2.5-8.el7.x86_64 1Comp11
Verifying: policycoreutils-python-2.5-33.el7.x86_64 2 Compact 11
Verifying: libsemanage-python-2.5-14.el7.x86_64 3Comp11
Verifying: 2:container-selinux-2.107-3.el7.noarch 4 Compact 11
Verifying: 3:docker-ce-18.09.9-3.el7.x86_64 5Comp11
Verifying: python-IPy-0.75-6.el7.noarch 6Comp11
Verifying: audit-libs-python-2.8.5-4.el7.x86_64 7 Compact 11
Verifying: containerd.io-1.2.10-3.2.el7.x86_64 8Comp11
Verifying: 1:docker-ce-cli-19.03.5-3.el7.x86_64 9 Compact 11
Verifying: setools-libs-3.3.8-4.el7.x86_64 10 Universe 11
Verifying: libcgroup-0.41-21.el7.x86_64 11 Compact 11
Installed:
Docker-ce.x86_64 3Rank 18.09.9-3.el7
Dependency Installed:
Audit-libs-python.x86_64 0RO 2.8.5-4.el7
Checkpolicy.x86_64 0RO 2.5-8.el7
Container-selinux.noarch 2Vol 2.107-3.el7
Containerd.io.x86_64 0VOR 1.2.10-3.2.el7
Docker-ce-cli.x86_64 1Rank 19.03.5-3.el7
Libcgroup.x86_64 0RO 0.41-21.el7
Libsemanage-python.x86_64 0RO 2.5-14.el7
Policycoreutils-python.x86_64 0RO 2.5-33.el7
Python-IPy.noarch 0RO 0.75-6.el7
Setools-libs.x86_64 0RO 3.3.8-4.el7
Complete!
[root@k8s-master ~] # systemctl enable docker
Created symlink from / etc/systemd/system/multi-user.target.wants/docker.service to / usr/lib/systemd/system/docker.service.
[root@k8s-master ~] # systemctl start docker
[root@k8s-master ~] # systemctl status docker
● docker.service-Docker Application Container Engine
Loaded: loaded (/ usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-02-12 10:10:03 CST; 6s ago
Docs: https://docs.docker.com
Main PID: 1911 (dockerd)
Tasks: 12
Memory: 39.3M
CGroup: / system.slice/docker.service
└─ 1911 / usr/bin/dockerd-H fd://-- containerd=/run/containerd/cont...
Feb 12 10:10:02 k8s-master dockerd [1911]: time= "2020-02-12T10:10:02.34888797...c"
Feb 12 10:10:02 k8s-master dockerd [1911]: time= "2020-02-12T10:10:02.34901014...c"
Feb 12 10:10:02 k8s-master dockerd [1911]: time= "2020-02-12T10 time= 02.76509531..."
Feb 12 10:10:02 k8s-master dockerd [1911]: time= "2020-02-12T10 time= 02.76605705..."
Feb 12 10:10:02 k8s-master dockerd [1911]: time= "2020-02-12T10 time= 02.99515744."
Feb 12 10:10:03 k8s-master dockerd [1911]: time= "2020-02-12T10 time= 03.06445846."
Feb 12 10:10:03 k8s-master dockerd [1911]: time= "2020-02-12T10:10:03.10487518...9"
Feb 12 10:10:03 k8s-master dockerd [1911]: time= "2020-02-12T10 time= 03.10503137..."
Feb 12 10:10:03 k8s-master dockerd [1911]: time= "2020-02-12T10 time= 03.11493511..."
Feb 12 10:10:03 k8s-master systemd [1]: Started Docker Application Container...e.
Hint: Some lines were ellipsized, use-l to show in full.
[root@k8s-master ~] # curl-sSL https://get.daocloud.io/daotools/set_mirror.sh | sh-s http://f1361db2.m.daocloud.io
Docker version > = 1.12
{"registry-mirrors": ["http://f1361db2.m.daocloud.io"]}"
Success.
You need to restart docker to take effect: sudo systemctl restart docker
[root@k8s-master ~] # sudo systemctl restart docker
[root@k8s-master ~] # cat > / etc/yum.repos.d/kubernetes.repo [kubernetes]
> name=Kubernetes
Baseurl= https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
> enabled=1
> gpgcheck=0
> repo_gpgcheck=0
Gpgkey= https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
> EOF
[root@k8s-master ~] # yum install-y kubelet-1.16.0 kubeadm-1.16.0 kubectl-1.16.0
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Kubernetes | 1.4 kB 00:00
Kubernetes/primary | 63 kB 00:00
Kubernetes 460/460
Resolving Dependencies
-> Running transaction check
-> Package kubeadm.x86_64 01.16.0-0 will be installed
-- > Processing Dependency: kubernetes-cni > = 0.7.5 for package: kubeadm-1.16.0-0.x86_64
-- > Processing Dependency: cri-tools > = 1.13.0 for package: kubeadm-1.16.0-0.x86_64
-> Package kubectl.x86_64 01.16.0-0 will be installed
-> Package kubelet.x86_64 01.16.0-0 will be installed
-- > Processing Dependency: socat for package: kubelet-1.16.0-0.x86_64
-- > Processing Dependency: conntrack for package: kubelet-1.16.0-0.x86_64
-> Running transaction check
-> Package conntrack-tools.x86_64 0RU 1.4.4-5.el7_7.2 will be installed
-> Processing Dependency: libnetfilter_cttimeout.so.1 (LIBNETFILTER_CTTIMEOUT_1.1) (64bit) for package: conntrack-tools-1.4.4-5.el7_7.2.x86_64
-> Processing Dependency: libnetfilter_cttimeout.so.1 (LIBNETFILTER_CTTIMEOUT_1.0) (64bit) for package: conntrack-tools-1.4.4-5.el7_7.2.x86_64
-> Processing Dependency: libnetfilter_cthelper.so.0 (LIBNETFILTER_CTHELPER_1.0) (64bit) for package: conntrack-tools-1.4.4-5.el7_7.2.x86_64
-> Processing Dependency: libnetfilter_queue.so.1 () (64bit) for package: conntrack-tools-1.4.4-5.el7_7.2.x86_64
-> Processing Dependency: libnetfilter_cttimeout.so.1 () (64bit) for package: conntrack-tools-1.4.4-5.el7_7.2.x86_64
-> Processing Dependency: libnetfilter_cthelper.so.0 () (64bit) for package: conntrack-tools-1.4.4-5.el7_7.2.x86_64
-> Package cri-tools.x86_64 01.13.0-0 will be installed
-> Package kubernetes-cni.x86_64 0RU 0.7.5-0 will be installed
-> Package socat.x86_64 0RU 1.7.3.2-2.el7 will be installed
-> Running transaction check
-> Package libnetfilter_cthelper.x86_64 0vl 1.0.0-10.el7_7.1 will be installed
-> Package libnetfilter_cttimeout.x86_64 0vl 1.0.0-6.el7_7.1 will be installed
-> Package libnetfilter_queue.x86_64 0RU 1.0.2-2.el7_2 will be installed
-> Finished Dependency Resolution
Dependencies Resolved
=
Package Arch Version Repository Size
=
Installing:
Kubeadm x8631 64 1.16.0-0 kubernetes 9.5m
Kubectl x8631 64 1.16.0-0 kubernetes 10 M
Kubelet x8631 64 1.16.0-0 kubernetes 22 M
Installing for dependencies:
Conntrack-tools x8631 64 1.4.4-5.el7_7.2 updates 187k
Cri-tools x86 million 64 1.13.0-0 kubernetes 5.1m
Kubernetes-cni x86 million 64 0.7.5-0 kubernetes 10 M
Libnetfilter_cthelper x8631 64 1.0.0-10.el7_7.1 updates 18k
Libnetfilter_cttimeout x8631 64 1.0.0-6.el7_7.1 updates 18k
Libnetfilter_queue x8631 64 1.0.2-2.el7_2 base 23k
Socat x8631 64 1.7.3.2-2.el7 base 290k
Transaction Summary
=
Install 3 Packages (+ 7 Dependent packages)
Total download size: 57 M
Installed size: 262 M
Downloading packages:
(1go 10): conntrack-tools-1.4.4-5.el7_7.2.x86_64.rpm | 187 kB 00:00
(2apt 10): 14bfe6e75a9efc8eca3f638eb22c7e2ce759c67f95b43b16fa | 5.1 MB 00:30
(3x10): be6a085d0285f83d74429540b878a137a9341ba34dbd85dfba | 10 MB 00:06
(4 take 10): 697ad1a31f01e90f44ad3f0c8fe06f32d7bdd3b227fcf70527 | 9.5 MB 00:43
(5 kB 10): libnetfilter_cthelper-1.0.0-10.el7_7.1.x86_64.rpm | 18 kB at 00:01
(6 take 10): libnetfilter_queue-1.0.2-2.el7_2.x86_64.rpm | 23 kB 00:01
(7apt 10): libnetfilter_cttimeout-1.0.0-6.el7_7.1.x86_64.rpm | 18 kB 00:01
(8x10): d58731a80db4214f3f1021f5676fe7f4da7239fc4a48c60f15 | 22 MB 00:11
(9 take 10): 548a0dcd865c16a50980420ddfa5fbccb8b59621179798e6dc | 10 MB 00:05
(10 take 10): socat-1.7.3.2-2.el7.x86_64.rpm | 290 kB 00:03
Total 1.2 MB/s | 57 MB 00:49
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing: socat-1.7.3.2-2.el7.x86_64 1 Compact 10
Installing: kubectl-1.16.0-0.x86_64 2 Compact 10
Installing: libnetfilter_cttimeout-1.0.0-6.el7_7.1.x86_64 3 Compact 10
Installing: cri-tools-1.13.0-0.x86_64 4 Compact 10
Installing: libnetfilter_queue-1.0.2-2.el7_2.x86_64 5 Compact 10
Installing: libnetfilter_cthelper-1.0.0-10.el7_7.1.x86_64 6 Compact 10
Installing: conntrack-tools-1.4.4-5.el7_7.2.x86_64 7 Compact 10
Installing: kubernetes-cni-0.7.5-0.x86_64 8 Compact 10
Installing: kubelet-1.16.0-0.x86_64 9 Compact 10
Installing: kubeadm-1.16.0-0.x86_64 10 Compact 10
Verifying: libnetfilter_cthelper-1.0.0-10.el7_7.1.x86_64 1 Compact 10
Verifying: conntrack-tools-1.4.4-5.el7_7.2.x86_64 2 Compact 10
Verifying: libnetfilter_queue-1.0.2-2.el7_2.x86_64 3 Compact 10
Verifying: kubelet-1.16.0-0.x86_64 4 Compact 10
Verifying: cri-tools-1.13.0-0.x86_64 5 Compact 10
Verifying: libnetfilter_cttimeout-1.0.0-6.el7_7.1.x86_64 6 Compact 10
Verifying: kubectl-1.16.0-0.x86_64 7 Compact 10
Verifying: kubernetes-cni-0.7.5-0.x86_64 8 Compact 10
Verifying: socat-1.7.3.2-2.el7.x86_64 9 Compact 10
Verifying: kubeadm-1.16.0-0.x86_64 10 Compact 10
Installed:
Kubeadm.x86_64 0VOR 1.16.0-0 kubectl.x86_64 0RV 1.16.0-0 kubelet.x86_64 0RO kubelet.x86_64 1.16.0-0
Dependency Installed:
Conntrack-tools.x86_64 0RO 1.4.4-5.el7_7.2
Cri-tools.x86_64 0pur1.13.0-0
Kubernetes-cni.x86_64 0RO 0.7.5-0
Libnetfilter_cthelper.x86_64 0RO 1.0.0-10.el7_7.1
Libnetfilter_cttimeout.x86_64 0RO 1.0.0-6.el7_7.1
Libnetfilter_queue.x86_64 0VOR 1.0.2-2.el7_2
Socat.x86_64 0VOR 1.7.3.2-2.el7
Complete!
[root@k8s-master ~] # systemctl enable kubelet
Created symlink from / etc/systemd/system/multi-user.target.wants/kubelet.service to / usr/lib/systemd/system/kubelet.service.
[root@k8s-master ~] # kubeadm init\
-- apiserver-advertise-address=192.168.1.111\
-- image-repository registry.aliyuncs.com/google_containers\
-- kubernetes-version v1.16.0\
-- service-cidr=10.1.0.0/16\
-- pod-network-cidr=10.244.0.0/16
[init] Using Kubernetes version: v1.16.0
[preflight] Running pre-flight checks
WARNING IsDockerSystemdCheck: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
[kubelet-start] Writing kubelet environment file with flags to file "/ var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Writing kubelet configuration to file "/ var/lib/kubelet/config.yaml"
[kubelet-start] Activating the kubelet service
[certs] Using certificateDir folder "/ etc/kubernetes/pki"
[certs] Generating "ca" certificate and key
[certs] Generating "apiserver" certificate and key
[certs] apiserver serving cert is signed for DNS names [k8s-master kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.1.0.1 192.168.1.111]
[certs] Generating "apiserver-kubelet-client" certificate and key
[certs] Generating "front-proxy-ca" certificate and key
[certs] Generating "front-proxy-client" certificate and key
[certs] Generating "etcd/ca" certificate and key
[certs] Generating "etcd/server" certificate and key
[certs] etcd/server serving cert is signed for DNS names [k8s-master localhost] and IPs [192.168.1.111 127.0.0.1:: 1]
[certs] Generating "etcd/peer" certificate and key
[certs] etcd/peer serving cert is signed for DNS names [k8s-master localhost] and IPs [192.168.1.111 127.0.0.1:: 1]
[certs] Generating "etcd/healthcheck-client" certificate and key
[certs] Generating "apiserver-etcd-client" certificate and key
[certs] Generating "sa" key and public key
[kubeconfig] Using kubeconfig folder "/ etc/kubernetes"
[kubeconfig] Writing "admin.conf" kubeconfig file
[kubeconfig] Writing "kubelet.conf" kubeconfig file
[kubeconfig] Writing "controller-manager.conf" kubeconfig file
[kubeconfig] Writing "scheduler.conf" kubeconfig file
[control-plane] Using manifest folder "/ etc/kubernetes/manifests"
[control-plane] Creating static Pod manifest for "kube-apiserver"
[control-plane] Creating static Pod manifest for "kube-controller-manager"
[control-plane] Creating static Pod manifest for "kube-scheduler"
[etcd] Creating static Pod manifest for local etcd in "/ etc/kubernetes/manifests"
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/ etc/kubernetes/manifests". This can take up to 4m0s
[apiclient] All control plane components are healthy after 38.503417 seconds
[upload-config] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
[kubelet] Creating a ConfigMap "kubelet-config-1.16" in namespace kube-system with the configuration for the kubelets in the cluster
[upload-certs] Skipping phase. Please see-upload-certs
[mark-control-plane] Marking the node k8s-master as control-plane by adding the label "node-role.kubernetes.io/master=''"
[mark-control-plane] Marking the node k8s-master as control-plane by adding the taints [node-role.kubernetes.io/master:NoSchedule]
[bootstrap-token] Using token: 3a8akv.5sdpd199534o5knk
[bootstrap-token] Configuring bootstrap tokens, cluster-info ConfigMap, RBAC Roles
[bootstrap-token] configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials
[bootstrap-token] configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token
[bootstrap-token] configured RBAC rules to allow certificate rotation for all node client certificates in the cluster
[bootstrap-token] Creating the "cluster-info" ConfigMap in the "kube-public" namespace
[addons] Applied essential addon: CoreDNS
[addons] Applied essential addon: kube-proxy
Your Kubernetes control-plane has initialized successfully!
To start using your cluster, you need to run the following as a regular user:
Mkdir-p $HOME/.kube
Sudo cp-I / etc/kubernetes/admin.conf $HOME/.kube/config
Sudo chown $(id-u): $(id-g) $HOME/.kube/config
You should now deploy a pod network to the cluster.
Run "kubectl apply-f [podnetwork] .yaml" with one of the options listed at:
Https://kubernetes.io/docs/concepts/cluster-administration/addons/
Then you can join any number of worker nodes by running the following on each as root:
Kubeadm join 192.168.1.111 6443-- token 3a8akv.5sdpd199534o5knk\
-- discovery-token-ca-cert-hash sha256:beb8860fe8f6fb4abaf23fa0570142fb6b81b2c3bf8a9a228bae884184c7035e
[root@k8s-master ~] # mkdir-p $HOME/.kube
[root@k8s-master ~] # sudo cp-I / etc/kubernetes/admin.conf $HOME/.kube/config
[root@k8s-master ~] # sudo chown $(id-u): $(id-g) $HOME/.kube/config
[root@k8s-master ~] # kubectl get nodes
NAME STATUS ROLES AGE VERSION
K8s-master NotReady master 101s v1.16.0
K8s-node1 NotReady 18s v1.16.0
K8s-node2 NotReady 14s v1.16.0
[root@k8s-master ~] # cd / usr/local/src/
[root@k8s-master src] # rz-y
Rz waiting to receive.
Starting zmodem transfer. Press Ctrl+C to cancel.
Transferring dashboard.yaml...
100% 6 KB 6 KB/sec 00:00:01 0 Errors
Transferring kube-flannel.yaml...
100% 4 KB 4 KB/sec 00:00:01 0 Errors
[root@k8s-master src] # ls
Dashboard.yaml kube-flannel.yaml
[root@k8s-master src] # kubectl apply-f kube-flannel.yaml
Podsecuritypolicy.policy/psp.flannel.unprivileged created
Clusterrole.rbac.authorization.k8s.io/flannel created
Clusterrolebinding.rbac.authorization.k8s.io/flannel created
Serviceaccount/flannel created
Configmap/kube-flannel-cfg created
Daemonset.apps/kube-flannel-ds-amd64 created
[root@k8s-master src] # kubectl get pods-n kube-system
NAME READY STATUS RESTARTS AGE
Coredns-58cc8c89f4-7s2n9 0bat 1 Pending 0 2m50s
Coredns-58cc8c89f4-h7d26 0/1 Pending 0 2m50s
Etcd-k8s-master 1/1 Running 0 2m3s
Kube-apiserver-k8s-master 1/1 Running 0 2m1s
Kube-controller-manager-k8s-master 1/1 Running 0 113s
Kube-flannel-ds-amd64-75824 0max 1 Init:0/1 0 8s
Kube-flannel-ds-amd64-7snx6 0bat 1 Init:0/1 0 8s
Kube-flannel-ds-amd64-85vf8 0bat 1 Init:0/1 0 8s
Kube-proxy-62g7k 1/1 Running 0 107s
Kube-proxy-rlz5r 1/1 Running 0 103s
Kube-proxy-tqrnv 1/1 Running 0 2m50s
Kube-scheduler-k8s-master 1/1 Running 0 2m5s
Wait about ten minutes.
[root@k8s-master src] # kubectl get pods-n kube-system
NAME READY STATUS RESTARTS AGE
Coredns-58cc8c89f4-7s2n9 1 7s2n9 1 Running 0 5m24s
Coredns-58cc8c89f4-h7d26 1/1 Running 0 5m24s
Etcd-k8s-master 1/1 Running 0 4m37s
Kube-apiserver-k8s-master 1/1 Running 0 4m35s
Kube-controller-manager-k8s-master 1/1 Running 0 4m27s
Kube-flannel-ds-amd64-75824 1 Running 0 2m42s
Kube-flannel-ds-amd64-7snx6 1 7snx6 1 Running 0 2m42s
Kube-flannel-ds-amd64-85vf8 1 85vf8 1 Running 0 2m42s
Kube-proxy-62g7k 1/1 Running 0 4m21s
Kube-proxy-rlz5r 1/1 Running 0 4m17s
Kube-proxy-tqrnv 1/1 Running 0 5m24s
Kube-scheduler-k8s-master 1/1 Running 0 4m39s
[root@k8s-master src] # kubectl get nodes
NAME STATUS ROLES AGE VERSION
K8s-master Ready master 5m45s v1.16.0
K8s-node1 Ready 4m22s v1.16.0
K8s-node2 Ready 4m18s v1.16.0
[root@k8s-master src] # kubectl create deployment nginx-- image=nginx
Deployment.apps/nginx created
[root@k8s-master src] # kubectl expose deployment nginx-port=80-type=NodePort
Service/nginx exposed
[root@k8s-master src] # kubectl get pod,svc
NAME READY STATUS RESTARTS AGE
Pod/nginx-86c57db685-wpkxv 0/1 ContainerCreating 0 15s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT (S) AGE
Service/kubernetes ClusterIP 10.1.0.1 443/TCP 6m34s
Service/nginx NodePort 10.1.131.49 80:32232/TCP 7s
Access address: http://NodeIP:Port
192.168.1.112:32232
[root@k8s-master src] # kubectl get nodes
NAME STATUS ROLES AGE VERSION
K8s-master Ready master 7m4s v1.16.0
K8s-node1 Ready 5m41s v1.16.0
K8s-node2 Ready 5m37s v1.16.0
[root@k8s-master src] # kubectl get pods-n kube-system
NAME READY STATUS RESTARTS AGE
Coredns-58cc8c89f4-7s2n9 1 7s2n9 1 Running 0 6m48s
Coredns-58cc8c89f4-h7d26 1/1 Running 0 6m48s
Etcd-k8s-master 1/1 Running 0 6m1s
Kube-apiserver-k8s-master 1/1 Running 0 5m59s
Kube-controller-manager-k8s-master 1/1 Running 0 5m51s
Kube-flannel-ds-amd64-75824 1 Running 0 4m6s
Kube-flannel-ds-amd64-7snx6 1 7snx6 1 Running 0 4m6s
Kube-flannel-ds-amd64-85vf8 1 85vf8 1 Running 0 4m6s
Kube-proxy-62g7k 1/1 Running 0 5m45s
Kube-proxy-rlz5r 1/1 Running 0 5m41s
Kube-proxy-tqrnv 1/1 Running 0 6m48s
Kube-scheduler-k8s-master 1/1 Running 0 6m3s
[root@k8s-master src] # kubectl get nodes
NAME STATUS ROLES AGE VERSION
K8s-master Ready master 7m58s v1.16.0
K8s-node1 Ready 6m35s v1.16.0
K8s-node2 Ready 6m31s v1.16.0
[root@k8s-master src] # kubectl get pod,svc
NAME READY STATUS RESTARTS AGE
Pod/nginx-86c57db685-wpkxv 1/1 Running 0 98s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT (S) AGE
Service/kubernetes ClusterIP 10.1.0.1 443/TCP 7m57s
Service/nginx NodePort 10.1.131.49 80:32232/TCP 90s
[root@k8s-master src] # ls
Dashboard.yaml kube-flannel.yaml
[root@k8s-master src] # kubectl apply-f dashboard.yaml
Namespace/kubernetes-dashboard created
Serviceaccount/kubernetes-dashboard created
Service/kubernetes-dashboard created
Secret/kubernetes-dashboard-certs created
Secret/kubernetes-dashboard-csrf created
Secret/kubernetes-dashboard-key-holder created
Configmap/kubernetes-dashboard-settings created
Role.rbac.authorization.k8s.io/kubernetes-dashboard created
Clusterrole.rbac.authorization.k8s.io/kubernetes-dashboard created
Rolebinding.rbac.authorization.k8s.io/kubernetes-dashboard created
Clusterrolebinding.rbac.authorization.k8s.io/kubernetes-dashboard created
Deployment.apps/kubernetes-dashboard created
Service/dashboard-metrics-scraper created
Deployment.apps/dashboard-metrics-scraper created
[root@k8s-master src] # kubectl get pods-n kubernetes-dashboard
NAME READY STATUS RESTARTS AGE
Dashboard-metrics-scraper-566cddb686-jhhgm 1/1 Running 0 77s
Kubernetes-dashboard-7b5bf5d559-b6n4d 1/1 Running 0 77s
[root@k8s-master src] # kubectl create serviceaccount dashboard-admin-n kubernetes-dashboard
Serviceaccount/dashboard-admin created
[root@k8s-master src] # kubectl create clusterrolebinding dashboard-admin-clusterrole=cluster-admin-serviceaccount=kubernetes-dashboard:dashboard-admin
Clusterrolebinding.rbac.authorization.k8s.io/dashboard-admin created
[root@k8s-master src] # kubectl describe secrets-n kubernetes-dashboard $(kubectl-n kubernetes-dashboard get secret | awk'/ dashboard-admin/ {print $1}')
Name: dashboard-admin-token-llqd8
Namespace: kubernetes-dashboard
Labels:
Annotations: kubernetes.io/service-account.name: dashboard-admin
Kubernetes.io/service-account.uid: a8609459-37ce-4b92-8ca7-faa439e4d886
Type: kubernetes.io/service-account-token
Data
=
Ca.crt: 1025 bytes
Namespace: 20 bytes
Token: eyJhbGciOiJSUzI1NiIsImtpZCI6IjlzWmE0ZzNJaEpVbzJrNFRSdGpiUlBsSTBpcVBzbzBmalFyOUtuSkJJQ0EifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJkYXNoYm9hcmQtYWRtaW4tdG9rZW4tbGxxZDgiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoiZGFzaGJvYXJkLWFkbWluIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQudWlkIjoiYTg2MDk0NTktMzdjZS00YjkyLThjYTctZmFhNDM5ZTRkODg2Iiwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50Omt1YmVybmV0ZXMtZGFzaGJvYXJkOmRhc2hib2FyZC1hZG1pbiJ9.OZyk7O4i_oT0NRZpKuztTDtMdZWE9fiQcix-F3Ea4Bbucw9L2kemmUiCI-jr6Z9IqjXv2i_0ZexIl8WgVHb2XJRlWY4bSdgZveWbokF1JqiVmEF8LyTwIT89eI6g39J3VCbMls7hLZ_Cq3zf5m8IAFWdhF2twIP2poCx9LczQ_YDaOJrkpLS-MOjVsksJZbM1gcTlRmHqy6ng2597mgsju-SlEJ8u1M3nBRyEVPIz3SbvAsOPGuoetPN-sZaep-TCcfuq6i85J0kpjekpIvMNrm-9jEgjmEY8FWVdkjBVcQqBjdChuD_xEwaKDjEncXEFq02WD5SGfxa_Q-vrAjF1g
You must use Firefox:
Access address: http://NodeIP:30001
Dashboard deployed successfully
The deployment steps for k8s-node1 and k8s-node2 are the same
[root@k8s-node2 ~] # getenforce
Disabled
[root@k8s-node2 ~] # cat > / etc/sysctl.d/k8s.conf] 2640 -.-Kacher's in 0s
2020-02-12 10:07:18 (641 MB/s) -'/ etc/yum.repos.d/docker-ce.repo' saved [2640ly2640]
[root@k8s-node2 ~] # yum list docker-ce-- showduplicates | sort-r
* updates: mirrors.aliyun.com
Loaded plugins: fastestmirror
* extras: mirrors.aliyun.com
Docker-ce.x86_64 3Rank 19.03.5-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 19.03.4-3.el7 docker-ce-stable
Docker-ce.x86_64 3VR 19.03.3-3.el7 docker-ce-stable
Docker-ce.x86_64 3vl 19.03.2-3.el7 docker-ce-stable
Docker-ce.x86_64 3VR 19.03.1-3.el7 docker-ce-stable
Docker-ce.x86_64 3vl 19.03.0-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.9-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.8-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.7-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.6-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.5-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.4-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.3-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.2-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.1-3.el7 docker-ce-stable
Docker-ce.x86_64 3Rank 18.09.0-3.el7 docker-ce-stable
Docker-ce.x86_64 18.06.3.ce-3.el7 docker-ce-stable
Docker-ce.x86_64 18.06.2.ce-3.el7 docker-ce-stable
Docker-ce.x86_64 18.06.1.ce-3.el7 docker-ce-stable
Docker-ce.x86_64 18.06.0.ce-3.el7 docker-ce-stable
Docker-ce.x86_64 18.03.1.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 18.03.0.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.12.1.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.12.0.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.09.1.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.09.0.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.06.2.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.06.1.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.06.0.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.03.3.ce-1.el7 docker-ce-stable
Docker-ce.x86_64 17.03.2.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stable
Docker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stable
Determining fastest mirrors
* base: mirrors.aliyun.com
Available Packages
[root@k8s-node2] # yum-y install docker-ce-18.09.9-3.el7
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies
-> Running transaction check
-> Package docker-ce.x86_64 3VR 18.09.9-3.el7 will be installed
-- > Processing Dependency: container-selinux > = 2RV 2.74 for package: 3:docker-ce-18.09.9-3.el7.x86_64
-- > Processing Dependency: containerd.io > = 1.2.2-3 for package: 3:docker-ce-18.09.9-3.el7.x86_64
-- > Processing Dependency: docker-ce-cli for package: 3:docker-ce-18.09.9-3.el7.x86_64
-- > Processing Dependency: libcgroup for package: 3:docker-ce-18.09.9-3.el7.x86_64
-> Running transaction check
-> Package container-selinux.noarch 2 2.107-3.el7 will be installed
-- > Processing Dependency: policycoreutils-python for package: 2:container-selinux-2.107-3.el7.noarch
-> Package containerd.io.x86_64 0purl 1.2.10-3.2.el7 will be installed
-> Package docker-ce-cli.x86_64 1 19.03.5-3.el7 will be installed
-> Package libcgroup.x86_64 0RU 0.41-21.el7 will be installed
-> Running transaction check
-> Package policycoreutils-python.x86_64 0Rank 2.5-33.el7 will be installed
-- > Processing Dependency: setools-libs > = 3.3.8-4 for package: policycoreutils-python-2.5-33.el7.x86_64
-- > Processing Dependency: libsemanage-python > = 2.5-14 for package: policycoreutils-python-2.5-33.el7.x86_64
-- > Processing Dependency: audit-libs-python > = 2.1.3-4 for package: policycoreutils-python-2.5-33.el7.x86_64
-- > Processing Dependency: python-IPy for package: policycoreutils-python-2.5-33.el7.x86_64
-> Processing Dependency: libqpol.so.1 (VERS_1.4) (64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
-> Processing Dependency: libqpol.so.1 (VERS_1.2) (64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
-> Processing Dependency: libapol.so.4 (VERS_4.0) (64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
-- > Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-33.el7.x86_64
-> Processing Dependency: libqpol.so.1 () (64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
-> Processing Dependency: libapol.so.4 () (64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
-> Running transaction check
-> Package audit-libs-python.x86_64 0RU 2.8.5-4.el7 will be installed
-> Package checkpolicy.x86_64 0Rank 2.5-8.el7 will be installed
-> Package libsemanage-python.x86_64 0Rank 2.5-14.el7 will be installed
-> Package python-IPy.noarch 0RU 0.75-6.el7 will be installed
-> Package setools-libs.x86_64 0RU 3.3.8-4.el7 will be installed
-> Finished Dependency Resolution
Dependencies Resolved
=
Package Arch Version Repository Size
=
Installing:
Docker-ce x86'64 3 18.09.9-3.el7 docker-ce-stable 21 M
Installing for dependencies:
Audit-libs-python x8631 64 2.8.5-4.el7 base 76k
Checkpolicy x8631 64 2.5k-8.el7 base 295k
Container-selinux noarch 2vl 2.107-3.el7 extras 39k
Containerd.io x8631 64 1.2.10-3.2.el7 docker-ce-stable 23 M
Docker-ce-cli x86x 64 1purl 19.03.5-3.el7 docker-ce-stable 39 m
Libcgroup x8631 64 0.41-21.el7 base 66k
Libsemanage-python x86 million 64 2.5-14.el7 base 113k
Policycoreutils-python x8631 64 2.5k-33.el7 base 457k
Python-IPy noarch 0.75-6.el7 base 32k
Setools-libs x8631 64 3.3.8-4.el7 base 620k
Transaction Summary
=
Install 1 Package (+ 10 Dependent packages)
Total download size: 85 M
Installed size: 354 M
Downloading packages:
(1go 11): container-selinux-2.107-3.el7.noarch.rpm | 39 kB 00:00
(2go 11): audit-libs-python-2.8.5-4.el7.x86_64.rpm | 76 kB 00:00
(3 kB 11): checkpolicy-2.5-8.el7.x86_64.rpm | 295 kB 00:00
Warning: / var/cache/yum/x86_64/7/docker-ce-stable/packages/containerd.io-1.2.10-3.2.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Public key for containerd.io-1.2.10-3.2.el7.x86_64.rpm is not installed
(4 take 11): containerd.io-1.2.10-3.2.el7.x86_64.rpm | 23 MB 00:31
(5go 11): libcgroup-0.41-21.el7.x86_64.rpm | 66 kB 00:01
(6 take 11): libsemanage-python-2.5-14.el7.x86_64.rpm | 113 kB 00:01
(7take 11): python-IPy-0.75-6.el7.noarch.rpm | 32 kB 00:00
(8 kB 11): policycoreutils-python-2.5-33.el7.x86_64.rpm | 457 kB 00:01
(9 kB 11): setools-libs-3.3.8-4.el7.x86_64.rpm | 620 kB 00:04
(10 take 11): docker-ce-18.09.9-3.el7.x86_64.rpm | 21 MB 00:41
(11 take 11): docker-ce-cli-19.03.5-3.el7.x86_64.rpm | 39 MB 00:39
Total 1.2 MB/s | 85 MB 01:11
Retrieving key from https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
Importing GPG key 0x621E9F35:
Userid: "Docker Release (CE rpm)"
Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
From: https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing: libcgroup-0.41-21.el7.x86_64 1Comp11
Installing: setools-libs-3.3.8-4.el7.x86_64 2 Compact 11
Installing: 1:docker-ce-cli-19.03.5-3.el7.x86_64 3Comp11
Installing: audit-libs-python-2.8.5-4.el7.x86_64 4 Compact 11
Installing: python-IPy-0.75-6.el7.noarch 5Comp11
Installing: libsemanage-python-2.5-14.el7.x86_64 6Comp11
Installing: checkpolicy-2.5-8.el7.x86_64 7 Compact 11
Installing: policycoreutils-python-2.5-33.el7.x86_64 8Comp11
Installing: 2:container-selinux-2.107-3.el7.noarch 9 Compact 11
Setsebool: SELinux is disabled.
Installing: containerd.io-1.2.10-3.2.el7.x86_64 10 Universe 11
Installing: 3:docker-ce-18.09.9-3.el7.x86_64 11 Compact 11
Verifying: checkpolicy-2.5-8.el7.x86_64 1Comp11
Verifying: policycoreutils-python-2.5-33.el7.x86_64 2 Compact 11
Verifying: libsemanage-python-2.5-14.el7.x86_64 3Comp11
Verifying: 2:container-selinux-2.107-3.el7.noarch 4 Compact 11
Verifying: 3:docker-ce-18.09.9-3.el7.x86_64 5Comp11
Verifying: python-IPy-0.75-6.el7.noarch 6Comp11
Verifying: audit-libs-python-2.8.5-4.el7.x86_64 7 Compact 11
Verifying: containerd.io-1.2.10-3.2.el7.x86_64 8Comp11
Verifying: 1:docker-ce-cli-19.03.5-3.el7.x86_64 9 Compact 11
Verifying: setools-libs-3.3.8-4.el7.x86_64 10 Universe 11
Verifying: libcgroup-0.41-21.el7.x86_64 11 Compact 11
Installed:
Docker-ce.x86_64 3Rank 18.09.9-3.el7
Dependency Installed:
Audit-libs-python.x86_64 0RO 2.8.5-4.el7
Checkpolicy.x86_64 0RO 2.5-8.el7
Container-selinux.noarch 2Vol 2.107-3.el7
Containerd.io.x86_64 0VOR 1.2.10-3.2.el7
Docker-ce-cli.x86_64 1Rank 19.03.5-3.el7
Libcgroup.x86_64 0RO 0.41-21.el7
Libsemanage-python.x86_64 0RO 2.5-14.el7
Policycoreutils-python.x86_64 0RO 2.5-33.el7
Python-IPy.noarch 0RO 0.75-6.el7
Setools-libs.x86_64 0RO 3.3.8-4.el7
Complete!
[root@k8s-node2 ~] # systemctl enable docker
Created symlink from / etc/systemd/system/multi-user.target.wants/docker.service to / usr/lib/systemd/system/docker.service.
[root@k8s-node2 ~] # systemctl start docker
[root@k8s-node2 ~] # systemctl status docker
● docker.service-Docker Application Container Engine
Loaded: loaded (/ usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-02-12 10:10:02 CST; 6s ago
Docs: https://docs.docker.com
Main PID: 1908 (dockerd)
Tasks: 14
Memory: 39.3M
CGroup: / system.slice/docker.service
└─ 1908 / usr/bin/dockerd-H