본문 바로가기

Kubernetes/Management24

Velero와 restic - 'signal: killed' 1. 개요 - velero backup 실행 시 발생된 에러의 원인을 파악하고 조치한다. 2. 환경 - Velero 1.7 & restic 0.12.0 - MinIO 2021-11-09T03:21:45Z - Kubernetes 1.16.15 3. 문제점 - PostgreSQL Pod의 볼륨을 백업하는 도중에 'signal: killed'에러가 발생되었다. 상세 에러 메시지: od volume backup failed: error running restic backup, stderr=: signal: killed $ k logs -n velero velero-77bd5cd848-k54rk -f | grep 'level=error' … time="2021-12-16T06:24:38Z" level=error .. 2021. 12. 16.
Velero와 restic - 'Error checking repository for stale locks' 1. 개요 - velero backup 실행 시 발생된 에러의 원인을 파악하고 조치한다. 2. 환경 - Velero 1.7 & restic 0.12.0 - MinIO 2021-11-09T03:21:45Z - Kubernetes 1.16.15 3. 문제점 - velero Pod에서 생성되어 있는 restic repository를 주기적으로 점검하는 과정에서 에러가 발생된다. 상세 에러 메시지: Fatal: unable to open config file: Stat: The specified key does not exist. Is there a repository at the following location? s3:https://api.acp.kt.co.kr:9002/k8s-ext/restic/geums.. 2021. 12. 16.
Velero와 restic으로 K8s 백업/복구 in on-premise 1. 개요 - Velero (https://velero.io/)? ✓ Velero는 쿠버네티스 리소스와 퍼시스턴트 볼륨을 오프젝트 스토리지로 백업하는 툴이다. ✓ Velero는 로컬에서 수행하는 클라이언트 CLI(Command-line Interface)와 쿠버네티스 클러스터에서 운영되는 서버로 구성되어 있다. ✓ 클라우드 프로바이더가 제공하는 블럭 스토리지 스냅샷 기능을 이용하여 PV(Persistent Volume)에 대한 스냅샷을 생성하여 백업한다. ✓ On-premise 환경에서는 restic 오픈소스를 활용하여 PV를 오브젝트 스토리지로 백업한다. (Velero 1.5 부터) https://velero.io/blog/velero-1.5-for-and-by-community/ - Velero 활용.. 2021. 12. 8.
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.
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.
K8s - No more than 110 pods per node 1. Node limit - https://kubernetes.io/docs/setup/best-practices/cluster-large/ ✓ Considerations for large clusters A cluster is a set of nodes (physical or virtual machines) running Kubernetes agents, managed by the control plane. Kubernetes v1.22 supports clusters with up to 5000 nodes. More specifically, Kubernetes is designed to accommodate configurations that meet all of the following criter.. 2021. 10. 2.
K8s - Master node의 role이 '<none>' 일 때 1. Environments - Kubernetes 1.16.15 - Master node list : iap01, iap02, iap03 2. Problem - iap02 Master node(Control plane)의 Role이 master가 아닌 상태로 되어 있음 $ k get nodes iap01 iap02 iap03 NAME STATUS ROLES AGE VERSION iap01 Ready master 421d v1.16.15 iap02 Ready 6d21h v1.16.15 iap03 Ready master 420d v1.16.15 $ 3. Cause analysis - iap02 노드는 'node-role.kubernetes.io/master=' 라벨이 누락되어 있음 - 일시적으로 리소스가 .. 2021. 9. 30.
Istio - Virtual service config 2020.04.27 1. 참고 사이트 - Istio Traffic management (https://bcho.tistory.com/1367) - https://istio.io/docs/ops/best-practices/traffic-management/ - https://istio.io/docs/ops/best-practices/traffic-management/#split-virtual-services 2. 등록 고려 대상 - 대상 ✓ kubernetes-dashboard ✓ weave scope ✓ istio tool : kiali, jaeger, prometheus, grafana - 관련 서비스 $ k get svc grafana jaeger-query kiali prometheus -n ist.. 2021. 9. 23.
Istio 1.5 구성 2020.04.24 1. 개요 - Environments: Google Compute Engine, CentOS 7.7, Kubernetes 1.15 - Istio 1.5 has been tested with these Kubernetes releases: 1.14, 1.15, 1.16. - The Helm installation approach will be deprecated in the future. - 참고 사이트 https://istio.io/docs/setup/getting-started/ https://istio.io/docs/setup/install/istioctl/ #1 - 마이크로 서비스와 서비스 매쉬 (https://bcho.tistory.com/1293?category=731548).. 2021. 9. 23.