“使用阿里云镜像源快速搭建kubernetes(k8s) on debian10”的版本间的差异

来自linux中国网wiki
跳到导航 跳到搜索
第52行: 第52行:
 
  apt update &&  apt install -y apt-transport-https curl
 
  apt update &&  apt install -y apt-transport-https curl
  
curl -s https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | sudo apt-key add -
+
curl -s https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | apt-key add -
  
 
</pre>
 
</pre>

2021年8月6日 (五) 07:27的版本

思路2021

先在围墙外的机器 pull下来 然后 push到自己的hub.docker 最后在内网的机器再pull 下来 再tag一下

参考一下 然后写成脚本吧 ubuntu 使用阿里云镜像源快速搭建kubernetes 1.15.2集群

初始化时 指定aliyun mirrors 本来是指定 1。17。1版本的 我改了新的

  kubeadm init --apiserver-advertise-address=192.168.11.184 --image-repository registry.aliyuncs.com/google_containers --ignore-preflight-errors=all  --kubernetes-version v1.17.3 --service-cidr=10.96.0.0/16 --pod-network-cidr=10.244.0.0/16


Docker国内镜像的配置及使用 pass

info

cat >>/etc/hosts <<EOF
192.168.88.70  k8s-master
192.168.88.71  k8s-node1
192.168.88.72  k8s-node2
EOF


每台机器最少2GB内存,2CPUs。
集群中所有机器之间网络连接正常。
打开相应的端口,详见: [ Check required ports https://kubernetes.io/docs/setup/independent/install-kubeadm/#check-required-ports]


Kubernetes要求集群中所有机器具有不同的Mac地址、产品uuid、Hostname。可以使用如下命令查看:

# UUID
 cat /sys/class/dmi/id/product_uuid

# Mac地址
 ip link

Set Hostname and update hosts file

sudo hostnamectl set-hostname "k8s-master"
sudo hostnamectl set-hostname k8s-node1
sudo hostnamectl set-hostname k8s-node2

#Add the following lines in /etc/hosts file on all three systems,

时间

Linux时间同步的那些事儿#debian

安装Docker

https://blog.csdn.net/shykevin/article/details/98811021

安装kubelet,kubeadm,kubectl

添加apt key以及源(所有主机)
 apt update &&  apt install -y apt-transport-https curl

curl -s https://mirrors.aliyun.com/kubernetes/apt/doc/apt-key.gpg | apt-key add -