<p>I am running a <code>kind</code> cluster and deployed a ubuntu pod</p>
<blockquote>
<p>kubectl run ubunt-test --rm -i --tty --image ubuntu -- bash</p>
</blockquote>
<p>Then I tried to run <code>apt-get update</code> on the shell. The output is</p>
<pre><code>
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease                                       
Get:2 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Err:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Err:2 http://archive.ubuntu.com/ubuntu jammy InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Err:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Err:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Reading package lists... Done
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
E: The repository 'http://security.ubuntu.com/ubuntu jammy-security InRelease' is not signed.
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jammy-security/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
E: The repository 'http://archive.ubuntu.com/ubuntu jammy InRelease' is not signed.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://archive.ubuntu.com/ubuntu jammy-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://archive.ubuntu.com/ubuntu jammy-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

</code></pre>
<p>Now, the same update command works when I run ubuntu container using docker.</p>
<blockquote>
<p>docker run -it ubuntu bash</p>
</blockquote>
<p>Then I run <code>apt-get update</code> command and it is successful. The output is :</p>
<pre><code>Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]                                        
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]                              
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]
Get:4 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [767 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]                         
Get:8 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [616 kB]                    
Get:9 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [4642 B]              
Get:10 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [522 kB]             
Get:11 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]                            
Get:12 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]                       
Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [955 kB]                 
Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [573 kB]               
Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [8056 B]               
Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [918 kB]                     
Get:17 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [7275 B]               
Get:18 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [3175 B]                   
Fetched 24.7 MB in 33s (753 kB/s)                                                                      
Reading package lists... Done
</code></pre>
<p><code>apt-get update</code> command is working fine on both host machine and docker container. I don't know what is wrong with kind cluster pod. Any guess ?</p>

Shaad7
<p>Replaces the nameserver (DNS) used on the machine by the Google Public DNS service.</p>
<pre><code>sudo rm -f /etc/resolv.conf
sudo su
echo &quot;nameserver 8.8.8.8&quot; &gt; /etc/resolv.conf
</code></pre>
<p>Update default docker DNS by running <code>sudo vim /etc/default/docker</code> and uncomment the following line</p>
<pre><code>DOCKER_OPTS=&quot;--dns 8.8.8.8 --dns 8.8.4.4&quot;
</code></pre>
<p>Then restart docker with <code>sudo service docker restart</code></p>
