Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- 체스-TD
- 오라클
- 가볼만한곳
- 관광
- 심플한 게임
- OGGMA
- 게임기
- 독해연습
- java program
- Mobile Legends
- 이솝우화
- English Joke
- 임바 오토체스
- 여행
- MLBB
- 왕좌의게임
- 모바일레전드
- 골든게이트
- english study
- 영어 유머
- 영어유머
- 영어공부
- Python
- 오큘러스
- 게임
- 영어독해
- 롤
- oracle
- Chess-TD
- Imba Auto Chess
- Today
- Total
Almost-Native
kubeadm init 실행시 에러 : 'curl -sSL http://localhost:10248/healthz' failed with error 본문
Java 프로그램 개발, IT
kubeadm init 실행시 에러 : 'curl -sSL http://localhost:10248/healthz' failed with error
2022. 1. 6. 12:11쿠버네티스 설치하고 kubeadm init 커맨드 실행시 다음과 같은 에러를 만나는 경우가 있습니다.
[root@ol8k8s ~]# kubeadm init
[init] Using Kubernetes version: v1.23.1
...
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[kubelet-check] Initial timeout of 40s passed.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp [::1]:10248: connect: connection refused.
Unfortunately, an error has occurred:
timed out waiting for the condition
This error is likely caused by:
- The kubelet is not running
- The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)
If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
- 'systemctl status kubelet'
- 'journalctl -xeu kubelet'
Additionally, a control plane component may have crashed or exited when started by the container runtime.
To troubleshoot, list all containers using your preferred container runtimes CLI.
Here is one example how you may list all Kubernetes containers running in docker:
- 'docker ps -a | grep kube | grep -v pause'
Once you have found the failing container, you can inspect its logs with:
- 'docker logs CONTAINERID'
error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster
To see the stack trace of this error execute with --v=5 or higher
|
kubelet 이 제대로 동작하지 않고 있는 것 같은 에러메시지 입니다.
인터넷을 뒤지다 아래와 같은 해결책을 발견하게 되었습니다.
/etc/docker 디렉토리에 daemon.json 파일을 아래와 같이 만들어줍니다.
sudo mkdir /etc/docker
cat <<EOF | sudo tee /etc/docker/daemon.json
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2"
}
EOF
sudo systemctl enable docker
sudo systemctl daemon-reload
sudo systemctl restart docker
|
위 조치 방법은 쿠버네티스 공식 홈페이지에 나와 있는 내용 그대롭니다.
=> https://kubernetes.io/docs/setup/production-environment/container-runtimes/#docker
사실은, 원래 쿠버네티스 설치전에 Container runtime 을 먼저 설치해줘야 하는데(여기서는 docker 부분..)
이 부분을 빠뜨리고 진행한 경우 이런 에러상황을 만나게 되는 겁니다.
위와 같이 daemon.json 파일을 만들어주고나서, kubeadm reset 하고 init 해주니 정상적으로 잘 되네요~
> kubeadm reset
> kubeadm init
[root@ol8k8s docker]# kubeadm init
[init] Using Kubernetes version: v1.23.1
...
[kubelet-finalize] Updating "/etc/kubernetes/kubelet.conf" to point to a rotatable kubelet client certificate and key
[addons] Applied essential addon: CoreDNS
[addons] Applied essential addon: kube-proxy
Your Kubernetes control-plane has initialized successfully!
To start using your cluster, you need to run the following as a regular user:
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
Alternatively, if you are the root user, you can run:
export KUBECONFIG=/etc/kubernetes/admin.conf
You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
https://kubernetes.io/docs/concepts/cluster-administration/addons/
Then you can join any number of worker nodes by running the following on each as root:
kubeadm join 192.168.1.161:6443 --token m1hgjw.x29p8uzvm56khmw3 \
--discovery-token-ca-cert-hash sha256:192014ce0d76b9ba32d4e6e42a1322f82e060fa689bf2486e606f660fd013ec5
|
'Java 프로그램 개발, IT' 카테고리의 다른 글
Oracle Database 버전별 Windows OS 설치가능 버전 정리 (0) | 2022.05.06 |
---|---|
kubeadm join 실행시 에러 : CGROUPS_PIDS: missing (0) | 2022.01.07 |
Outlook 보낸사람 메일주소 사칭한 스팸, 해킹메일 (Paypal, 아마존 등) (0) | 2021.12.19 |
오라클 MGA (Managed Global Area) 메모리 영역 (0) | 2021.12.16 |
초간단 DB접속 JDBC 테스트 샘플 프로그램 (Oracle Database) (0) | 2021.09.29 |
Comments