Score:0

do-release-upgrade fails because of Err https://packages.cloud.google.com/apt kubernetes-xenial InRelease

cn flag

I'm upgrading a Ubuntu 18.04 system. The command sudo do-release-upgrade fails with the error below. This system was a k8s master, but I did sudo apt purge kubeadm kubectl kubelet. Why is it still looking to upgrade k8s?

  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B53DC80D13EDEF05                        
Fetched 0 B in 0s (0 B/s)                                                                                                                  
Hit http://us.archive.ubuntu.com/ubuntu focal InRelease                                                                                    
Hit http://us.archive.ubuntu.com/ubuntu focal-updates InRelease                                                                            
Hit http://us.archive.ubuntu.com/ubuntu focal-backports InRelease                                                                          
Hit http://security.ubuntu.com/ubuntu focal-security InRelease                                                                             
Get:1 https://packages.cloud.google.com/apt kubernetes-xenial InRelease [8,993 B]                                                          
Hit https://apt.syncthing.net syncthing InRelease                                                                                          
Err https://packages.cloud.google.com/apt kubernetes-xenial InRelease                                                                      
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B53DC80D13EDEF05                        
Fetched 0 B in 0s (0 B/s)                                                                                                                  

Error during update 

A problem occurred during the update. This is usually some sort of 
network problem, please check your network connection and retry. 


Restoring original system state

Aborting
 
Score:3
cn flag

"Why is it still looking to upgrade k8s?"

Keep in mind how apt works: It gets packages from human-designated sources.

You removed the k8s packages, but have left the k8s source in place.

So, naturally, the system is looking for that source. And not finding it, so throwing an error to the human.

You fix the problem by deleting the source from your apt sources in /etc/apt/sources.list.d/. Alternately, you can also delete the source from your "Software & Updates" control panel -> Other Software -> Delete that source.

cn flag
Moving the three kubernetes.* files out of the /etc/apt/sources.list.d/ directory worked. The UI didn't work at all. The Remove button was always greyed out.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.