我部署了一个kubernetes集群,并尝试使用一个简单的bash pod对其进行测试,如下所示
kubectl运行my-shell --rm -i --tty --image ubuntu-bash
在得到shell提示后,我尝试进行apt-get更新并遇到以下错误
root@my-shell-796b6f7d5b-274q9:/# apt-get update
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Err:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Err:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Err:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Reading package lists... Done
感谢您是否可以提出错误的建议。我觉得这是DNS错误或类似的错误。我已经在外壳Pod中将名称服务器添加为8.8.8.8
答案 0 :(得分:0)
似乎代理或防火墙阻止了连接。
该命令在托管Kubernetes的计算机上是否有效?
如果是这样,那么Kubernetes就会干扰http://*.ubuntu.com/
如果没有,则说明您当前的网络有问题