Kubernetes API 클라이언트 사용

최근 많은 팀원들이 서비스, 파이프라인 내에서 k8s 클러스터에서 정보를 얻어와야 하는 경우, 이미지 내에 kubectl을 설치하고 코드에서 kubectl 커맨드를 string으로 저장해 사용하거나(?) 심지어 token값을 string으로 박아 넣으려는(!) 시도를 하고 있음을 깨달았다. 이 부분을 바로 잡으며, 사람들에게 어떤 문의를 많이 받았는지를 바탕으로 정리해보고자 한다. kubectl을 이미지 내 설치한다(?) 사실 불가능한 방법은 아니다. 이미지 내 kubectl 바이너리를 설치해둔다. 서비스가 사용할 적절한 권한의 계정을 추가하고, kubeconfig를 생성한다. configmap으로 kubeconfig를 마운트한다. 이 경우, 코드 에서 시스템 커맨드를 실행하고 결과를 파싱해서 사용하게..

MLOps 2024.02.23 0

stern : 분산 처리 플랫폼 모니터링

Stern GitHub - stern/stern: ⎈ Multi pod and container log tailing for Kubernetes -- Friendly fork of https://github.com/wercker/ster ⎈ Multi pod and container log tailing for Kubernetes -- Friendly fork of https://github.com/wercker/stern - stern/stern github.com Stern은 여러 개의 Kubernetes 파드 및 파드 내의 여러 컨테이너를 추적할 수 있다. 각 결과는 빠른 디버깅을 위해 색으로 구분된다. 여러 개의 컴포넌트를 가진 서비스나, 분산 처리 플랫폼을 모니터링할 때 유용하게 사용할 수 있..

MLOps 2024.02.23 0

[k8s] `kubectl top`

`kubectl top` kubectl top pods -n spark kubectl top nodes 위 명령어로 한 눈에 파드별로 cpu, mem을 얼마나 사용하고 있는지 확인이 가능하며, 노드별로도 얼마나 자원이 사용중인지 확인이 가능하다. 클러스터에 경고나 장애가 나면, Grafana에 들어가지 않고 호다닥 터미널을켜 '누가 spark으로 자원을 얼마나 할당해 쓰고 있나'확인하는 데에 자주 사용하고 있다. Kubernetes Metrics API Resource metrics pipeline For Kubernetes, the Metrics API offers a basic set of metrics to support automatic scaling and similar use cases. T..

MLOps 2024.01.02 0

[programming in Scala] 01. 스칼라 환경 설정

# 0. jdk 설치 sudo apt install openjdk-11-jdk # 1. Scala 설치 (cs setup) curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-x86_64-pc-linux.gz | gzip -d > cs && chmod +x cs && ./cs setup # 2. IntelliJ Scala Plugin 설치 # 3. IntelliJ 에서, Settings > Build, Execution, Deployment > Build Tools > sbt > sbt project: sbt shell > Allow overring sbt version 을 uncheck. build.properties에 버..

프로그래밍 2023.08.06 0

Apache Cassandra

개요 아파치 카산드라(Apache Cassandra)는 오픈 소스로 개발된 분산형 NoSQL 데이터베이스입니다. 이는 파티션된 넓은 열(column) 저장 모델을 제공하며, 최종 일관성(eventual consistency)을 가진다. 아파치 카산드라는 원래 Facebook에서 설계되었으며, staged event-driven architecture (SEDA)를 사용하여 구현되었습니다. 이는 Amazon의 Dynamo 분산 저장 및 복제 기술과 Google의 Bigtable 데이터 및 저장 엔진 모델의 결합을 구현하기 위해 만들어졌습니다. Dynamo와 Bigtable은 모두 확장 가능하고 신뢰성이 높으며 고가용성을 갖춘 저장 시스템의 요구 사항을 충족시키기 위해 개발되었습니다. 그러나 각각은 개선할 ..

MLOps 2023.07.31 0

[Pinot] 오픈소스 기여 프로세스

1. 들어가기 전, 1.1 개발 환경 설정 [Pinot] Apache Pinot 개발 환경 Apache Pinot 운영이 아닌, 개발 및 프로젝트 기여를 목적으로 개발 환경을 설정한다. WSL 환경을 기준으로 한다. Running Pinot locally - Apache Pinot Docs Note that some installations of the JDK do not contain the JNI binding hhlab.tistory.com 1.2 모듈 및 아키텍쳐 pinot-common 프로젝트 전반의 공통 클래스들을 제공 (config, metrics, metadata, pql.parsers, request, response, fs, ...) pinot-trasnport Broker의 분산-수집..

MLOps 2023.03.05 0

[Pinot] Apache Pinot 개발 환경

Apache Pinot 운영이 아닌, 개발 및 프로젝트 기여를 목적으로 개발 환경을 설정한다. WSL 환경을 기준으로 한다. Running Pinot locally - Apache Pinot Docs Note that some installations of the JDK do not contain the JNI bindings that are necessary to run all tests, if you see any java.lang.UnsatisfiedLinkError while running tests, you may need to change your JDK. If using Homebrew, you may install AdoptOpenJDK docs.pinot.apache.org 1. Java..

MLOps 2023.03.05 0