
2、在虚拟机上设置环境变量
# 写入配置文件
echo "export http_proxy=http://10.0.0.1:7890" >> /etc/profile
echo "export https_proxy=http://10.0.0.1:7890" >> /etc/profile
# 生效
source /etc/profile
3、在虚拟机上进行测试,测试OK
wget https://github.com/kubernetes/kubernetes/archive/refs/tags/v1.32.2.tar.gz

补充说明:
# 关闭防火墙和selinux
systemctl disable --now firewalld
setenforce 0
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/sysconfig/selinux
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config