간만에 쿠버네티스 노드를 재 구축하려고 apt-get을 하니 아래와 같이 에러가 발생을 하였다.
root@master:/etc/apt# sudo apt-get update
Hit:2 http://kr.archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:4 http://kr.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://kr.archive.ubuntu.com/ubuntu bionic-backports InRelease
Get:1 https://packages.cloud.google.com/apt kubernetes-xenial InRelease [8,993 B]
Err:1 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 8,993 B in 2s (3,937 B/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. 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
W: Failed to fetch https://apt.kubernetes.io/dists/kubernetes-xenial/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B53DC80D13EDEF05
W: Some index files failed to download. They have been ignored, or old ones used instead.
이것저것 구글링 해보았지만 어쨋든 아래 방법으로 해결이 되었다.
root@master:/etc/apt# echo "deb [signed-by=/etc/apt/keyrings/kubernetes.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb [signed-by=/etc/apt/keyrings/kubernetes.gpg] https://apt.kubernetes.io/ kubernetes-xenial main
root@master:/etc/apt/keyrings# curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes.gpg
root@master:/etc/apt/keyrings# sudo apt-get update
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://kr.archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://kr.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://kr.archive.ubuntu.com/ubuntu bionic-backports InRelease
Get:1 https://packages.cloud.google.com/apt kubernetes-xenial InRelease [8,993 B]
Get:6 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 Packages [69.9 kB]
Fetched 78.9 kB in 3s (30.0 kB/s)
Reading package lists... Done
'Devops > Kubernetes' 카테고리의 다른 글
[Kubernetes] jenkins Kubernetes 에 설치 및 배포하기 (1) | 2023.12.31 |
---|---|
[Kubernetes] ingress 설정 (1) | 2023.12.26 |
[Kubernetes] 쿠버네티스 Service 개념 - ClusterIP, NodePort (0) | 2022.01.23 |
[Kubernetes] Controller - Replicaset (0) | 2022.01.22 |
[Kubernetes] 네임스페이스(Namespace) 살펴보기 (0) | 2022.01.17 |