I am trying to deploy kubernetes (kubeadm cluster) on ARM64 based Ubuntu 20.04 virtual machine.
I am getting the follwoing error when deploying kubeadm:
xxx@controller01:~$ sudo mkdir -p /etc/apt/keyrings/
xxx@controller01:~$ curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg
xxx@controller01:~$ echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main
xxx@controller01:~$ sudo apt-get update
Hit:1 http://ae.ports.ubuntu.com/ubuntu-ports focal InRelease
Hit:2 http://ae.ports.ubuntu.com/ubuntu-ports focal-updates InRelease
Hit:3 http://ae.ports.ubuntu.com/ubuntu-ports focal-backports InRelease
Hit:4 http://ae.ports.ubuntu.com/ubuntu-ports focal-security InRelease
Get:5 https://packages.cloud.google.com/apt kubernetes-xenial InRelease [8993 B]
Ign:6 https://packages.cloud.google.com/apt kubernetes-xenial/main arm64 Packages
Ign:6 https://packages.cloud.google.com/apt kubernetes-xenial/main arm64 Packages
Ign:6 https://packages.cloud.google.com/apt kubernetes-xenial/main arm64 Packages
Err:6 https://packages.cloud.google.com/apt kubernetes-xenial/main arm64 Packages
404 Not Found [IP: 142.250.181.110 443]
Fetched 8993 B in 6s (1622 B/s)
Reading package lists... Done
E: Failed to fetch https://packages.cloud.google.com/apt/dists/kubernetes-xenial/main/binary-arm64/by-hash/SHA256/51aebd1541ac7598ec1899940eeb94254bffdec2718eec413337389a0d58c794 404 Not Found [IP: 142.250.181.110 443]
E: Some index files failed to download. They have been ignored, or old ones used instead.
This error happens when I deploy kubernetes on ARM64 architecture CPU.
Any help please?
[[UPDATE]
]
I also tried suggestion of adding --dearmor or changing the
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-archive-keyring.gpg
to
sudo curl -fsSLo /etc/apt/keyrings/kubernetes-archive-keyring.gpg https://dl.k8s.io/apt/doc/apt-key.gpg
But I got the similar issue:
xxx@controller01:~$ sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl
Hit:1 http://ae.ports.ubuntu.com/ubuntu-ports focal InRelease
Get:2 http://ae.ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]
Get:3 http://ae.ports.ubuntu.com/ubuntu-ports focal-backports InRelease [108 kB]
Get:4 http://ae.ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB]
Get:5 http://ae.ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 Packages [1924 kB]
Get:6 http://ae.ports.ubuntu.com/ubuntu-ports focal-updates/main Translation-en [440 kB]
Get:7 http://ae.ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 c-n-f Metadata [16.5 kB]
Get:8 http://ae.ports.ubuntu.com/ubuntu-ports focal-updates/restricted Translation-en [273 kB]
Get:9 http://ae.ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 Packages [988 kB]
Get:10 http://ae.ports.ubuntu.com/ubuntu-ports focal-updates/universe Translation-en [254 kB]
Get:11 http://ae.ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 c-n-f Metadata [23.2 kB]
Get:12 http://ae.ports.ubuntu.com/ubuntu-ports focal-security/main arm64 Packages [1616 kB]
Get:13 http://ae.ports.ubuntu.com/ubuntu-ports focal-security/main Translation-en [358 kB]
Get:14 http://ae.ports.ubuntu.com/ubuntu-ports focal-security/main arm64 c-n-f Metadata [12.7 kB]
Get:15 http://ae.ports.ubuntu.com/ubuntu-ports focal-security/restricted Translation-en [256 kB]
Get:16 http://ae.ports.ubuntu.com/ubuntu-ports focal-security/universe arm64 Packages [759 kB]
Get:17 http://ae.ports.ubuntu.com/ubuntu-ports focal-security/universe Translation-en [173 kB]
Get:18 http://ae.ports.ubuntu.com/ubuntu-ports focal-security/universe arm64 c-n-f Metadata [16.4 kB]
Fetched 7446 kB in 4s (2078 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
ca-certificates is already the newest version (20230311ubuntu0.20.04.1).
ca-certificates set to manually installed.
curl is already the newest version (7.68.0-1ubuntu2.18).
curl set to manually installed.
The following NEW packages will be installed:
apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 122 not upgraded.
Need to get 1704 B of archives.
After this operation, 162 kB of additional disk space will be used.
Get:1 http://ae.ports.ubuntu.com/ubuntu-ports focal-updates/universe arm64 apt-transport-https all 2.0.9 [1704 B]
Fetched 1704 B in 0s (6307 B/s)
Selecting previously unselected package apt-transport-https.
(Reading database ... 73286 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_2.0.9_all.deb ...
Unpacking apt-transport-https (2.0.9) ...
Setting up apt-transport-https (2.0.9) ...
xxx@controller01:~$ sudo mkdir -p /etc/apt/keyrings/
xxx@controller01:~$ sudo curl -fsSLo /etc/apt/keyrings/kubernetes-archive-keyring.gpg https://dl.k8s.io/apt/doc/apt-key.gpg
xxx@controller01:~$ sudo echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main
xxx@controller01:~$ sudo apt-get update
Hit:1 http://ae.ports.ubuntu.com/ubuntu-ports focal InRelease
Hit:2 http://ae.ports.ubuntu.com/ubuntu-ports focal-updates InRelease
Hit:4 http://ae.ports.ubuntu.com/ubuntu-ports focal-backports InRelease
Hit:5 http://ae.ports.ubuntu.com/ubuntu-ports focal-security InRelease
Get:3 https://packages.cloud.google.com/apt kubernetes-xenial InRelease [8993 B]
Ign:6 https://packages.cloud.google.com/apt kubernetes-xenial/main arm64 Packages
Ign:6 https://packages.cloud.google.com/apt kubernetes-xenial/main arm64 Packages
Ign:6 https://packages.cloud.google.com/apt kubernetes-xenial/main arm64 Packages
Err:6 https://packages.cloud.google.com/apt kubernetes-xenial/main arm64 Packages
404 Not Found [IP: 142.250.181.110 443]
Fetched 8993 B in 2s (4594 B/s)
Reading package lists... Done
E: Failed to fetch https://packages.cloud.google.com/apt/dists/kubernetes-xenial/main/binary-arm64/by-hash/SHA256/51aebd1541ac7598ec1899940eeb94254bffdec2718eec413337389a0d58c794 404 Not Found [IP: 142.250.181.110 443]
E: Some index files failed to download. They have been ignored, or old ones used instead.