apt update from kubernetes cluster gives error Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)

3/19/2019

I deployed a kubernetes cluster and tried to test it with a simple bash pod as follows

kubectl run my-shell --rm -i --tty --image ubuntu -- bash

After I got the shell prompt I tried to do an apt-get update and got into following error

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

Appreciate if you can suggest what is wrong. I feel it is a DNS error or something like that . I have added nameserver as 8.8.8.8 inside the shell pod

-- user3364247
apt
containers
docker
kubernetes
ubuntu-16.04

1 Answer

5/25/2019

It appears that a proxy or firewall is blocking the connection.

Does the command work on the machine hosting Kubernetes?

If so, then Kubernetes is interfering with http://*.ubuntu.com/

If not, then it is an issue with your current network

-- JosephWorks
Source: StackOverflow