zoukankan      html  css  js  c++  java
  • 6

    Prerequisites:

    Node OS IP
    k8s-master CentOS7 192.168.137.161
    k8s-node1 CentOS7 192.168.137.162

    Install Docker on CentOS:

    1. Setup software package, by running below command:
      yum install -y yum-utils device-mapper-persistent-data lvm2
    2. Configuring stable repository, you can choose official site but will be a little bit slow, or you can go with domestic site like Aliyun.
      # Choose only one from below repository
      # Official repository
      yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
      
      # Aliyun
      yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
      
      # tsinghua University
      yum-config-manager --add-repo https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo
    3. Install Docker CE edition by running below command
      yum install docker-ce docker-ce-cli containerd.io -y        # Install latest version as default
      systemctl start docker && systemctl enable docker           # start docker and set as auto launch while start system

       After docker installed and start, you can running some simple docker command to check if Docker is working as expected:

    4. Get bash completion installed by running below command
      yum -y install bash-completion
      source /etc/profile.d/bash_completion.sh

    5. Configure image registry, by create file /etc/docker/daemon.json and set registry as below:
      cat <<EOF > /etc/docker/daemon.json
      {
        "registry-mirrors": [
          "https://registry.docker-cn.com",
          "http://hub-mirror.c.163.com",
          "https://docker.mirrors.ustc.edu.cn"
        ]
      }
    6. Retart docker to reload above config by execute command below
      systemctl daemon-reload
      systemctl restart docker
    7. All good for Docker installation now, it's UP AND RUNNING. Remeber to apply the same installation for k8s-node1.
      Next we will install kubernetes via kubeadm.
  • 相关阅读:
    qt程序编译错误:could not exec ‘/usr/lib/x86_64-linux-gnu/qt4/bin/qmake’
    安装 yaml-cpp,MP4V2
    安装cmake 和 opencv 4.0.0
    windows系统,boost编译安装
    messageQ 消息队列
    fflush 和 fsync 的区别
    开源一个 PDF 小工具集软件【使用 PDFium 库实现】
    封装 libjpeg 库
    纯 C++ 代码实现的 INI 文件读写类
    C++11 —— 使用 thread 实现线程池
  • 原文地址:https://www.cnblogs.com/waynewei/p/14864348.html
Copyright © 2011-2022 走看看