" />

快速部署一个kubernetes集群

2024/5/9 6:24:18

image.png

image.png

image.png

image.png

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 << EOF

net.bridge.bridge-nf-call-ip6tables = 1

net.bridge.bridge-nf-call-iptables = 1

EOF

[root@k8s-master ~]# cat /etc/sysctl.d/k8s.conf

net.bridge.bridge-nf-call-ip6tables = 1

net.bridge.bridge-nf-call-iptables = 1

[root@k8s-master ~]# sysctl --system

* Applying /usr/lib/sysctl.d/00-system.conf ...

* Applying /usr/lib/sysctl.d/10-default-yama-scope.conf ...

kernel.yama.ptrace_scope = 0

* Applying /usr/lib/sysctl.d/50-default.conf ...

kernel.sysrq = 16

kernel.core_uses_pid = 1

net.ipv4.conf.default.rp_filter = 1

net.ipv4.conf.all.rp_filter = 1

net.ipv4.conf.default.accept_source_route = 0

net.ipv4.conf.all.accept_source_route = 0

net.ipv4.conf.default.promote_secondaries = 1

net.ipv4.conf.all.promote_secondaries = 1

fs.protected_hardlinks = 1

fs.protected_symlinks = 1

* Applying /etc/sysctl.d/99-sysctl.conf ...

* Applying /etc/sysctl.d/k8s.conf ...

* Applying /etc/sysctl.conf ...

[root@k8s-master ~]# wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo

--2020-02-12 10:07:18--  https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 119.96.207.102, 119.96.207.101, 116.211.224.248, ...

Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|119.96.207.102|:443... connected.

HTTP request sent, awaiting response... 200 OK

Length: 2640 (2.6K) [application/octet-stream]

Saving to: ‘/etc/yum.repos.d/docker-ce.repo’


100%[======================================>] 2,640       --.-K/s   in 0s      


2020-02-12 10:07:18 (716 MB/s) - ‘/etc/yum.repos.d/docker-ce.repo’ saved [2640/2640]


[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            3:19.03.5-3.el7                     docker-ce-stable

docker-ce.x86_64            3:19.03.4-3.el7                     docker-ce-stable

docker-ce.x86_64            3:19.03.3-3.el7                     docker-ce-stable

docker-ce.x86_64            3:19.03.2-3.el7                     docker-ce-stable

docker-ce.x86_64            3:19.03.1-3.el7                     docker-ce-stable

docker-ce.x86_64            3:19.03.0-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.9-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.8-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.7-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.6-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.5-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.4-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.3-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.2-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.1-3.el7                     docker-ce-stable

docker-ce.x86_64            3: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 3:18.09.9-3.el7 will be installed

--> Processing Dependency: container-selinux >= 2: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 0: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 0:0.41-21.el7 will be installed

--> Running transaction check

---> Package policycoreutils-python.x86_64 0: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 0:2.8.5-4.el7 will be installed

---> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed

---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed

---> Package python-IPy.noarch 0:0.75-6.el7 will be installed

---> Package setools-libs.x86_64 0: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        x86_64   2.8.5-4.el7         base                76 k

 checkpolicy              x86_64   2.5-8.el7           base               295 k

 container-selinux        noarch   2:2.107-3.el7       extras              39 k

 containerd.io            x86_64   1.2.10-3.2.el7      docker-ce-stable    23 M

 docker-ce-cli            x86_64   1:19.03.5-3.el7     docker-ce-stable    39 M

 libcgroup                x86_64   0.41-21.el7         base                66 k

 libsemanage-python       x86_64   2.5-14.el7          base               113 k

 policycoreutils-python   x86_64   2.5-33.el7          base               457 k

 python-IPy               noarch   0.75-6.el7          base                32 k

 setools-libs             x86_64   3.3.8-4.el7         base               620 k


Transaction Summary

================================================================================

Install  1 Package (+10 Dependent packages)


Total download size: 85 M

Installed size: 354 M

Downloading packages:

(1/11): container-selinux-2.107-3.el7.noarch.rpm           |  39 kB   00:00     

(2/11): audit-libs-python-2.8.5-4.el7.x86_64.rpm           |  76 kB   00:00     

(3/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/11): docker-ce-18.09.9-3.el7.x86_64.rpm                 |  21 MB   00:49     

(5/11): libcgroup-0.41-21.el7.x86_64.rpm                   |  66 kB   00:01     

(6/11): python-IPy-0.75-6.el7.noarch.rpm                   |  32 kB   00:00     

(7/11): libsemanage-python-2.5-14.el7.x86_64.rpm           | 113 kB   00:02     

(8/11): containerd.io-1.2.10-3.2.el7.x86_64.rpm            |  23 MB   00:52     

(9/11): setools-libs-3.3.8-4.el7.x86_64.rpm                | 620 kB   00:01     

(10/11): policycoreutils-python-2.5-33.el7.x86_64.rpm      | 457 kB   00:04     

(11/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) <docker@docker.com>"

 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                                1/11 

  Installing : setools-libs-3.3.8-4.el7.x86_64                             2/11 

  Installing : 1:docker-ce-cli-19.03.5-3.el7.x86_64                        3/11 

  Installing : audit-libs-python-2.8.5-4.el7.x86_64                        4/11 

  Installing : python-IPy-0.75-6.el7.noarch                                5/11 

  Installing : libsemanage-python-2.5-14.el7.x86_64                        6/11 

  Installing : checkpolicy-2.5-8.el7.x86_64                                7/11 

  Installing : policycoreutils-python-2.5-33.el7.x86_64                    8/11 

  Installing : 2:container-selinux-2.107-3.el7.noarch                      9/11 

setsebool:  SELinux is disabled.

  Installing : containerd.io-1.2.10-3.2.el7.x86_64                        10/11 

  Installing : 3:docker-ce-18.09.9-3.el7.x86_64                           11/11 

  Verifying  : checkpolicy-2.5-8.el7.x86_64                                1/11 

  Verifying  : policycoreutils-python-2.5-33.el7.x86_64                    2/11 

  Verifying  : libsemanage-python-2.5-14.el7.x86_64                        3/11 

  Verifying  : 2:container-selinux-2.107-3.el7.noarch                      4/11 

  Verifying  : 3:docker-ce-18.09.9-3.el7.x86_64                            5/11 

  Verifying  : python-IPy-0.75-6.el7.noarch                                6/11 

  Verifying  : audit-libs-python-2.8.5-4.el7.x86_64                        7/11 

  Verifying  : containerd.io-1.2.10-3.2.el7.x86_64                         8/11 

  Verifying  : 1:docker-ce-cli-19.03.5-3.el7.x86_64                        9/11 

  Verifying  : setools-libs-3.3.8-4.el7.x86_64                            10/11 

  Verifying  : libcgroup-0.41-21.el7.x86_64                               11/11 


Installed:

  docker-ce.x86_64 3:18.09.9-3.el7                                              


Dependency Installed:

  audit-libs-python.x86_64 0:2.8.5-4.el7                                        

  checkpolicy.x86_64 0:2.5-8.el7                                                

  container-selinux.noarch 2:2.107-3.el7                                        

  containerd.io.x86_64 0:1.2.10-3.2.el7                                         

  docker-ce-cli.x86_64 1:19.03.5-3.el7                                          

  libcgroup.x86_64 0:0.41-21.el7                                                

  libsemanage-python.x86_64 0:2.5-14.el7                                        

  policycoreutils-python.x86_64 0:2.5-33.el7                                    

  python-IPy.noarch 0:0.75-6.el7                                                

  setools-libs.x86_64 0: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:10:02.76509531..."

Feb 12 10:10:02 k8s-master dockerd[1911]: time="2020-02-12T10:10:02.76605705..."

Feb 12 10:10:02 k8s-master dockerd[1911]: time="2020-02-12T10:10:02.99515744..."

Feb 12 10:10:03 k8s-master dockerd[1911]: time="2020-02-12T10:10: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:10:03.10503137..."

Feb 12 10:10:03 k8s-master dockerd[1911]: time="2020-02-12T10:10: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 << EOF

> [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 0:1.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 0:1.16.0-0 will be installed

---> Package kubelet.x86_64 0:1.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 0: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 0:1.13.0-0 will be installed

---> Package kubernetes-cni.x86_64 0:0.7.5-0 will be installed

---> Package socat.x86_64 0:1.7.3.2-2.el7 will be installed

--> Running transaction check

---> Package libnetfilter_cthelper.x86_64 0:1.0.0-10.el7_7.1 will be installed

---> Package libnetfilter_cttimeout.x86_64 0:1.0.0-6.el7_7.1 will be installed

---> Package libnetfilter_queue.x86_64 0:1.0.2-2.el7_2 will be installed

--> Finished Dependency Resolution


Dependencies Resolved


================================================================================

 Package                   Arch      Version                Repository     Size

================================================================================

Installing:

 kubeadm                   x86_64    1.16.0-0               kubernetes    9.5 M

 kubectl                   x86_64    1.16.0-0               kubernetes     10 M

 kubelet                   x86_64    1.16.0-0               kubernetes     22 M

Installing for dependencies:

 conntrack-tools           x86_64    1.4.4-5.el7_7.2        updates       187 k

 cri-tools                 x86_64    1.13.0-0               kubernetes    5.1 M

 kubernetes-cni            x86_64    0.7.5-0                kubernetes     10 M

 libnetfilter_cthelper     x86_64    1.0.0-10.el7_7.1       updates        18 k

 libnetfilter_cttimeout    x86_64    1.0.0-6.el7_7.1        updates        18 k

 libnetfilter_queue        x86_64    1.0.2-2.el7_2          base           23 k

 socat                     x86_64    1.7.3.2-2.el7          base          290 k


Transaction Summary

================================================================================

Install  3 Packages (+7 Dependent packages)


Total download size: 57 M

Installed size: 262 M

Downloading packages:

(1/10): conntrack-tools-1.4.4-5.el7_7.2.x86_64.rpm         | 187 kB   00:00     

(2/10): 14bfe6e75a9efc8eca3f638eb22c7e2ce759c67f95b43b16fa | 5.1 MB   00:30     

(3/10): be6a085d0285f83d74429540b878a137a9341ba34dbd85dfba |  10 MB   00:06     

(4/10): 697ad1a31f01e90f44ad3f0c8fe06f32d7bdd3b227fcf70527 | 9.5 MB   00:43     

(5/10): libnetfilter_cthelper-1.0.0-10.el7_7.1.x86_64.rpm  |  18 kB   00:01     

(6/10): libnetfilter_queue-1.0.2-2.el7_2.x86_64.rpm        |  23 kB   00:01     

(7/10): libnetfilter_cttimeout-1.0.0-6.el7_7.1.x86_64.rpm  |  18 kB   00:01     

(8/10): d58731a80db4214f3f1021f5676fe7f4da7239fc4a48c60f15 |  22 MB   00:11     

(9/10): 548a0dcd865c16a50980420ddfa5fbccb8b59621179798e6dc |  10 MB   00:05     

(10/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/10 

  Installing : kubectl-1.16.0-0.x86_64                                     2/10 

  Installing : libnetfilter_cttimeout-1.0.0-6.el7_7.1.x86_64               3/10 

  Installing : cri-tools-1.13.0-0.x86_64                                   4/10 

  Installing : libnetfilter_queue-1.0.2-2.el7_2.x86_64                     5/10 

  Installing : libnetfilter_cthelper-1.0.0-10.el7_7.1.x86_64               6/10 

  Installing : conntrack-tools-1.4.4-5.el7_7.2.x86_64                      7/10 

  Installing : kubernetes-cni-0.7.5-0.x86_64                               8/10 

  Installing : kubelet-1.16.0-0.x86_64                                     9/10 

  Installing : kubeadm-1.16.0-0.x86_64                                    10/10 

  Verifying  : libnetfilter_cthelper-1.0.0-10.el7_7.1.x86_64               1/10 

  Verifying  : conntrack-tools-1.4.4-5.el7_7.2.x86_64                      2/10 

  Verifying  : libnetfilter_queue-1.0.2-2.el7_2.x86_64                     3/10 

  Verifying  : kubelet-1.16.0-0.x86_64                                     4/10 

  Verifying  : cri-tools-1.13.0-0.x86_64                                   5/10 

  Verifying  : libnetfilter_cttimeout-1.0.0-6.el7_7.1.x86_64               6/10 

  Verifying  : kubectl-1.16.0-0.x86_64                                     7/10 

  Verifying  : kubernetes-cni-0.7.5-0.x86_64                               8/10 

  Verifying  : socat-1.7.3.2-2.el7.x86_64                                  9/10 

  Verifying  : kubeadm-1.16.0-0.x86_64                                    10/10 


Installed:

  kubeadm.x86_64 0:1.16.0-0 kubectl.x86_64 0:1.16.0-0 kubelet.x86_64 0:1.16.0-0


Dependency Installed:

  conntrack-tools.x86_64 0:1.4.4-5.el7_7.2                                      

  cri-tools.x86_64 0:1.13.0-0                                                   

  kubernetes-cni.x86_64 0:0.7.5-0                                               

  libnetfilter_cthelper.x86_64 0:1.0.0-10.el7_7.1                               

  libnetfilter_cttimeout.x86_64 0:1.0.0-6.el7_7.1                               

  libnetfilter_queue.x86_64 0:1.0.2-2.el7_2                                     

  socat.x86_64 0: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   <none>   18s    v1.16.0

k8s-node2    NotReady   <none>   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             0/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          0/1     Init:0/1   0          8s

kube-flannel-ds-amd64-7snx6          0/1     Init:0/1   0          8s

kube-flannel-ds-amd64-85vf8          0/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

等大概十分钟左右

[root@k8s-master src]# kubectl get pods -n kube-system

NAME                                 READY   STATUS    RESTARTS   AGE

coredns-58cc8c89f4-7s2n9             1/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/1     Running   0          2m42s

kube-flannel-ds-amd64-7snx6          1/1     Running   0          2m42s

kube-flannel-ds-amd64-85vf8          1/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    <none>   4m22s   v1.16.0

k8s-node2    Ready    <none>   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      <none>        443/TCP        6m34s

service/nginx        NodePort    10.1.131.49   <none>        80:32232/TCP   7s


访问地址:http://NodeIP:Port  

192.168.1.112:32232

image.png

[root@k8s-master src]# kubectl get nodes

NAME         STATUS   ROLES    AGE     VERSION

k8s-master   Ready    master   7m4s    v1.16.0

k8s-node1    Ready    <none>   5m41s   v1.16.0

k8s-node2    Ready    <none>   5m37s   v1.16.0

[root@k8s-master src]# kubectl get pods -n kube-system

NAME                                 READY   STATUS    RESTARTS   AGE

coredns-58cc8c89f4-7s2n9             1/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/1     Running   0          4m6s

kube-flannel-ds-amd64-7snx6          1/1     Running   0          4m6s

kube-flannel-ds-amd64-85vf8          1/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    <none>   6m35s   v1.16.0

k8s-node2    Ready    <none>   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      <none>        443/TCP        7m57s

service/nginx        NodePort    10.1.131.49   <none>        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:       <none>

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


必须要用火狐浏览器:

访问地址:http://NodeIP:30001

image.png

image.png

dashboard部署成功


k8s-node1和k8s-node2的部署步骤一样

[root@k8s-node2 ~]# getenforce

Disabled

[root@k8s-node2 ~]# cat > /etc/sysctl.d/k8s.conf << EOF

 net.bridge.bridge-nf-call-ip6tables = 1

 net.bridge.bridge-nf-call-iptables = 1

 EOF

[root@k8s-node2 ~]# cat /etc/sysctl.d/k8s.conf

net.bridge.bridge-nf-call-ip6tables = 1

net.bridge.bridge-nf-call-iptables = 1

[root@k8s-node2 ~]# sysctl --system

* Applying /usr/lib/sysctl.d/00-system.conf ...

* Applying /usr/lib/sysctl.d/10-default-yama-scope.conf ...

kernel.yama.ptrace_scope = 0

* Applying /usr/lib/sysctl.d/50-default.conf ...

kernel.sysrq = 16

kernel.core_uses_pid = 1

net.ipv4.conf.default.rp_filter = 1

net.ipv4.conf.all.rp_filter = 1

net.ipv4.conf.default.accept_source_route = 0

net.ipv4.conf.all.accept_source_route = 0

net.ipv4.conf.default.promote_secondaries = 1

net.ipv4.conf.all.promote_secondaries = 1

fs.protected_hardlinks = 1

fs.protected_symlinks = 1

* Applying /etc/sysctl.d/99-sysctl.conf ...

* Applying /etc/sysctl.d/k8s.conf ...

* Applying /etc/sysctl.conf ...

[root@k8s-node2 ~]# wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo

--2020-02-12 10:07:18--  https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 119.96.207.104, 119.96.207.102, 119.96.207.101, ...

Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|119.96.207.104|:443... connected.

HTTP request sent, awaiting response... 200 OK

Length: 2640 (2.6K) [application/octet-stream]

Saving to: ‘/etc/yum.repos.d/docker-ce.repo’


100%[======================================>] 2,640       --.-K/s   in 0s      


2020-02-12 10:07:18 (641 MB/s) - ‘/etc/yum.repos.d/docker-ce.repo’ saved [2640/2640]


[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            3:19.03.5-3.el7                     docker-ce-stable

docker-ce.x86_64            3:19.03.4-3.el7                     docker-ce-stable

docker-ce.x86_64            3:19.03.3-3.el7                     docker-ce-stable

docker-ce.x86_64            3:19.03.2-3.el7                     docker-ce-stable

docker-ce.x86_64            3:19.03.1-3.el7                     docker-ce-stable

docker-ce.x86_64            3:19.03.0-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.9-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.8-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.7-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.6-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.5-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.4-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.3-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.2-3.el7                     docker-ce-stable

docker-ce.x86_64            3:18.09.1-3.el7                     docker-ce-stable

docker-ce.x86_64            3: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 3:18.09.9-3.el7 will be installed

--> Processing Dependency: container-selinux >= 2: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 0: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 0:0.41-21.el7 will be installed

--> Running transaction check

---> Package policycoreutils-python.x86_64 0: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 0:2.8.5-4.el7 will be installed

---> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed

---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed

---> Package python-IPy.noarch 0:0.75-6.el7 will be installed

---> Package setools-libs.x86_64 0: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        x86_64   2.8.5-4.el7         base                76 k

 checkpolicy              x86_64   2.5-8.el7           base               295 k

 container-selinux        noarch   2:2.107-3.el7       extras              39 k

 containerd.io            x86_64   1.2.10-3.2.el7      docker-ce-stable    23 M

 docker-ce-cli            x86_64   1:19.03.5-3.el7     docker-ce-stable    39 M

 libcgroup                x86_64   0.41-21.el7         base                66 k

 libsemanage-python       x86_64   2.5-14.el7          base               113 k

 policycoreutils-python   x86_64   2.5-33.el7          base               457 k

 python-IPy               noarch   0.75-6.el7          base                32 k

 setools-libs             x86_64   3.3.8-4.el7         base               620 k


Transaction Summary

================================================================================

Install  1 Package (+10 Dependent packages)


Total download size: 85 M

Installed size: 354 M

Downloading packages:

(1/11): container-selinux-2.107-3.el7.noarch.rpm           |  39 kB   00:00     

(2/11): audit-libs-python-2.8.5-4.el7.x86_64.rpm           |  76 kB   00:00     

(3/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/11): containerd.io-1.2.10-3.2.el7.x86_64.rpm            |  23 MB   00:31     

(5/11): libcgroup-0.41-21.el7.x86_64.rpm                   |  66 kB   00:01     

(6/11): libsemanage-python-2.5-14.el7.x86_64.rpm           | 113 kB   00:01     

(7/11): python-IPy-0.75-6.el7.noarch.rpm                   |  32 kB   00:00     

(8/11): policycoreutils-python-2.5-33.el7.x86_64.rpm       | 457 kB   00:01     

(9/11): setools-libs-3.3.8-4.el7.x86_64.rpm                | 620 kB   00:04     

(10/11): docker-ce-18.09.9-3.el7.x86_64.rpm                |  21 MB   00:41     

(11/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) <docker@docker.com>"

 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                                1/11 

  Installing : setools-libs-3.3.8-4.el7.x86_64                             2/11 

  Installing : 1:docker-ce-cli-19.03.5-3.el7.x86_64                        3/11 

  Installing : audit-libs-python-2.8.5-4.el7.x86_64                        4/11 

  Installing : python-IPy-0.75-6.el7.noarch                                5/11 

  Installing : libsemanage-python-2.5-14.el7.x86_64                        6/11 

  Installing : checkpolicy-2.5-8.el7.x86_64                                7/11 

  Installing : policycoreutils-python-2.5-33.el7.x86_64                    8/11 

  Installing : 2:container-selinux-2.107-3.el7.noarch                      9/11 

setsebool:  SELinux is disabled.

  Installing : containerd.io-1.2.10-3.2.el7.x86_64                        10/11 

  Installing : 3:docker-ce-18.09.9-3.el7.x86_64                           11/11 

  Verifying  : checkpolicy-2.5-8.el7.x86_64                                1/11 

  Verifying  : policycoreutils-python-2.5-33.el7.x86_64                    2/11 

  Verifying  : libsemanage-python-2.5-14.el7.x86_64                        3/11 

  Verifying  : 2:container-selinux-2.107-3.el7.noarch                      4/11 

  Verifying  : 3:docker-ce-18.09.9-3.el7.x86_64                            5/11 

  Verifying  : python-IPy-0.75-6.el7.noarch                                6/11 

  Verifying  : audit-libs-python-2.8.5-4.el7.x86_64                        7/11 

  Verifying  : containerd.io-1.2.10-3.2.el7.x86_64                         8/11 

  Verifying  : 1:docker-ce-cli-19.03.5-3.el7.x86_64                        9/11 

  Verifying  : setools-libs-3.3.8-4.el7.x86_64                            10/11 

  Verifying  : libcgroup-0.41-21.el7.x86_64                               11/11 


Installed:

  docker-ce.x86_64 3:18.09.9-3.el7                                              


Dependency Installed:

  audit-libs-python.x86_64 0:2.8.5-4.el7                                        

  checkpolicy.x86_64 0:2.5-8.el7                                                

  container-selinux.noarch 2:2.107-3.el7                                        

  containerd.io.x86_64 0:1.2.10-3.2.el7                                         

  docker-ce-cli.x86_64 1:19.03.5-3.el7                                          

  libcgroup.x86_64 0:0.41-21.el7                                                

  libsemanage-python.x86_64 0:2.5-14.el7                                        

  policycoreutils-python.x86_64 0:2.5-33.el7                                    

  python-IPy.noarch 0:0.75-6.el7                                                

  setools-libs.x86_64 0: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 fd:// --containerd=/run/containerd/cont...


Feb 12 10:10:02 k8s-node2 dockerd[1908]: time="2020-02-12T10:10:02.391918512...c

Feb 12 10:10:02 k8s-node2 dockerd[1908]: time="2020-02-12T10:10:02.392092538...c

Feb 12 10:10:02 k8s-node2 dockerd[1908]: time="2020-02-12T10:10:02.660343842..."

Feb 12 10:10:02 k8s-node2 dockerd[1908]: time="2020-02-12T10:10:02.661383278..."

Feb 12 10:10:02 k8s-node2 dockerd[1908]: time="2020-02-12T10:10:02.866069368..."

Feb 12 10:10:02 k8s-node2 dockerd[1908]: time="2020-02-12T10:10:02.943851863..."

Feb 12 10:10:02 k8s-node2 dockerd[1908]: time="2020-02-12T10:10:02.967481943...9

Feb 12 10:10:02 k8s-node2 dockerd[1908]: time="2020-02-12T10:10:02.967680234..."

Feb 12 10:10:02 k8s-node2 dockerd[1908]: time="2020-02-12T10:10:02.980350933..."

Feb 12 10:10:02 k8s-node2 systemd[1]: Started Docker Application Container ...e.

Hint: Some lines were ellipsized, use -l to show in full.

[root@k8s-node2 ~]# 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-node2 ~]# sudo systemctl restart docker

[root@k8s-node2 ~]# cat > /etc/yum.repos.d/kubernetes.repo << EOF

 [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-node2 ~]# 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 0:1.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 0:1.16.0-0 will be installed

---> Package kubelet.x86_64 0:1.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 0: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 0:1.13.0-0 will be installed

---> Package kubernetes-cni.x86_64 0:0.7.5-0 will be installed

---> Package socat.x86_64 0:1.7.3.2-2.el7 will be installed

--> Running transaction check

---> Package libnetfilter_cthelper.x86_64 0:1.0.0-10.el7_7.1 will be installed

---> Package libnetfilter_cttimeout.x86_64 0:1.0.0-6.el7_7.1 will be installed

---> Package libnetfilter_queue.x86_64 0:1.0.2-2.el7_2 will be installed

--> Finished Dependency Resolution


Dependencies Resolved


================================================================================

 Package                   Arch      Version                Repository     Size

================================================================================

Installing:

 kubeadm                   x86_64    1.16.0-0               kubernetes    9.5 M

 kubectl                   x86_64    1.16.0-0               kubernetes     10 M

 kubelet                   x86_64    1.16.0-0               kubernetes     22 M

Installing for dependencies:

 conntrack-tools           x86_64    1.4.4-5.el7_7.2        updates       187 k

 cri-tools                 x86_64    1.13.0-0               kubernetes    5.1 M

 kubernetes-cni            x86_64    0.7.5-0                kubernetes     10 M

 libnetfilter_cthelper     x86_64    1.0.0-10.el7_7.1       updates        18 k

 libnetfilter_cttimeout    x86_64    1.0.0-6.el7_7.1        updates        18 k

 libnetfilter_queue        x86_64    1.0.2-2.el7_2          base           23 k

 socat                     x86_64    1.7.3.2-2.el7          base          290 k


Transaction Summary

================================================================================

Install  3 Packages (+7 Dependent packages)


Total download size: 57 M

Installed size: 262 M

Downloading packages:

(1/10): conntrack-tools-1.4.4-5.el7_7.2.x86_64.rpm         | 187 kB   00:00     

(2/10): 697ad1a31f01e90f44ad3f0c8fe06f32d7bdd3b227fcf70527 | 9.5 MB   00:07     

(3/10): 14bfe6e75a9efc8eca3f638eb22c7e2ce759c67f95b43b16fa | 5.1 MB   00:08     

(4/10): be6a085d0285f83d74429540b878a137a9341ba34dbd85dfba |  10 MB   00:15     

(5/10): libnetfilter_cthelper-1.0.0-10.el7_7.1.x86_64.rpm  |  18 kB   00:02     

(6/10): libnetfilter_queue-1.0.2-2.el7_2.x86_64.rpm        |  23 kB   00:02     

(7/10): libnetfilter_cttimeout-1.0.0-6.el7_7.1.x86_64.rpm  |  18 kB   00:02     

(8/10): socat-1.7.3.2-2.el7.x86_64.rpm                     | 290 kB   00:04     

(9/10): 548a0dcd865c16a50980420ddfa5fbccb8b59621179798e6dc |  10 MB   00:16     

(10/10): d58731a80db4214f3f1021f5676fe7f4da7239fc4a48c60f1 |  22 MB   00:32     

--------------------------------------------------------------------------------

Total                                              1.4 MB/s |  57 MB  00:41     

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  Installing : socat-1.7.3.2-2.el7.x86_64                                  1/10 

  Installing : kubectl-1.16.0-0.x86_64                                     2/10 

  Installing : libnetfilter_cttimeout-1.0.0-6.el7_7.1.x86_64               3/10 

  Installing : cri-tools-1.13.0-0.x86_64                                   4/10 

  Installing : libnetfilter_queue-1.0.2-2.el7_2.x86_64                     5/10 

  Installing : libnetfilter_cthelper-1.0.0-10.el7_7.1.x86_64               6/10 

  Installing : conntrack-tools-1.4.4-5.el7_7.2.x86_64                      7/10 

  Installing : kubernetes-cni-0.7.5-0.x86_64                               8/10 

  Installing : kubelet-1.16.0-0.x86_64                                     9/10 

  Installing : kubeadm-1.16.0-0.x86_64                                    10/10 

  Verifying  : libnetfilter_cthelper-1.0.0-10.el7_7.1.x86_64               1/10 

  Verifying  : conntrack-tools-1.4.4-5.el7_7.2.x86_64                      2/10 

  Verifying  : libnetfilter_queue-1.0.2-2.el7_2.x86_64                     3/10 

  Verifying  : kubelet-1.16.0-0.x86_64                                     4/10 

  Verifying  : cri-tools-1.13.0-0.x86_64                                   5/10 

  Verifying  : libnetfilter_cttimeout-1.0.0-6.el7_7.1.x86_64               6/10 

  Verifying  : kubectl-1.16.0-0.x86_64                                     7/10 

  Verifying  : kubernetes-cni-0.7.5-0.x86_64                               8/10 

  Verifying  : socat-1.7.3.2-2.el7.x86_64                                  9/10 

  Verifying  : kubeadm-1.16.0-0.x86_64                                    10/10 


Installed:

  kubeadm.x86_64 0:1.16.0-0 kubectl.x86_64 0:1.16.0-0 kubelet.x86_64 0:1.16.0-0


Dependency Installed:

  conntrack-tools.x86_64 0:1.4.4-5.el7_7.2                                      

  cri-tools.x86_64 0:1.13.0-0                                                   

  kubernetes-cni.x86_64 0:0.7.5-0                                               

  libnetfilter_cthelper.x86_64 0:1.0.0-10.el7_7.1                               

  libnetfilter_cttimeout.x86_64 0:1.0.0-6.el7_7.1                               

  libnetfilter_queue.x86_64 0:1.0.2-2.el7_2                                     

  socat.x86_64 0:1.7.3.2-2.el7                                                  


Complete!

[root@k8s-node2 ~]# systemctl enable kubelet

Created symlink from /etc/systemd/system/multi-user.target.wants/kubelet.service to /usr/lib/systemd/system/kubelet.service.

[root@k8s-node2 ~]# kubeadm join 192.168.1.111:6443 --token 3a8akv.5sdpd199534o5knk \

     --discovery-token-ca-cert-hash sha256:beb8860fe8f6fb4abaf23fa0570142fb6b81b2c3bf8a9a228bae884184c7035e

[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] Reading configuration from the cluster...

[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'

[kubelet-start] Downloading configuration for the kubelet from the "kubelet-config-1.16" ConfigMap in the kube-system namespace

[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"

[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"

[kubelet-start] Activating the kubelet service

[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...


This node has joined the cluster:

* Certificate signing request was sent to apiserver and a response was received.

* The Kubelet was informed of the new secure connection details.


Run 'kubectl get nodes' on the control-plane to see this node join the cluster.


查看全文
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

相关文章

  1. 二、Docker使用模板创建镜像、容器管理、仓库管理、数据管理

    一、Docker使用模板创建镜像首先下载一个模板http://download.openvz.org/template/precreated///下载速度不快,下载了一个centos6的模板centos-6-x86-minimal.tar.gz[root@fuxi01 ~]# wget http://download.openvz.org/template/precreated/centos-6-x86-minimal.tar.gz 导入…...

    2024/5/9 3:40:54
  2. 第 5 章 shell编程_课后题

    考试题1:用source执行脚本和用bash执行Shell脚本的区别是什么?souce执行脚本相当于是在一个shell当中,而bash执行脚本相当于开启了一个子shell。就变量而言,一个shell当中执行的变量是可以用的,而子shell的变量,父shell中是不能继承的,子脚本执行完后,变量就失效了。 考…...

    2024/4/24 8:31:04
  3. Kubernetes集群部署 上

    概述 K8S集群部署有几种方式:kubeadm、minikube和二进制包。前两者属于自动部署,简化部署操作。而在生成环境中一般使用二进制包部署,以下就是使用二进制包部署Kubernetes集群。 架构总规划图环境准备 三台主机,一台作为master节点,二台作为node节点。 其中master节点需要…...

    2024/5/8 19:43:21
  4. Kubernetes()minikube的安装)

    KubernetesKubernetes是一个开源的Docker容器编排系统,Kubernetes简称K8S。调度计算集群的节点,动态管理上面的作业通过使用[labels]和[pods]的概念,将应用按逻辑单元进行分组K8S用于容器应用程序的部署,扩展和管理K8S提供了容器编排,资源调度,弹性伸缩,部署管理,服务发…...

    2024/4/24 8:31:02
  5. K8S 之 Jenkins安装

    一、Jenkins安装准备条件 #在运维主机操作: 1.准备镜像 ~]# docker pull jenkins/jenkins:2.190.3 ~]# docker images | grep jenkins ~]# docker tag 22b8b9a84dbe test-harbor.cedarhd.com/public/jenkins:v2.190.3 ~]# docker push test-harbor.cedarhd.com/public/jenkins…...

    2024/4/24 8:31:04
  6. Linux磁盘扩容教程

    步骤1:查看磁盘大小 fdisk -l 步骤2:卸载分区 umount /www 步骤3:删除分区并重新建立分区 fdisk /etc/sdb d n p w 步骤4:卸载分区并检查文件系统 umount /dev/sdb1 umount /www e2fsck -f /dev/sdb1 (ext4文件系统) xfs_repair /dev/sdb1 (xfs文件系统) 步骤5:挂载目录…...

    2024/4/24 8:31:00
  7. 借用 AWS 服务 CodePipeling + ECS 实现蓝绿发布 (awscli)

    一、架构图 1.1、架构图1.2、一些文件解释buildspec.yaml: 主要是 codebuile 在构建过程中需要的一个文件,用了告知如何构建。 appspec.yaml: 是 codedeploy 在部署过程中的修订文件,可以比作为一个环境变量配置文件吧。 taskdef.json:是我们的 ECS task 的一个定义文件,有…...

    2024/4/24 8:30:59
  8. 统计指定目录文件夹个数和文件类型和文件总大小

    #!/usr/bin/env python# encoding: utf-8"""@author: eguotangseng@file: file_type.py@time: 2020/02/11 """import os """通过给定目录,统计所有的不同子文件类型及占用内存""" size_dict = {}type_dict = {} …...

    2024/4/24 8:30:58
  9. #IT明星不是梦# 疫情期间远程办公必备指南,延期开工必看

    2020年的春节让一场突如其来的疫情,打乱了企业节后正常复工的节奏,目前各企业会陆续在2月10日上班,在此境况下,如何在防范疫情的同时,并保障企业顺利开工成为面临的头等大事。现在有不少企业,特别是一些互联网公司,开始尝试一种新策略:远程办公。 我们公司已经在2月3号…...

    2024/4/16 15:04:51
  10. kubernetes核心概念

    ...

    2024/5/6 6:18:37
  11. Linux性能调优的优化思路

    Linux操作系统是一个开源产品,也是一个开源软件的实践和应用平台,在这个平台下有无数的开源软件支撑,我们常见的有apache、tomcat、nginx、mysql、php等等,开源软件的最大理念就是自由、开放,那么Linux作为一个开源平台,最终要实现的是通过这些开源软件的支持,以低廉的成…...

    2024/4/16 15:05:02
  12. GPU服务器故障诊断

    1. GPU日志收集 安装GPU驱动的系统下,任意目录下执行命令:nvidia-bug-report.sh 执行命令后,当前目录下会生成日志压缩包:nvidia-bug-report.log.gz 2. GPU基础状态检测对于GPU服务器建议客户维持较新的GPU驱动版本、禁用nouveau模块、打开GPU驱动内存常驻模式并配置开机自…...

    2024/4/18 19:26:07
  13. MySQL8 role角色功能介绍

    role角色功能对于Oracle数据库来说不算是什么特殊, 然而对于mysql来说 MySQL8.0新增了role角色功能意义还是令人新奇不少,同时也是很多使用MySQL服务的用户一直所期盼的 MySQL8.0中新增的role功能,DBA可以创建角色,对其赋予权限,并且将他们授权用户,使用角色可以大量减轻…...

    2024/4/20 17:25:47
  14. mysql8.0忘记密码如何找回

    为了演示,找个测试环境来操作,千万不要线上这么搞pkill mysqld 关闭掉mysql 跳过MySQL的权限表启动MySQL服务:--skip-grant-tables启动mysql /usr/local/mysql8013/bin/mysqld_safe --defaults-file=/data/mysql8/my8.cnf --skip-grant-tables & 将密码置空: root@loc…...

    2024/4/19 11:41:02
  15. zabbix server is not running:the information

    zabbix报错:zabbix server is not running:the information displayer may not be current。环境是centos7。首先进服务器,查看日志tail -20 /var/log/zabbix/zabbix_server.log 显示:zbx_mem_realloc(): please increase CacheSize configuration parameter16541:20200210:…...

    2024/4/19 22:52:09
  16. TiOps多云运维管理平台使用评测

    2020年这个春节肯定是所有人最难忘的一个春节,每个人都在关心流感疫情。不能出门的我只能在家看看电影看看书。做运维的我偶然间看到一个叫TiOps的多云运维平台产品,支持多云环境安全远程运维管理。我们公司有Ucloud和阿里云,办公环境还有很多虚拟机跑开发环境,正好缺一个管…...

    2024/4/16 15:05:23
  17. 疫情下DevOps团队远程办公的一天

    一 背景 20200202多么神奇的一个数字,响应国家号召,作为一个普通公民面对恶魔疾病疯狂摧残同胞的身心,我们自身能做的就是做好宅男宅女,蜗居室内减少外出,切断病毒传播途径,自觉隔离不为社会添乱。 在昨天公司已经开始了远程在家办公模式,自己很庆幸从事云计算及相关服务…...

    2024/4/24 8:30:57
  18. 世界上最大的独立开源公司SUSE将退出OpenStack市场

    当开源OpenStack云平台在2010年诞生时,Linux供应商是第一批将产品推向市场的。其中一个供应商是SUSE,它在2012年进入OpenStack的市场,但七年后的今天,这个旅程就要结束了。在红帽被IBM以340亿美元的天价收购后,SUSE就成为世界上最大的独立开源公司。当开源OpenStack云平台…...

    2024/4/24 8:30:56
  19. redis-full-check校验2个不同redis实例数据

    redis-full-check校验redis数据是否一致: 校验2个不同的redis实例数据: 6986 为redis实例一6987 为redis实例二 登录6986 redis实例一,模拟设置4个key值 [root@localhost redis-full-check-1.4.7]# redis-cli -h 127.0.0.1 -p 6986 -a Y2hJKSGtuEq Warning: Using a passwor…...

    2024/4/24 8:30:56
  20. man 命令详解

    Nameman - format and display the on-line manual pages:格式化显示在线手册页sysnosisman [-acdDfFhkKtvVwW] [--path] [-m system] [-p string] [-C config_file] [-M pathlist] [-P pager] [-B browser] [-H htmlpager] [-S section_list] [section] name ...…...

    2024/4/24 8:31:01

最新文章

  1. Java 11 到 Java 8 的兼容性转换

    Java 11 到 Java 8 的兼容性转换 欲倚绿窗伴卿卿&#xff0c;颇悔今生误道行。有心持钵丛林去&#xff0c;又负美人一片情。 静坐修观法眼开&#xff0c;祈求三宝降灵台&#xff0c;观中诸圣何曾见&#xff1f;不请情人却自来。 入山投谒得道僧&#xff0c;求教上师说因明。争奈…...

    2024/5/9 6:24:12
  2. 梯度消失和梯度爆炸的一些处理方法

    在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言&#xff0c;在此感激不尽。 权重和梯度的更新公式如下&#xff1a; w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...

    2024/5/7 10:36:02
  3. excel 提取数字字符混合文本中的数字(快捷键ctrl+e)

    首先&#xff0c;已知A列数据&#xff0c;在B1单元格输入A列中的数据&#xff0c;如3*4*6 第二部&#xff1a;全选对应的B列&#xff0c;然后&#xff1a; ctrld 批量复制 CTRLE 智能复制 由此可见&#xff0c;智能提取汉字与数字混合中的数字方法 。若想分别提取3个数字&am…...

    2024/5/6 6:44:06
  4. vue系列——v-text

    <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width, initial-scale1.0"><title>v-text指令</title> </head> <body&…...

    2024/5/8 2:37:24
  5. 【外汇早评】美通胀数据走低,美元调整

    原标题:【外汇早评】美通胀数据走低,美元调整昨日美国方面公布了新一期的核心PCE物价指数数据,同比增长1.6%,低于前值和预期值的1.7%,距离美联储的通胀目标2%继续走低,通胀压力较低,且此前美国一季度GDP初值中的消费部分下滑明显,因此市场对美联储后续更可能降息的政策…...

    2024/5/8 6:01:22
  6. 【原油贵金属周评】原油多头拥挤,价格调整

    原标题:【原油贵金属周评】原油多头拥挤,价格调整本周国际劳动节,我们喜迎四天假期,但是整个金融市场确实流动性充沛,大事频发,各个商品波动剧烈。美国方面,在本周四凌晨公布5月份的利率决议和新闻发布会,维持联邦基金利率在2.25%-2.50%不变,符合市场预期。同时美联储…...

    2024/5/7 9:45:25
  7. 【外汇周评】靓丽非农不及疲软通胀影响

    原标题:【外汇周评】靓丽非农不及疲软通胀影响在刚结束的周五,美国方面公布了新一期的非农就业数据,大幅好于前值和预期,新增就业重新回到20万以上。具体数据: 美国4月非农就业人口变动 26.3万人,预期 19万人,前值 19.6万人。 美国4月失业率 3.6%,预期 3.8%,前值 3…...

    2024/5/4 23:54:56
  8. 【原油贵金属早评】库存继续增加,油价收跌

    原标题:【原油贵金属早评】库存继续增加,油价收跌周三清晨公布美国当周API原油库存数据,上周原油库存增加281万桶至4.692亿桶,增幅超过预期的74.4万桶。且有消息人士称,沙特阿美据悉将于6月向亚洲炼油厂额外出售更多原油,印度炼油商预计将每日获得至多20万桶的额外原油供…...

    2024/5/9 4:20:59
  9. 【外汇早评】日本央行会议纪要不改日元强势

    原标题:【外汇早评】日本央行会议纪要不改日元强势近两日日元大幅走强与近期市场风险情绪上升,避险资金回流日元有关,也与前一段时间的美日贸易谈判给日本缓冲期,日本方面对汇率问题也避免继续贬值有关。虽然今日早间日本央行公布的利率会议纪要仍然是支持宽松政策,但这符…...

    2024/5/4 23:54:56
  10. 【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响

    原标题:【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响近日伊朗局势升温,导致市场担忧影响原油供给,油价试图反弹。此时OPEC表态稳定市场。据消息人士透露,沙特6月石油出口料将低于700万桶/日,沙特已经收到石油消费国提出的6月份扩大出口的“适度要求”,沙特将满…...

    2024/5/4 23:55:05
  11. 【外汇早评】美欲与伊朗重谈协议

    原标题:【外汇早评】美欲与伊朗重谈协议美国对伊朗的制裁遭到伊朗的抗议,昨日伊朗方面提出将部分退出伊核协议。而此行为又遭到欧洲方面对伊朗的谴责和警告,伊朗外长昨日回应称,欧洲国家履行它们的义务,伊核协议就能保证存续。据传闻伊朗的导弹已经对准了以色列和美国的航…...

    2024/5/4 23:54:56
  12. 【原油贵金属早评】波动率飙升,市场情绪动荡

    原标题:【原油贵金属早评】波动率飙升,市场情绪动荡因中美贸易谈判不安情绪影响,金融市场各资产品种出现明显的波动。随着美国与中方开启第十一轮谈判之际,美国按照既定计划向中国2000亿商品征收25%的关税,市场情绪有所平复,已经开始接受这一事实。虽然波动率-恐慌指数VI…...

    2024/5/7 11:36:39
  13. 【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试

    原标题:【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试美国和伊朗的局势继续升温,市场风险情绪上升,避险黄金有向上突破阻力的迹象。原油方面稍显平稳,近期美国和OPEC加大供给及市场需求回落的影响,伊朗局势并未推升油价走强。近期中美贸易谈判摩擦再度升级,美国对中…...

    2024/5/4 23:54:56
  14. 【原油贵金属早评】市场情绪继续恶化,黄金上破

    原标题:【原油贵金属早评】市场情绪继续恶化,黄金上破周初中国针对于美国加征关税的进行的反制措施引发市场情绪的大幅波动,人民币汇率出现大幅的贬值动能,金融市场受到非常明显的冲击。尤其是波动率起来之后,对于股市的表现尤其不安。隔夜美国股市出现明显的下行走势,这…...

    2024/5/6 1:40:42
  15. 【外汇早评】美伊僵持,风险情绪继续升温

    原标题:【外汇早评】美伊僵持,风险情绪继续升温昨日沙特两艘油轮再次发生爆炸事件,导致波斯湾局势进一步恶化,市场担忧美伊可能会出现摩擦生火,避险品种获得支撑,黄金和日元大幅走强。美指受中美贸易问题影响而在低位震荡。继5月12日,四艘商船在阿联酋领海附近的阿曼湾、…...

    2024/5/4 23:54:56
  16. 【原油贵金属早评】贸易冲突导致需求低迷,油价弱势

    原标题:【原油贵金属早评】贸易冲突导致需求低迷,油价弱势近日虽然伊朗局势升温,中东地区几起油船被袭击事件影响,但油价并未走高,而是出于调整结构中。由于市场预期局势失控的可能性较低,而中美贸易问题导致的全球经济衰退风险更大,需求会持续低迷,因此油价调整压力较…...

    2024/5/8 20:48:49
  17. 氧生福地 玩美北湖(上)——为时光守候两千年

    原标题:氧生福地 玩美北湖(上)——为时光守候两千年一次说走就走的旅行,只有一张高铁票的距离~ 所以,湖南郴州,我来了~ 从广州南站出发,一个半小时就到达郴州西站了。在动车上,同时改票的南风兄和我居然被分到了一个车厢,所以一路非常愉快地聊了过来。 挺好,最起…...

    2024/5/7 9:26:26
  18. 氧生福地 玩美北湖(中)——永春梯田里的美与鲜

    原标题:氧生福地 玩美北湖(中)——永春梯田里的美与鲜一觉醒来,因为大家太爱“美”照,在柳毅山庄去寻找龙女而错过了早餐时间。近十点,向导坏坏还是带着饥肠辘辘的我们去吃郴州最富有盛名的“鱼头粉”。说这是“十二分推荐”,到郴州必吃的美食之一。 哇塞!那个味美香甜…...

    2024/5/4 23:54:56
  19. 氧生福地 玩美北湖(下)——奔跑吧骚年!

    原标题:氧生福地 玩美北湖(下)——奔跑吧骚年!让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 啊……啊……啊 两…...

    2024/5/8 19:33:07
  20. 扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!

    原标题:扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!扒开伪装医用面膜,翻六倍价格宰客!当行业里的某一品项火爆了,就会有很多商家蹭热度,装逼忽悠,最近火爆朋友圈的医用面膜,被沾上了污点,到底怎么回事呢? “比普通面膜安全、效果好!痘痘、痘印、敏感肌都能用…...

    2024/5/5 8:13:33
  21. 「发现」铁皮石斛仙草之神奇功效用于医用面膜

    原标题:「发现」铁皮石斛仙草之神奇功效用于医用面膜丽彦妆铁皮石斛医用面膜|石斛多糖无菌修护补水贴19大优势: 1、铁皮石斛:自唐宋以来,一直被列为皇室贡品,铁皮石斛生于海拔1600米的悬崖峭壁之上,繁殖力差,产量极低,所以古代仅供皇室、贵族享用 2、铁皮石斛自古民间…...

    2024/5/8 20:38:49
  22. 丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者

    原标题:丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者【公司简介】 广州华彬企业隶属香港华彬集团有限公司,专注美业21年,其旗下品牌: 「圣茵美」私密荷尔蒙抗衰,产后修复 「圣仪轩」私密荷尔蒙抗衰,产后修复 「花茵莳」私密荷尔蒙抗衰,产后修复 「丽彦妆」专注医学护…...

    2024/5/4 23:54:58
  23. 广州械字号面膜生产厂家OEM/ODM4项须知!

    原标题:广州械字号面膜生产厂家OEM/ODM4项须知!广州械字号面膜生产厂家OEM/ODM流程及注意事项解读: 械字号医用面膜,其实在我国并没有严格的定义,通常我们说的医美面膜指的应该是一种「医用敷料」,也就是说,医用面膜其实算作「医疗器械」的一种,又称「医用冷敷贴」。 …...

    2024/5/6 21:42:42
  24. 械字号医用眼膜缓解用眼过度到底有无作用?

    原标题:械字号医用眼膜缓解用眼过度到底有无作用?医用眼膜/械字号眼膜/医用冷敷眼贴 凝胶层为亲水高分子材料,含70%以上的水分。体表皮肤温度传导到本产品的凝胶层,热量被凝胶内水分子吸收,通过水分的蒸发带走大量的热量,可迅速地降低体表皮肤局部温度,减轻局部皮肤的灼…...

    2024/5/4 23:54:56
  25. 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...

    解析如下&#xff1a;1、长按电脑电源键直至关机&#xff0c;然后再按一次电源健重启电脑&#xff0c;按F8健进入安全模式2、安全模式下进入Windows系统桌面后&#xff0c;按住“winR”打开运行窗口&#xff0c;输入“services.msc”打开服务设置3、在服务界面&#xff0c;选中…...

    2022/11/19 21:17:18
  26. 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。

    %读入6幅图像&#xff08;每一幅图像的大小是564*564&#xff09; f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...

    2022/11/19 21:17:16
  27. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...

    win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面&#xff0c;在等待界面中我们需要等待操作结束才能关机&#xff0c;虽然这比较麻烦&#xff0c;但是对系统进行配置和升级…...

    2022/11/19 21:17:15
  28. 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...

    有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows&#xff0c;请勿关闭计算机”的提示&#xff0c;要过很久才能进入系统&#xff0c;有的用户甚至几个小时也无法进入&#xff0c;下面就教大家这个问题的解决方法。第一种方法&#xff1a;我们首先在左下角的“开始…...

    2022/11/19 21:17:14
  29. win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...

    置信有很多用户都跟小编一样遇到过这样的问题&#xff0c;电脑时发现开机屏幕显现“正在配置Windows Update&#xff0c;请勿关机”(如下图所示)&#xff0c;而且还需求等大约5分钟才干进入系统。这是怎样回事呢&#xff1f;一切都是正常操作的&#xff0c;为什么开时机呈现“正…...

    2022/11/19 21:17:13
  30. 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...

    Win7系统开机启动时总是出现“配置Windows请勿关机”的提示&#xff0c;没过几秒后电脑自动重启&#xff0c;每次开机都这样无法进入系统&#xff0c;此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一&#xff1a;开机按下F8&#xff0c;在出现的Windows高级启动选…...

    2022/11/19 21:17:12
  31. 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...

    有不少windows10系统用户反映说碰到这样一个情况&#xff0c;就是电脑提示正在准备windows请勿关闭计算机&#xff0c;碰到这样的问题该怎么解决呢&#xff0c;现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法&#xff1a;1、2、依次…...

    2022/11/19 21:17:11
  32. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...

    今天和大家分享一下win7系统重装了Win7旗舰版系统后&#xff0c;每次关机的时候桌面上都会显示一个“配置Windows Update的界面&#xff0c;提示请勿关闭计算机”&#xff0c;每次停留好几分钟才能正常关机&#xff0c;导致什么情况引起的呢&#xff1f;出现配置Windows Update…...

    2022/11/19 21:17:10
  33. 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...

    只能是等着&#xff0c;别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚&#xff0c;只能是考虑备份数据后重装系统了。解决来方案一&#xff1a;管理员运行cmd&#xff1a;net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...

    2022/11/19 21:17:09
  34. 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?

    原标题&#xff1a;电脑提示“配置Windows Update请勿关闭计算机”怎么办&#xff1f;win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢&#xff1f;一般的方…...

    2022/11/19 21:17:08
  35. 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...

    关机提示 windows7 正在配置windows 请勿关闭计算机 &#xff0c;然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;关机提示 windows7 正在配…...

    2022/11/19 21:17:05
  36. 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...

    钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...

    2022/11/19 21:17:05
  37. 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...

    前几天班里有位学生电脑(windows 7系统)出问题了&#xff0c;具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面&#xff0c;长时间没反应&#xff0c;无法进入系统。这个问题原来帮其他同学也解决过&#xff0c;网上搜了不少资料&#x…...

    2022/11/19 21:17:04
  38. 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...

    本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法&#xff0c;并在最后教给你1种保护系统安全的好方法&#xff0c;一起来看看&#xff01;电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中&#xff0c;添加了1个新功能在“磁…...

    2022/11/19 21:17:03
  39. 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...

    许多用户在长期不使用电脑的时候&#xff0c;开启电脑发现电脑显示&#xff1a;配置windows更新失败&#xff0c;正在还原更改&#xff0c;请勿关闭计算机。。.这要怎么办呢&#xff1f;下面小编就带着大家一起看看吧&#xff01;如果能够正常进入系统&#xff0c;建议您暂时移…...

    2022/11/19 21:17:02
  40. 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...

    配置windows update失败 还原更改 请勿关闭计算机&#xff0c;电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;配置windows update失败 还原更改 请勿关闭计算机&#x…...

    2022/11/19 21:17:01
  41. 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...

    不知道大家有没有遇到过这样的一个问题&#xff0c;就是我们的win7系统在关机的时候&#xff0c;总是喜欢显示“准备配置windows&#xff0c;请勿关机”这样的一个页面&#xff0c;没有什么大碍&#xff0c;但是如果一直等着的话就要两个小时甚至更久都关不了机&#xff0c;非常…...

    2022/11/19 21:17:00
  42. 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...

    当电脑出现正在准备配置windows请勿关闭计算机时&#xff0c;一般是您正对windows进行升级&#xff0c;但是这个要是长时间没有反应&#xff0c;我们不能再傻等下去了。可能是电脑出了别的问题了&#xff0c;来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...

    2022/11/19 21:16:59
  43. 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...

    我们使用电脑的过程中有时会遇到这种情况&#xff0c;当我们打开电脑之后&#xff0c;发现一直停留在一个界面&#xff1a;“配置Windows Update失败&#xff0c;还原更改请勿关闭计算机”&#xff0c;等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢&#xff0…...

    2022/11/19 21:16:58
  44. 如何在iPhone上关闭“请勿打扰”

    Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...

    2022/11/19 21:16:57