• 카테고리

    질문 & 답변
  • 세부 분야

    데브옵스 · 인프라

  • 해결 여부

    미해결

1.22 버전에 대해 vagrant up 수행간에 오류가 있어 문의드립니다.

23.08.05 16:21 작성 조회수 344

0

강의에서 가이드해주신 Lecturek8s_learning.kit-main\ch2\2.1\k8s-UpTo-10GiB 경로에서, 1.22 버전으로 새로 설치하는 과정에서 하기와 같이 오류가 발생하며 진행되지 않아서 어떤 조치를 수행하면 될지 문의드립니다.

w2-k8s-1.22: Complete!

w2-k8s-1.22: Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.

w2-k8s-1.22: Created symlink from /etc/systemd/system/multi-user.target.wants/kubelet.service to /usr/lib/systemd/system/kubelet.service.

==> w2-k8s-1.22: Running provisioner: shell...

w2-k8s-1.22: Running: C:/Users/khy33/AppData/Local/Temp/vagrant-shell20230805-19116-220pii.sh

w2-k8s-1.22: [preflight] Running pre-flight checks

w2-k8s-1.22: error execution phase preflight: couldn't validate the identity of the API Server: Get "https://192.168.1.10:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

w2-k8s-1.22: To see the stack trace of this error execute with --v=5 or higher

The SSH command responded with a non-zero exit status. Vagrant

assumes that this means the command failed. The output for this command

should be in the log above. Please read the output to determine what

went wrong.

답변 1

답변을 작성해보세요.

0

안녕하세요

어떠한 이유로 (현재 그걸 파악하기는 어렵습니다.) API 서버가 제대로 구동되어 올라오지 않은거 같습니다. 또는 어떠한 이유로 API 서버에 접근하기 어려운 것 같습니다.
(저 위의 단순히 콘솔 로그에는 무엇 때문인지 알 수 있는 정보가 없고, 또한 검색해 보시면 다양한 이슈에 다양한 해결책이 개별 호스트 마다 다른 점으로 발생하는 것을 확인하실 수 있으실 것 같습니다.)

이에 따라서 다시 배포하시거나, virtualbox image로 배포하시는게 좋으실 것 같습니다.

호스트 시스템 및 주변 환경의 여러 조건들을 이유로 배포가 되지 않는 것에 대한 이슈는 파악하기 모두가 개별적인 다양한 이유가 있기 때문에 파악하기 어렵습니다.

김홍현님의 프로필

김홍현

2023.08.06

다시 배포를 진행해봤으나 동일하게 w2-k8s-1.22 provisioner 부분에서 에러가 발생합니다.

추가로 말씀해주신 virtualbox image로 배포하는 방법은 어떻게 진행하는 방법일까요?

==> w2-k8s-1.22: Running provisioner: shell...

w2-k8s-1.22: Running: C:/Users/khy33/AppData/Local/Temp/vagrant-shell20230806-14052-78sp8y.sh

w2-k8s-1.22: [preflight] Running pre-flight checks

w2-k8s-1.22: error execution phase preflight: couldn't validate the identity of the API Server: Get "https://192.168.1.10:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

w2-k8s-1.22: To see the stack trace of this error execute with --v=5 or higher

The SSH command responded with a non-zero exit status. Vagrant

assumes that this means the command failed. The output for this command

should be in the log above. Please read the output to determine what

went wrong.

 

w2 VM머신에 들어가서 kubelet 상태를 확인하니 하기와 같네요.

[root@w2-k8s ~]# systemctl status kubelet

● kubelet.service - kubelet: The Kubernetes Node Agent

Loaded: loaded (/usr/lib/systemd/system/kubelet.service; enabled; vendor preset: disabled)

Drop-In: /usr/lib/systemd/system/kubelet.service.d

└─10-kubeadm.conf

Active: activating (auto-restart) (Result: exit-code) since Sun 2023-08-06 11:24:13 KST; 2s ago

Docs: https://kubernetes.io/docs/

Process: 4010 ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS (code=exited, status=1/FAILURE)

Main PID: 4010 (code=exited, status=1/FAILURE)

이미지를 직접 배포하는 것은 강의 2.1 하단에 다음의 내용을 참고하시면 좋으실 것 같습니다.

image