Err:1 https://pkgs.k8s.io/core:/stable:/v1.29/deb InRelease Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 34.107.204.206 443] Readin

I’m unable to do apt update after adding key and repo.

cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf
br_netfilter
EOF

cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF

sudo sysctl --system

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl

sudo mkdir -m 755 /etc/apt/keyrings

curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg

echo ‘deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /’ | sudo tee /etc/apt/sources.list.d/kubernetes.list

sudo apt-get update

root@controlplane:~# apt update
Ign:1 InRelease
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 34.107.204.206 443]
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
2 packages can be upgraded. Run ‘apt list --upgradable’ to see them.
W: Failed to fetch Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 34.107.204.206 443]
W: Some index files failed to download. They have been ignored, or old ones used instead.

I’m not sure what’s going on with your system here. There are a variety of reasons that would prevent the repo’s key from verifying; this “ask ubuntu” thread covers some of them. One thing to check is your system clock – if it’s off enough, it will prevent verification.