Infrastructure/Docker & Kubernetes

    에러, kubernetes uninstall error "device or resource busy"

    에러, kubernetes uninstall error "device or resource busy"

    문제 쿠버네티스 reset도 안되고, pod를 확인한다던가 아무것도 안되는 현상이 발생했습니다... 그래서 제거하려 했는데도 busy라 안된다 하네요 해결 방법 다음 명령을 시행하고 하니 가능했습니다 umount $(df -HT | grep '/var/lib/kubelet/pods' | awk '{print $7}')

    에러, The connection to the server 0.0.0.0:8443 was refused - did you specify the right host or port?

    에러, The connection to the server 0.0.0.0:8443 was refused - did you specify the right host or port?

    문제 kubectl get pods를 할 경우 다음 에러가 발생했습니다. The connection to the server 175.197.4.226:8443 was refused - did you specify the right host or port? 해결방법 우선 쿠버네티스 포트들을 한번 확인해 보겠습니다. 8443번이라... 없는데 ? 찾아보니 기본적으로 8443 포트는 톰캣에서 사용을 하는 부류가 많고 minikube 에서도 사용하는 것 같네요. kubectl로는 아예 접근이 안되고 minicube를 이용해 확인해봤는데 실행되어 있고 apiserver가 꺼져있네요 ..? minikube status 아직까지 지식이 부족한지라 kubectl과 minicube 두개가 같이 켜져있어도 되는지 모르겠지..

    에러, The connection to the server localhost:8080 was refused - did you specify the right host or port?

    에러, The connection to the server localhost:8080 was refused - did you specify the right host or port?

    문제 다음과 같이 에러가 발생합니다. The connection to the server localhost:8080 was refused - did you specify the right host or port? 위 에러는 이전에도 나왔는데, 분명히 설정해줬던 것 같은데 또 나오네요 ? 계속해서? 일시적이 아닌 반영구적인 해결법이 필요할것 같은데... 우선 해결 방법은 다음과 같습니다. 해결방법 (아래 글을 보세요 추가 작성 했습니다) kubeadm init 을 할 경우 아래 명령을 적용시킬 수 있도록 나오는데요 이 명령들을 적용시켜 주면 해결되겠습니다. mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo c..

    에러, kubernetes cni flannel CrashLoopBackOff

    에러, kubernetes cni flannel CrashLoopBackOff

    문제 쿠버네티스에서 flannel cni를 설치했는데 pod가 생성되지 않는 것을 확인했습니다. https://github.com/flannel-io/flannel#deploying-flannel-manually kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml 무엇 때문에 문제인지 파악하려고 다음 명령어를 사용했습니다. kubectl get pods --all-namespaces -o wide 이런... flannel 0/1 이고, CrashLoopBackOff 에러가 발생했습니다. 해결방법 문제는 이러했습니다. 원래 flannel로 설치하는 것이 아닌, wea..

    에러, kubernetes bash-completion not working 작동하지 않는 오류

    문제 bash-completion을 활성화 시키기 위해 쿠버네티스 문서에 있는 그대로 진행는데, 작동하지 않았습니다. kubectl completion bash sudo apt-get install -y bash-completion source /usr/share/bash-completion/bash_completion echo 'source

    에러, kubeadm join ... preflight Running pre-flight checks 에서 멈춤(stop)

    에러, kubeadm join ... preflight Running pre-flight checks 에서 멈춤(stop)

    문제 kubeadm join ... 토큰을 사용했는데 preflight Running pre-flight checks에서 더이상 진행이 되지 않았습니다. 해결방법 마스터 노드의 방화벽에 가로막혀 체크가 되지 않는 것이었습니다. master control-plane이 위치한 서버에서 방화벽은 해제하면 됩니다. sudo ufw diable 또는 다음 쿠버네티스 문서를 참조하시면 될 것 같습니다. https://kubernetes.io/docs/reference/ports-and-protocols/ Ports and Protocols When running Kubernetes in an environment with strict network boundaries, such as on-premises datac..

    에러, kubernetes - kudeadm init error "http://localhost:10248/healthz"

    에러, kubernetes - kudeadm init error "http://localhost:10248/healthz"

    문제 The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get "http://localhost:10248/healthz": dial tcp 127.0.0.1:10248: connect: connection refused. # 다음 명령을 사용해서 설치도중 에러 확인 journalctl -xeu kubelet kubernetes 설치를 위해 kudeadm을 이용해 init을 할 경우 에러가 발생합니다. 위 에러는kudeadm 1.22 버전 미만에서는 에러가 발생하지 않을 것입니다. kudeadm 1.22 버전 이상에서 새로운 추가사항이 생겼습니다. docker가 cgroup으로 관리하게 되어 있는데, 이를..

    에러, Docker Container systemctl Error

    에러, Docker Container systemctl Error

    문제 도커 컨테이너에서 ssh를 자동 재시작 되도록 하기 위해 Systemctl 명령을 작성하니 에러가 발생합니다. System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down 과연 문제가 무엇일까요? 도커는 기본적으로 컨테이너에 systemctl을 사용하지 못하도록 되어 있습니다. 권한을 제한하기 위해서 입니다. 해결 방법 만약 그래도 사용하고 싶다면 docker container 생성 시 다음과 같이 privileged=true 옵션과 /sbin/init를 두 가지 모두 주어야 컨테이너에서 systemctl 권한을 가질 수 있다는 것을 확인했습니다. s..