[Kubernetes]에러 모음집

2023. 8. 30. 08:51· Kubernetes
목차
  1. CASE 1
  2. 해결 방법
  3. CASE 2
  4. 해결 방법
728x90

kubernetes

CASE 1

Ubuntu OS 환경에서 Kubernetes 설치 시 다운 받은 Google  클라우드 퍼블릭 키이 정상 동작하지 않음.

apt-get install -y kubelet kubectl kubeadm 시, 아래와 같은 에러가 발생

Get:2 http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.24:/1.24.6/xUbuntu_20.04 InRelease [1656 B]
Hit:3 http://kr.archive.ubuntu.com/ubuntu jammy InRelease
Get:4 http://kr.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:1 https://packages.cloud.google.com/apt kubernetes-xenial InRelease [8993 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 ${PUBLIC_KEY}
Get:5 https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04 InRelease [1642 B]
Get:6 http://kr.archive.ubuntu.com/ubuntu jammy-backports InRelease [109 kB]
Get:7 http://kr.archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Reading package lists... Done
W: http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.24:/1.24.6/xUbuntu_20.04/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
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: ${PUBLIC_KEY}
E: The repository 'https://apt.kubernetes.io kubernetes-xenial InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

해결 방법

Kubernetes 설치 시 curl을 통해 키를 다운로드하는데, 다운로드는 gpg 명령으로 파이프 됨. PGP 키를 GPG 파일 형식으로 변환하기 위한 플래그를 함께 호출해서 사용해야 함. 그 역할을 해주는 flag가 --dearmor 이다.

$ curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/kubernetes-archive-keyring.gpg

CASE 2

kubelet 서비스가 기동되지 않는 경우. journalctl 명령어로 로그 확인하였을 때 아래와 같이 나오는 경우

Aug 30 09:57:00 k8s-master kubelet[53116]: E0830 09:57:00.463364   53116 run.go:74] "command failed" err="failed to load kubelet config file, path: /var/lib/kubelet/config.yaml, error: failed to load Kubelet
config file /var/lib/kubelet/config.yaml, error failed to read kubelet config file \"/var/lib/kubelet/config.yaml\", error: open /var/lib/kubelet/config.yaml: no such file or directory"

해결 방법

kubernetes 설치 후, kubeadmin init을 해주지 않아 초기 config.yaml이 생성되지 않았기 때문이다.

kubeadm init을 진행 하면 kubelet 정상 동작한다.

728x90
저작자표시 비영리 변경금지 (새창열림)

'Kubernetes' 카테고리의 다른 글

[Kubernetes] Ingress Sticky Session 적용하기  (0) 2024.10.15
[Kubernetes]구성형 쿠버네티스 설치 Ubuntu  (0) 2024.08.14
[kubernetes]Private Registy  (0) 2023.05.15
[kubernetes]Metallb 설치  (1) 2023.05.11
[kubernetes]Calico 설치  (0) 2023.04.25
  1. CASE 1
  2. 해결 방법
  3. CASE 2
  4. 해결 방법
'Kubernetes' 카테고리의 다른 글
  • [Kubernetes] Ingress Sticky Session 적용하기
  • [Kubernetes]구성형 쿠버네티스 설치 Ubuntu
  • [kubernetes]Private Registy
  • [kubernetes]Metallb 설치
JOTAN
JOTAN
기술 블로그
조탄 기술블로그기술 블로그
JOTAN
조탄 기술블로그
JOTAN
전체
오늘
어제
  • 목 록 N
    • Security
    • WEB
      • WebtoB
      • Apache
      • Nginx
    • WAS N
      • Tomcat
      • JEUS
      • Wildfly N
    • Observability
      • Fluentd
    • CI CD
    • DataBase
      • Redis
      • PostgreSQL
      • Victoria Metrics
    • Container Registry
      • Harbor
    • Docker
    • Kubernetes
    • Message Queue
      • Kafka
    • 개발
      • Spring Boot
      • Java
      • Shell Script
    • 기본지식
    • OS
      • Debian
      • Red Hat

블로그 메뉴

  • 홈

공지사항

  • 조'S IT 영역

인기 글

태그

  • Wildfly Session Clustering
  • 쿠버네티스 설치
  • nginx
  • 레디스 설정
  • Redis TEST
  • kubernetes dns
  • 레디스
  • Redis 기능 검증
  • redis
  • Kubernetes
  • apache
  • tomcat
  • redis 설정
  • SSL
  • 쿠버네티스 대시보드
  • fluentd
  • 설치
  • wildfly14
  • webtob
  • ssl vhosts
  • Redis Cache
  • hostaliases
  • apache vhosts
  • 인증서
  • kubernetes install
  • harbor
  • jboss session clustering
  • KAFKA
  • apache ssl 설정
  • 쿠버네티스

최근 댓글

최근 글

hELLO · Designed By 정상우.v4.2.2
JOTAN
[Kubernetes]에러 모음집
상단으로

티스토리툴바

단축키

내 블로그

내 블로그 - 관리자 홈 전환
Q
Q
새 글 쓰기
W
W

블로그 게시글

글 수정 (권한 있는 경우)
E
E
댓글 영역으로 이동
C
C

모든 영역

이 페이지의 URL 복사
S
S
맨 위로 이동
T
T
티스토리 홈 이동
H
H
단축키 안내
Shift + /
⇧ + /

* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.