W: https://apt.kubernetes.io/dists/kubernetes-xenial/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
hjw@walle:~/Downloads$ sudo apt-key list
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
/etc/apt/trusted.gpg
--------------------
pub rsa2048 2020-12-04 [SC] [expires: 2022-12-04]
59FE 0256 8272 69DC 8157 8F92 8B57 C5C2 836F 4BEB
uid [ unknown] gLinux Rapture Automatic Signing Key (//depot/google3/production/borg/cloud-rapture/keys/cloud-rapture-pubkeys/cloud-rapture-signing-key-2020-12-03-16_08_05.pub) <glinux-team@google.com>
sub rsa2048 2020-12-04 [E]
pub rsa2048 2021-03-01 [SC] [expires: 2023-03-02]
7F92 E05B 3109 3BEF 5A3C 2D38 FEEA 9169 307E A071
uid [ unknown] Rapture Automatic Signing Key (cloud-rapture-signing-key-2021-03-01-08_01_09.pub)
sub rsa2048 2021-03-01 [E]
/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg
------------------------------------------------------
pub rsa4096 2012-05-11 [SC]
8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092
uid [ unknown] Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>
/etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg
------------------------------------------------------
pub rsa4096 2018-09-17 [SC]
F6EC B376 2474 EDA9 D21B 7022 8719 20D1 991B C93C
uid [ unknown] Ubuntu Archive Automatic Signing Key (2018) <ftpmaster@ubuntu.com>
apt-key export 836F4BEB | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/k8s-gLinux.gpg
apt-key export 307EA071 | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/k8s.gpg
修改: etc/apt/sources.list.d/kubernetes.lis
deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/k8s.gpg] https://apt.kubernetes.io/ kubernetes-xenial main
删除:
/etc/apt/ trusted.gpg trusted.gpg~