查看pod节点

 

进入pod

apt-get install  vim 

mv /etc/apt/sources.list /etc/apt/sources.list.bak 
echo "deb http://mirrors.163.com/debian/ stretch main non-free contrib" >/etc/apt/sources.list &&     echo "deb http://mirrors.163.com/debian/ stretch-updates main non-free contrib" >>/etc/apt/sources.list &&     echo "deb http://mirrors.163.com/debian/ stretch-backports main non-free contrib" >>/etc/apt/sources.list &&     echo "deb-src http://mirrors.163.com/debian/ stretch main non-free contrib" >>/etc/apt/sources.list &&     echo "deb-src http://mirrors.163.com/debian/ stretch-updates main non-free contrib" >>/etc/apt/sources.list &&     echo "deb-src http://mirrors.163.com/debian/ stretch-backports main non-free contrib" >>/etc/apt/sources.list &&     echo "deb http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib" >>/etc/apt/sources.list &&     echo "deb-src http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib" >>/etc/apt/sources.list

由于我的环境是通过代理上网的 我添加了如下配置

echo export http_proxy=http://x.x.x.x:8080 >> /etc/profile

source /etc/profile 

接下来执行

apt-get update

执行  

apt-get  install  curl  

安装成功

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐