快速从零开始搭建服务⽹格(ubuntu+docker+k8s+istio)
因为之前搭建过centos上的服务⽹格,所以这次⽤ubuntu来快速搭建新的服务⽹格。只重点说与在centos上不同的部分。准备条件:三个ubuntu服务器
1 关闭防⽕墙
sudo ufw disable
出来提⽰
Firewall stopped and disabled on system startup
2 永久关闭swap
vi /etc/fstab
在swap分区这⾏前加 # 禁⽤掉,保存退出。重启
linux系统u盘安装centos和ubuntureboot
3 修改hosts
省略
4 安装docker18.09.7
sudo apt install docker.io
5 修改docker的cgroups
cat << EOF > /etc/docker/daemon.json
{
"exec-opts": ["updriver=systemd"]
linux怎样创建文件和文件夹}
delphi爬虫教程
{
"registy-mirrors":["alzgoonw.mirror.aliyuncs"]
}
EOF
然后
systemctl daemon-reload
systemctl restart docker
查看
docker info
6 安装k8s
splitboard
Your Kubernetes control-plane has initialized successfully!
To start using your cluster, you need to run the following as a regular user:
mkdir -p $HOME/.kube
sudo cp -i /etc/f $HOME/.kube/config
sudo chown$(id -u):$(id -g)$HOME/.kube/config
You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
kubernetes.io/docs/concepts/cluster-administration/addons/
odbcad32
Then you can join any number of worker nodes by running the following on each as root:
kubeadm join 192.168.2.110:6443 --token vr0kbo.skkph939nmaza1h5 \
--discovery-token-ca-cert-hash sha256:0db28c0ce72e85d48cae5c116644a117b9a176f87f6ebad2e7e95277575c53d7
7 其他流程和在centos上类似,这⾥不再赘述,其实两者差不多,主要就是⼀些命令格式上有些不同。

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。