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

Kubernetes Cluster installation Guide: docker-ce deployment

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Docker is the basic running environment of POD. Kubernetes uses dockerd as the runtime running engine by default. Before installing docker-ce, you must upgrade the kernel to the latest lts version. This is because in order for docker-ce to support the datastore type overlay2, docker-ce will be deployed as binaries on all worker nodes.

1. Preparation # Variable parameter setting # # DOCKER_INSTALL_PATH=/data/apps/k8s/dockerSOFTWARE=/root/softwareVERSION=18.09.6PACKAGE=docker-$ {VERSION} .tgzDownload _ URL= https://download.docker.com/linux/static/stable/x86_64/$PACKAGEMIRRORS1=https://docker.mirrors.ustc.edu.cnMIRRORS2=https://registry-mirrors.mo9.comUSER=docker2. Install docker prepare the docker-ce installation environment # 1.Uninstall the original docker installation packagesudo yum-y remove docker docker-client\ docker-client-latest docker-common docker-latest\ docker-latest-logrotate docker-selinux docker-engine-selinux docker-engine # 2 Setting firewall rules for docker/sbin/iptables-P FORWARD ACCEPTsudo sed-I'/ iptables-P FORWARD ACCEPT/d' / etc/rc.localecho-e "/ sbin/iptables-P FORWARD ACCEPT" > > / etc/rc.local### 3.Install docker-ce package with yum.sudo yum install-y yum-utils device-mapper-persistent-data lvm2 bridge-utils sudo yum-config-manager\-- add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo creates the installation directory related to docker installation and the dockers user group # 4.Install docker-ce package with source.# Check if the install directory exists and Check if the docker group exists .if [!-d $DOCKER_INSTALL_PATH/bin] Then mkdir-p $DOCKER_INSTALL_PATH/binfiegrep "^ $USER" / etc/group-if [$?-ne 0]; then groupadd $USERfi### 5.Download source package of docker-ceif [!-f "$SOFTWARE/docker-$ {VERSION} .tgz"] Then wget $DOWNLOAD_URL-P $SOFTWARE > > / dev/null 2 > & 1ficd $SOFTWARE & & tar-zxf $SOFTWARE/docker-$ {VERSION} .tgz-C. / sudo cp-fp $SOFTWARE/docker/* $DOCKER_INSTALL_PATH/bincd $DOCKER_INSTALL_PATH/bin/ln-sf docker,dockerd,containerd,containerd-shim,runc,ctr / usr/local/bin### 6.Create daemon.json file for docker# Create daemon.json file pathif [!-d "/ etc/docker"] Then mkdir / etc/docker/fidocker runs as root users by default. For security reasons and to facilitate other users to call docker api, you need to create a docker group user to create a docker profile 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