Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Install Kubernetes Cluster on CentOS (2) install Docker

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Catalogue summary

Setting up Kubernetes Cluster under CentOS (1) preset of Host Environment

Https://blog.51cto.com/huanghai/2455344

Install Kubernetes Cluster on CentOS (2) install Docker

Https://blog.51cto.com/huanghai/2455356

Use docker as a container to run (current industry mainstream and consensus)

1. Some necessary system tools # yum install-y yum-utils device-mapper-persistent-data lvm22. Add docker source # yum-config-manager-- add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

You can use the domestic image acceleration service. Refer to the official documentation of kubernetes, where the installation of Ali's image on CentOS is used as an explanation. (when taking this note, I tried the kubernetes of Huawei, Tencent and Tencent as well as the University of Electronic Science and Technology. It seems that the version of Ali is not as new as Ali's, so I will try Ali's for the time being).

3. Update and install Docker-CE online environment install # yum makecache fast# yum-y install docker-ce

The latest stable version is installed here according to the default configuration of the docker source file, but it is likely to fail the latest kubernetes authentication. Therefore, we use the following ways to select the installation version, especially in the reproduction environment.

1) find the version in the repository: # yum list docker-ce.x86_64-- showduplicates | sort-rLoading mirror speeds from cached hostfileLoaded plugins: branch, fastestmirror Langpacks...dockdr-ce.x86_64 18.09.9.ce-1.el7.centos docker-ce-stable...docker-ce.x86_64 17.03.1.ce-1.el7.centos docker-ce-stabledocker-ce.x86_64 17.03.0.ce-1.el7.centos docker-ce-stableAvailable Packages2) install the specified version of Docker-CE

VERSION, such as 18.09.9.ce.1-1.el7.centos above

# yum-y install docker-ce-18.09.9 docker-ce-cli-18.09.9 offline environment installation

Which ISO of Everthing can be used to install dependent libraries if it is an offline installation, but the version of docker installed is older, but it is not a big problem. Of course, you can also package and download the required rpm on a networked host, and then copy it to an offline environment for installation. The key process is as follows:

1) use the yum command to download the offline package # yum install docker-ce-18.09.9 docker-ce-cli-19.09.9-- downloadonly-- downloaddir=/home//2) and install it in an offline environment (install in the following order)

Install the basic dependency package

# rpm-ivh checkpolicy-2.5-8.el7.x86_64.rpm# rpm-ivh libcgroup-0.41-20.el7.x86_64.rpm# rpm-ivh libseccomp-2.3.1-3.el7.x86_64.rpm# rpm-ivh libsemanage-python-2.5-14.el7.x86_64.rpm# rpm-ivh audit-libs-python-2.8.4-4.el7.x86_64.rpm# rpm-ivh setools-libs-3.3.8-4 .el7.x86 _ 64.rpm# rpm-ivh python-IPy-0.75-6.el7.noarch.rpm# rpm-ivh policycoreutils-python-2.5-29.el7.x86_64.rpm

Install the package for docker-ce

# rpm-ivh container-selinux-2.99-1.el7_6.noarch.rpm# rpm-ivh containerd.io-1.2.6-3.3.el7.x86_64.rpm# rpm-ivh docker-ce-cli-18.09.7-3.el7.x86_64.rpm# rpm-ivh docker-ce-18.09.7-3.el7.x86_64.rpm

Description:

1. The version of the software package installed above may be different, and there is no need to struggle with it according to the actual situation at the time of installation.

two。 In the case of mounting the ISO of Eerything as the software source, you can directly use the yum command to install the software packages copied to the local container-selinux, containerd.io, docker-ce-cli, docker-ce in the above order.

Installation under ARM64 architecture

At present, there are more and more non-x8664 platforms, such as Huawei's Kunpeng server, and there are opportunities to show their talents in some places. Here, take the ARM64 architecture as an example (and then the non-x8664 architecture) to illustrate.

ARM64 bare metal

If you have a bare metal of ARM64, just install the corresponding version of CentOS and execute the above command.

ARM64 simulator

There is no ARM64 bare metal, you can use an emulator instead, anyway, mainly download the package. Thanks again for the benefits of Linux:), my current host is the distribution version of the installed Fedora. If you want to simulate ARM64, you only need to install the corresponding architecture package, as follows:

Sudo dnf install qemu-system-aarch74

This command can solve the package dependency problem on its own, and then when you use the Virtual Machine Manager program to create a virtual machine, there will be more aarch74 in the advanced option, that is, the architecture of ARM64. Select and click next, and then perform the subsequent installation steps to create a new amd64 schema. In addition, you can also use qemu-system-XXX to install virtual machines that simulate other architectures, which is a little exciting.

4. Docker other settings create directory / etc/docker# mkdir / etc/docker create daemon.json# cat > / etc/docker/daemon.json

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report