zoukankan      html  css  js  c++  java
  • 二进制部署K8S集群(四)前置准备工作之docker环境安装

    0.架构图

    1.本节架构

    主机 IP 角色
    hdss-7-21.host.com 10.4.7.21 docker
    hdss-7-22.host.com 10.4.7.22 docker
    hdss-7-200.host.com 10.4.7.200 docker

    2.安装

    curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
    

    3.配置docker

    mkdir -p /etc/docker /data/docker
    cat > /etc/docker/daemon.json <<'eof'
    { 
      "graph": "/data/docker",
      "storage-driver": "overlay2",
      "insecure-registries": ["registry.access.redhat.com","quay.io","harbor.od.com"],
      "registry-mirrors": ["https://q2gr04ke.mirror.aliyuncs.com"], 
      "bip": "172.7.21.1/24",
      "exec-opts": ["native.cgroupdriver=systemd"],
      "live-restore": true
    }
    eof
    

    不同地方:"bip":"172.7.21.1/24",分别在各自主机配置为当前主机IP最后一位
    如:hdss-7-200.host.com配置为"bip":"172.7.200.1/24"
    hdss-7-21.host.com配置为"bip":"172.7.21.1/24"
    hdss-7-22.host.com配置为"bip":"172.7.22.1/24"

    4.启动验证docker

    systemctl start docker
    systemctl enable docker.service
    docker info 
    docker version
    docker ps -a
    
  • 相关阅读:
    Java——泛型、异常
    接口
    Classes
    Unit Tests
    Boundaries
    Error Handling
    Objects and Data Structures
    DB other operation
    Comments
    Functions
  • 原文地址:https://www.cnblogs.com/even160941/p/15040320.html
Copyright © 2011-2022 走看看