• K8S集群二进制搭建2——docker搭建


    本次采用二进制安装,若使用yum安装也是同样效果:

    [root@k8s-master ~]# wget https://download.docker.com/linux/static/stable/x86_64/docker-19.03.9.tgz

    [root@k8s-master opt]# tar zxvf docker-19.03.9.tgz 

    [root@k8s-master docker]# mv /opt/docker/* /usr/bin/

    使用systemd管理docker:

    [root@k8s-master opt]# vim /usr/lib/systemd/system/docker.service

    [Unit]
    Description=Docker Application Container Engine
    Documentation=https://docs.docker.com
    After=network-online.target firewalld.service
    Wants=network-online.target
    [Service]
    Type=notify
    ExecStart=/usr/bin/dockerd
    ExecReload=/bin/kill -s HUP $MAINPID
    LimitNOFILE=infinity
    LimitNPROC=infinity
    LimitCORE=infinity
    TimeoutStartSec=0
    Delegate=yes
    KillMode=process
    Restart=on-failure
    StartLimitBurst=3
    StartLimitInterval=60s
    [Install]
    WantedBy=multi-user.target

    配置docker,registry-mirrors 阿里云镜像加速器:

    {
    "registry-mirrors": ["https://b9pmyelo.mirror.aliyuncs.com"]
    }

     启动,设置开机自启:

    [root@k8s-master opt]# systemctl daemon-reload
    [root@k8s-master opt]# systemctl start docker.service
    [root@k8s-master opt]# systemctl enable docker.service

    [root@k8s-master opt]# mkdir /etc/docker

    注:在另外俩个节点中做相同操作

  • 相关阅读:
    剑指Offer--反转链表
    剑指Offer--链表中倒数第k个结点
    面向对象的六原则一法则
    常见错误汇总
    记人生第一次CF体验
    Game of Credit Cards
    Shell Game (模拟)
    数列分块入门 1 LibreOJ
    范德蒙恒等式
    C. Vasya and String (尺取法)
  • 原文地址:https://www.cnblogs.com/liyuanshu/p/13364794.html
Copyright © 2020-2023  润新知