zoukankan      html  css  js  c++  java
  • k8s 之docker环境部署 (三)

    1.在node 21上安装docker

    [root@hdss7-21 ~]# curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
    [root@hdss7-21 ~]# mkdir -p /data/docker
    [root@hdss7-21 ~]# mkdir -p /etc/docker
    [root@hdss7-21 ~]# vim /etc/docker/daemon.json
    [root@hdss7-21 ~]# cat /etc/docker/daemon.json 
    {
      "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
    } 
    [root@hdss7-21 ~]# systemctl start docker
    [root@hdss7-21 ~]# systemctl enable docker
    Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
    [root@hdss7-21 ~]# docker info

     

     

    2.在node22上安装docker

     

    [root@hdss7-22 ~]# curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
    [root@hdss7-22 ~]# mkdir -p /etc/docker
    [root@hdss7-22 ~]# mkdir -p /data/docker
    [root@hdss7-22 ~]# vim /etc/docker/daemon.json
    [root@hdss7-22 ~]# cat /etc/docker/daemon.json 
    {
      "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.22.1/24",
      "exec-opts": ["native.cgroupdriver=systemd"],
      "live-restore": true
    }
    [root@hdss7-22 ~]# systemctl start docker
    [root@hdss7-22 ~]# systemctl enable docker

     

    3.在node200上安装docker

    [root@hdss7-200 ~]# curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
    root@hdss7-200 ~]# mkdir -p /etc/docker
    [root@hdss7-200 ~]# mkdir -p /data/docker
    [root@hdss7-200 ~]# vim /etc/docker/daemon.json
    [root@hdss7-200 ~]# 
    [root@hdss7-200 ~]# 
    [root@hdss7-200 ~]# 
    [root@hdss7-200 ~]# cat /etc/docker/daemon.json 
    {
      "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.200.1/24", # 定义k8s主机上k8s pod的ip地址网段 -- 改成node节点的ip
      "exec-opts": ["native.cgroupdriver=systemd"],
      "live-restore": true
    }
    [root@hdss7-200 ~]# systemctl start docker
    [root@hdss7-200 ~]# systemctl enable docker
    Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
    [root@hdss7-200 ~]# docker info
    

     原文章已同步语雀

    https://www.yuque.com/songyifei/bkxwl0/ygcgxt

  • 相关阅读:
    select poll使用
    linux下tomcat shutdown后 java进程依然存在
    poj 1222 EXTENDED LIGHTS OUT(高斯消元)
    poj 2377 Bad Cowtractors
    C#:总结页面传值几种方法
    从 Racket 入门函数式编程
    程序猿接私活经验总结,来自csdn论坛语录
    什么是SEO?SEO干嘛的?怎么做SEO?
    Java设计模式-观察者模式
    非常特别的一个动态规划新手教程
  • 原文地址:https://www.cnblogs.com/sseban/p/13054111.html
Copyright © 2011-2022 走看看