系统相关
首页 > 系统相关> > Ubuntu22.04 安装 Kubernetes

Ubuntu22.04 安装 Kubernetes

作者:互联网

一、安装docker.io

sudo apt install docker.io

二、安装k8s

1、安装问题1

Err:2 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
  Could not connect to packages.cloud.google.com:443 (172.217.160.78), connection timed out

解决:

https://packages.cloud.google.com/apt/doc/apt-key.gpg

 

上面链接手动下载,命令为kubernetes-archive-keyring.gpg

/usr/share/keyrings/kubernetes-archive-keyring.gpg

2、安装源问题

Err:5 https://packages.cloud.google.com/apt kubernetes-xenial InRelease
  Could not connect to packages.cloud.google.com:443 (172.217.160.110), connection timed out
Fetched 99.8 kB in 39s (2,578 B/s)
Reading package lists... Done
W: Failed to fetch http://apt.kubernetes.io/dists/kubernetes-xenial/InRelease  Could not connect to packages.cloud.google.com:443 (172.217.160.110), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@ubuntu00:/etc/apt# ls

替换安装源

echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list

改为

echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] http://mirrors.ustc.edu.cn/kubernetes/apt kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list

 

3、安装

 sudo apt install kubeadm kubelet kubectl kubernetes-cni

 

标签:google,Kubernetes,kubernetes,com,Ubuntu22.04,apt,packages,安装,cloud
来源: https://www.cnblogs.com/zhuangzebo/p/16380513.html