Build K8S cluster 1: Build a Kubernetes cluster based on Kubeadm
Kubernetes manages Docker clusters, and the installation steps are cumbersome. Based on the information I found on the Internet and my own experiments, this article explains in detail the steps to install K8S on Ubuntu 18.04.
# 以下以root用户来运行
apt-get update && apt-get install -y apt-transport-https
curl https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | apt-key add -
# 制定Kubernetes镜像的地址,在阿里云上
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb https://mirrors.aliyun.com/kubernetes/apt/ kubernetes-xenial main
EOF
apt-get update
# 安装Kubernetes
apt-get install -y kubelet kubeadm kubectl