본문 바로가기

전체 글109

k8s - Kubernetes container 이해 및 Kubernetes unknown container 조치 1. 개요 - Docker engine의 역할을 이해한다. - Kubernetes 컨테이너 구조와 pause 컨테이너의 역할을 이해한다. - Kubernetes에서 관리하고 있지 않는 unknown 컨테이너의 존재를 인지하고 사라지게(kill) 한다. 2. Docker 이해 a. Docker engine (간략) - dockerd containerd를 활용하여 컨테이너를 생성하고 관리하는 서비스 - containerd image와 컨테이너 lifecycle을 관리하는 서비스, dockerd로부터 컨테이너 생성 요청을 받고, runc를 이용하여 컨테이너를 생성함. - containerd-shim shim은 containerd와 컨텐이너 runtime 사이에서 소통을 담당 runc가 컨테이너를 생성 후 컨테.. 2021. 11. 7.
MongoDB Sharded by Bitnami 1. 개요 - MongDB ✓ MongoDB는 크로스 플랫폼 도큐먼트 지향 데이터베이스 시스템이다. ✓ NoSQL 데이터베이스로 분류되는 MongoDB는 JSON과 같은 동적 스키마형 도큐먼트들을 선호한다. - MongoDB Replica sets vs Sharded cluster ✓ https://severalnines.com/database-blog/turning-mongodb-replica-set-sharded-cluster a. Replica sets ✓ Replica Sets are a great way to replicate MongoDB data across multiple servers and have the database automatically failover in case of se.. 2021. 11. 3.
MongoDB Community Kubernetes Operator 1. 개요 - MongDB ✓ MongoDB는 크로스 플랫폼 도큐먼트 지향 데이터베이스 시스템이다. ✓ NoSQL 데이터베이스로 분류되는 MongoDB는 JSON과 같은 동적 스키마형 도큐먼트들을 선호한다. - MongoDB Enterprise server vs Community server ✓ MongoDB Enterprise server는 아래와 같은 추가적인 기능을 제공한다. ▷ in-memory storage engine for high throughput and low latency ▷ advanced security features like LDAP and Kerberos access controls ▷ encryption for data at rest. - MongoDB Enterprise .. 2021. 11. 3.
MariaDB - replication 1. 개요 - MariaDB replication을 구성한다. ✓ Primary DB는 읽기/쓰기용으로, Secondary DB는 읽기용으로 사용해야 한다. ✓ Secondary DB는 0개부터 n개까지 구성할 수 있다. - MariaDB 기본 설치는 'MariaDB'를 참조한다. 2. Environments - helm chart bitnami/mariadb 9.7.0 - MariaDB 10.15.12 - Helm 3.3.1 - Kubernetes 1.16.15 3. MariaDB replication 구성 - helm chart용 parametes yaml 파일 생성 및 replication 구성 ✓ architecture, rootPassword, database, replicationPasswor.. 2021. 10. 29.
NFS-Client Provisioner - PV 마운트 위치 1. 개요 - Docker container가 PV(Pysical Volume)를 어떻게 연결해서 사용하는지 이해한다. - 본 환경은 Dynamic provisioning이 구성되어 있어 PVC(Pysical Volume Claim리소스를 생성하면 자동으로 PV가 생성된다. Storage : NFS Provisioner: quay.io/external_storage/nfs-client-provisioner v3.1.0-k8s1.11 구성 관련 문서: NFS-Client Provisioner - Docker container에 마운트된 PV는 '/var/lib/kubelet/pods' 디렉토리 이하에 위치한다. 2. Docker container 정보 확인 - NFS에 생성된 PV을 사용하는 예제 Pod에.. 2021. 10. 22.
Kubernetes 업그레이드 (1.16 ⇢1.20) 및 호환성 검토 1. 개요 - Kubernets를 업그레이드하기 위하여 영향이 높은 소프트웨어에 대한 호환성을 검토하였다. Dashboard, metrics-server, Kubeflow, istio, knative - Kubeflow 호환성 만을 고려했을 때 Kubernetes 1.19를 선택해야 하지만, 자사의 컨테이너 플랫폼(Flyingcube)의 업그레이드 전략을 고려해서 1.20을 진행하였다. (5.c 참조) - 업그레이드 진행 시점(21.10.20)의 최신 버전은 Kubernetes 1.22.2이다 2. Environments - Kubernetes 1.16.15 - Ubuntu 18.04.5, Docker 19.3.15 $ k get nodes -o wide NAME STATUS ROLES AGE VERSI.. 2021. 10. 19.
KFServing - Canary rollout 테스트 1. 개요 - Kubeflow KFServing에서 제공하는 Canary rollout 기능을 살펴보고자 한다. - Canary release 은 새로운 버전의 모델을 배포할 때, 소규모의 사용자들 에게만 먼저 제공함으로써 위험을 빠르게 감지할 수 있는 배포 전략이다. https://m.blog.naver.com/muchine98/220262491992 2. Envrironments - Kubernetes 1.16.15 - Kubeflow 1.2 - nfs-client-provisioner v3.1.0 (dynamic provisioning of Kubernetes Persistent Volumes) 참고 문서: NFS-Client Provisioner 3. Canary rollout 테스트 - PVC .. 2021. 10. 17.
KFServing - Deep dive 1. Kubeflow KFServing? - Kubeflow supports two model serving systems that allow multi-framework model serving: KFServing and Seldon Core. - KFServing enables serverless inferencing on Kubernetes ✓ Encapsulate the complexity of autoscaling, networking, health checking, and server configuration to bring cutting edge serving features like GPU autoscaling, scale to zero, and canary rollouts to your .. 2021. 10. 14.
Knative - Private docker registry certificates 설정 1. 테스트 환경 - knative v0.14.3, istio 1.3, Kubernetes 1.16.15, Harbor 2.1.3 - Kubeflow 1.2에 포함된 knative, istios를 사용함 2. Problem - Knative serving service 배포 시 에러("certificate signed by unknown authority")가 발생된다. 배포할 이미지는 "repo.acp.kt.co.kr/agp/helloworld-python:1.0"이다. 해당 이미지는 Self-signed certificate를 사용하는 Private docker registry(Harbor)에서 제공한다. $ vi knative-svc.yaml apiVersion: serving.knative.dev.. 2021. 10. 13.
Knative - SKS Mode (Proxy, Serve) 이해 1. 개요 - Knative Service request flow ✓ istio(Route)에서 Knative serving service를 요청하는 경우 a. 'scale to zero' 상태로 Activator가 호출된다. 이 모드가 Proxy이다. Activator는 Revision을 활성화(Pod 기동), 요청을 전달하고 SKS 모드를 Proxy에서 Serve로 변경한다. b. Revision이 활성화 된 경우로 Pod가 호출된다. 이 모드가 Serve이다. ✓ Activator 역할과 Request flow에 대한 상세한 설명은 Knative 이해 (3. Knative 이해)를 참조하기 바란다. - SKS(Serverless Knative Service)는 knative serving 리소스 중.. 2021. 10. 13.
Knative - Autoscaling #2 (테스트) 1. 테스트 환경 - knative serving v0.14.3, istio 1.3, Kubernetes 1.16.15 - Kubeflow 1.2에 포함된 knative serving, istio를 사용함 2. 사전 작업 a. concurrency 조회를 위한 로그 레벨 조정 - Knative service에 대한 autoscaling의 stable/panic concurrency metric을 얻기 위해서는 Autoscaler의 log level을 debug로 변경해야 한다. $ k edit cm config-logging -n knative-serving apiVersion: v1 data: loglevel.autoscaler: debug ... $ k rollout restart deployment.. 2021. 10. 12.
Knative - Autoscaling #1 (개념) 1. Knative Autoscaling? - https://knative.dev/docs/serving/autoscaling/ ✓ automatic scaling of replicas for an application to closely match incoming demand - Supported Autoscaler types ✓ Knative Serving supports the implementation of Knative Pod Autoscaler (KPA) and Kubernetes' Horizontal Pod Autoscaler (HPA). a. Knative Pod Autoscaler (KPA) Part of the Knative Serving core and enabled by defaul.. 2021. 10. 9.
istio - Access logs 설정 1. 개요 - istio ingress gateway의 access log를 stdout으로 출력하도록 설정 2. Environments - istio 1.3 - Kubernetes 1.16.15 3. 설정 - istio configmap의 accessLogFile 항목을 "/dev/stdout"으로 지정하고, istio ingressgateway를 재 기동 한다. $ k edit configmap istio -n istio-system apiVersion: v1 data: mesh: |- .. # Set accessLogFile to empty string to disable access log. accessLogFile: "/dev/stdout" # Set accessLogEncoding to JSO.. 2021. 10. 8.
Knative - Custom domain 변경 1. 개요 - Knative serving은 기본 도메인 값으로 'example.com'을 사용한다 URL 형식: {Knative service name}.{Kubernetes namespace}.example.com $ k get inferenceservices.serving.kubeflow.org -n yoosung-jeon NAME URL READY DEFAULT TRAFFIC CANARY TRAFFIC AGE bert-large http://bert-large.yoosung-jeon.example.com True 100 5d15h flowers-sample http://flowers-sample.yoosung-jeon.example.com True 90 10 4d16h $ - Ref: https:.. 2021. 10. 6.
Knative 이해 1. Knative? - Knative는 Kubernetes 환경에서 동작하는 서버리스 클라우드 네이티브 애플리케이션(Severless CNA)을 배포, 실행, 관리하기 위한 오픈소스 소프트웨어 - Public Cloud의 대표적인 Serverless Computing 기술은 AWS Lambda, Azure Functions, Google Cloud Functions 등 2. Knative 기능 a. Serving - https://bcho.tistory.com/1322 ✓ Stateless web service를 위한 serverless model ✓ 서빙은 무상태 웹서비스를 구축하기 위한 프레임웍으로 간단하게 웹서비스 컨테이너만 배포하면, 로드밸런서의 배치, 오토 스케일링, Scale to zero,.. 2021. 10. 5.