Ubuntu20.04 下搭建Kubernetes集群--k8s部署

一台全新的装了 ubuntu 16.04 系统的云主机,安装 kubernetes v1.17.3 的过程。

该方法基于 kubeadm 安装。系统配置不能太低,内存 2G+, CPU2+。

  1. 关闭 swap
sudo sed -i '/ swap / s/^/#/' /etc/fstab

sudo swapoff -a

2. 更新国内(阿里)的镜像源

# 完备份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
# 更新 sources.list
sudo tee /etc/apt/sources.list <<-'EOF'
deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main

deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe

你可能感兴趣的:(Project,Manager,Go,Cloud,computing,BigData,python,AI,BlockChain)