본문 바로가기
728x90
SMALL

전체 글111

K8s namespace가 deleted 안될 때 (feat. monitoring) kubectl delete namespace monitoring 명령을 실행했는데, namespace "monitoring" deleted 메시지가 출력되었음에도 불구하고 실제로 네임스페이스가 삭제되지 않을 때는, 종종 네임스페이스 내에서 제거되지 않은 리소스가 원인이 될 수 있습니다. 네임스페이스가 "Terminating" 상태로 남아 있는 경우가 대표적인 예입니다. 이를 해결하기 위한 방법은 다음과 같습니다. 1. 네임스페이스 강제 삭제 시도우선 네임스페이스를 강제 삭제할 수 있습니다.kubectl get namespace -o json | jq '.spec = {"finalizers":[]}' | kubectl replace --raw "/api/v1/namespaces//finalize" -f .. 2024. 10. 14.
Prometheus 및 Grafana 설치 (feat. 쿠베네티스) 1. Helm 설치먼저 Helm이 설치되어 있지 않다면 Helm을 설치합니다.curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash2. Helm 리포지토리 추가Prometheus와 Grafana 설치를 위한 Helm 차트 리포지토리를 추가합니다. helm repo add prometheus-community https://prometheus-community.github.io/helm-chartshelm repo add grafana https://grafana.github.io/helm-chartshelm repo update3. 네임스페이스 생성Prometheus와 Grafana가 배포될 monitoring 네.. 2024. 10. 7.
worker node에서 명령어 실행이 안될 때 해결방법 1. 글을 작성하게 된 계기 master node에서는 kubectl 에 대한 명렁어는 잘 실행되었으나worker node에서는 kubectl에 대한 명령어가 실행되지 않았던 문제였다.  2. 해결방법 sudo scp /etc/kubernetes/admin.conf 계정이름@정보:/home/계정이름/.kube/config 이유는 config 파일이 없었던 문제로 마스터노드에 있던 정보를worker node에 복사해주면 해결된다. 이때 권한 조정mkdir -p $HOME/.kubesudo chown $(id -u):$(id -g) $HOME/.kube/config 그리고 워커 노드에 환경 변수를 설정해준다. export KUBECONFIG=/home/계정이름/.kube/config 그럼 다음부터 명령어가 .. 2024. 10. 6.
쿠버네티스 GPU 연결 방법 (feat. gpu-operater) 1. 글을 작성하게 된 계기 Kubernetes(K8s) 환경에서 GPU 노드를 설정하고 연결하는 과정이 복잡하여, 이를 문서로 정리하려 합니다.가정:kubectl과 helm은 이미 설치되어 있음.GPU 서버에서 nvidia-smi 명령어가 정상적으로 작동함.더보기kubectl 설치 방법 최신 kubernetes(쿠버네티스) 설치 방법 (feat. Ubuntu)1. 글을 작성하게 된 계기 K8s (1.27.x )를 구축하고자 하는데 최근에 업데이트 된 내용에 대한 글이 없어 정리하고자 합니다.매일 까먹는 나를 위해서 그리고 어려움을 겪고 있는 다른 분들에게조jongsky.tistory.com helm 설치 방법curl -fsSL -o get_helm.sh https://raw.githubuserconte.. 2024. 10. 6.
Kubernetes kubeadm init 오류 및 해결 방법 1. 오류 상황Kubernetes 클러스터를 초기화하려고 kubeadm init 명령어를 실행했을 때 다음과 같은 오류가 발생했습니다: I1002 00:49:03.297201 5169 version.go:256] remote version is much newer: v1.31.0; falling back to: stable-1.27[init] Using Kubernetes version: v1.27.16[preflight] Running pre-flight checks [WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'error execution phase p.. 2024. 10. 2.
쿠버네티스(K8s) 명령어 정리 1. 글을 작성하게 된 계기 K8s를 자주 사용하게 되면서자주 사용하는 명령어를 정리하고자 한다. 2. 명령어 정리 기본 명령어kubectl get: 리소스를 조회하는 명령어예시:kubectl get pods: 클러스터 내의 모든 Pod 목록을 조회kubectl get nodes: 클러스터 내의 모든 Node 목록을 조회kubectl get services: 모든 서비스 목록을 조회kubectl describe: 특정 리소스에 대한 상세 정보를 확인예시:kubectl describe pod : 특정 Pod의 상세 정보를 확인kubectl describe node : 특정 Node의 상세 정보를 확인kubectl apply: 리소스를 생성하거나 업데이트할 때 사용 (YAML 파일 적용)예시:kubectl .. 2024. 10. 1.
728x90
LIST