zoukankan      html  css  js  c++  java
  • kubernetes标准化镜像构建

    一、网络配置

    1.1、yum 安装 net-tools

    cd /etc/sysconfig/network-script/ 
    vi ifcfg-eth0
    修改ONBOOT=yes,重启电脑

    1.2、安装net-tools

    yum install net-tools
    可以通过ifconfig查看网卡Ip配置

    二、安全相关

    2.1、关闭所有节点的SELinux

    vi /etc/selinux/config
    修改:SELINUX=disabled

    2.2 关闭防火墙

    systemctl stop firewalld
    systemctl disable firewalld swapoff -a

    2.3 永久性禁用swap

    vi /etc/fstab
     在行首加 #,注释该行,重启电脑

    三、安装Docker、官网

    https://docs.docker.com/install/linux/docker-ce/centos/

    yum install -y yum-utils  device-mapper-persistent-data  lvm2
     
    yum-config-manager  --add-repo  https://download.docker.com/linux/centos/docker-ce.repo
     
    yum install docker-ce docker-ce-cli containerd.io systemctl enable docker systemctl start docker
     
    docker -v

    配置阿里云加速

    sudo mkdir -p /etc/docker
    sudo tee /etc/docker/daemon.json <<-'EOF'
    {
      "registry-mirrors": ["https://byedr9vm.mirror.aliyuncs.com"]
    }
    EOF
    sudo systemctl daemon-reload
    sudo systemctl restart docker

    四、配置安装K8S

    4.1配置源

    cat>>/etc/yum.repos.d/kubrenetes.repo<<EOF
    [kubernetes]
    name=Kubernetes Repo
    baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
    gpgcheck=0
    gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg
    EOF
  • 相关阅读:
    python 数据类型
    python核心语法
    python 基础知识
    format 用法
    有关python 函数参数
    模拟,队列与堆栈
    字符编码
    [LeetCode] Set Matrix Zeroes
    [LeetCode] Rotate Image
    [LeetCode] Unique Paths
  • 原文地址:https://www.cnblogs.com/duyao/p/14246605.html
Copyright © 2011-2022 走看看