0

Hi I'm trying to install kubectl following the native package install instructions on the official site, but I get the following error when I try to update apt package list before installing kubectl:

$ sudo apt update
...
Reading package lists... Done
W: GPG error: 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
E: The repository 'http://apt.kubernetes.io kubernetes-xenial InRelease' is not signed.

What could be the issue? ca-certificates and apt-transport-https are installed.

sctx
  • 13
  • 3

1 Answers1

0

Assuming you are using the current stable release 22.04, the step 2, Download the Google Cloud public signing key, is missing the gpg --dearmor command that is now needed for signing keys.

Replace step 2 with this command:

curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
  sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg

(shamelessly adapted from the Docker installation instructions)

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89