Kubeadm Note Update

准备


  • iptables

    cat <<EOF | sudo tee /etc/modules
    br_netfilter
    EOF
    sudo modprobe br_netfilter
    lsmod | grep br_netfilter
    
    
    cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
    net.bridge.bridge-nf-call-ip6tables = 1
    net.bridge.bridge-nf-call-iptables = 1
    EOF
    sudo sysctl --system
    
    
  • install container runtime

    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    sudo add-apt-repository \
    "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
    $(lsb_release -cs) \
    stable"
    sudo apt-get update
    apt-cache madison docker-ce
    sudo apt-get install docker-ce=17.12.1~ce-0~ubuntu
    sudo usermod -aG docker bigo
    
  • setup vpn and proxy

VPN and proxy

  • install kubeadm

    curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
    cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
    deb https://apt.kubernetes.io/ kubernetes-xenial main
    EOF
    sudo apt-get update
    sudo apt-get install -y kubelet kubeadm kubectl
    sudo apt-mark hold kubelet kubeadm kubectl
    
  • SWAPOFF

    sudo swapoff -a
    

安装


Related