공부하고 기록하는, 경제학과 출신 개발자의 노트

학습일지/Service Mesh 10

Istio Memory 사용량 체크 - Knative Service 개수와 Sidecar Memory 관계 확인

Knative + Istio 조합한 Serverless Service에서 어느 날부터 Sidecar OOMKilled가 발생 배포한 knative service 개수는 큰 변화가 없고 k8s 클러스터 리소스도 충분히 여유가 있는데, istio sidecar가 Memory Limit을 초과해서 OOMkilled가 발생한다. 찾아보니 mesh에 포함된 workload 개수가 증가할수록 istio-proxy의 메모리 사용량이 증가하는 문제는 이미 잘 알려져 있었고, Sidecar CR을 사용해서 mesh가 관리할 workload를 namespace 또는 label selector 등을 사용해 제한하는 방식을 안내하고 있었다. https://medium.com/geekculture/watch-out-for-th..

istioCon 2022 - Egress Woes: Debugging External service Traffic in istio

Egress Woes: Debugging external service traffic in Istio https://youtu.be/opLiXzkseCI 발표자료: https://events.istio.io/istiocon-2022/slides/f5b-EgressWoes.pdf VirtualService, DestinationRule, ServiceEntry 등을 만들었다. 그럼 failed Communication을 확인하고 로그 보는 것도 필요함. debugging 관련 내용은 이미 많이 알려져 있으니 Few Common mistakes regarding External Service Traffic을 소개하려 함. 1. istioctl ps / istioctl analyze 써라 일반적으로 faile..

istioCon 2022 - Understanding New istio Telemetry API

Understanding the new Istio Telemetry API https://youtu.be/2L6Htij1zGE v1.11 버전에 추가된 new Telemetry API를 소개하는 내용 목적: mesh wide수준을 넘어 namespace-scope, workload groups / individual workload 단위의 behavior scope도 지원하기 위해. Telemetry Generation 으로 3 layer level을 지원함. istio service-level (service to service. low-level proxy metric 말고.) Tracespan generation / reporting (어디로 보낼지, 무엇을 보낼지) Access logging be..

istioCon 2021 - What envoy hears when Istio Speaks

https://www.youtube.com/watch?v=nNTpfXSCLKs Understading the Data plane - What envoy hears when istio speaks What is istiod how it interacts with k8s / envoy what is envoy / how envoy works high-level tour of 'what an istio-generated envoy config actually looks like' envoyproxy github을 보면 go-control-plane이 있음. envoyproxy를 관리하기 위한 표준 (canonical way). istiod is built on top of this (go-control-pla..

ServiceMeshCon 2020 - istio Service Mesh Simplified Beyond a Single Cluster

https://youtu.be/Ol5tNcaQZas istio 공식문서에 있는 MultiCluster 세팅 문서(https://istio.io/latest/docs/setup/install/multicluster/) 해설과 실습. 발표자: Lin Sun: Senior Technical Member in IBM / istio Project Contributor Sven Mawson: Principle Engineer on Google - working on ServiceMesh-related Technology 봄에 있었던 SerivceMeshCon 내용 요약 : istio 구조 단순화 istio-system에 있던 여러 컴포넌트 (Mixer, Galley, Citadel, injector) -> pilo..

KubeCon 2019 - Istio Multi-Cluster Service Mesh Patterns Explained

https://youtu.be/-zsThiLvYos Multi cluster를 사용하는 이유는 여러 가지. Performance Cost (Dev for cheaper) Failover / Redundancy (Availability) 비즈니스적인 이유로도 멀티 클러스터를 요청하는 고객이 많았음. Secure Workload 외부 공격 방지 (attack vector) auditing of public internet traffic 기존 On-prem과 cloud 간 통신 pod to pod, cluster to cluster 통신에서 데이터 Security 간단한 cluster configuration 예시 각 클러스터에는 worker node pool이 존재함. (VM / Bare Metal 무관) ..

istio 개념 정리 (3) - mTLS Security

Istio Security k8s의 여러 노드에 app을 배포할 경우 사용할 수 있는 유용한 기능. 일반적으로 https는 client server 통신 과정에서 주고받는 데이터를 암호화해서, man-in-the-middle attack 상황에서도 보안을 확보하는 것. k8s 클러스터 내에서 pod 간 통신이 이루어질 때에도 https 방식의 통신을 권장함. 보통 Brower -> Load balancer, Load balancer -> Istio ingress gateway 정도는 외부 접근 가능 영역이므로 https와 같은 암호화된 통신방식이 좋다는 건 안다. istio 없는 상황에서, 클러스터 내부에서 이루어지는 pod 간 통신에도 https를 적용하는 건 매우 귀찮은 작업. 보통은 k8s 클러스터..

Deview 2021 - istio/Envoy로 Multi-IDC L7 로드밸런서 만들기

Deview 2021: https://deview.kr/2021/sessions/502 당신의 대문을 책임집니다. Istio/Envoy로 Multi-IDC L7 로드밸런서 만들기 발표자 : 김동경 deview.kr 영상: https://tv.naver.com/v/23651554 Google에서 Multi-Cluster Application을 제공하는 플랫폼의 형태 여러 Region에 배포된 클러스터를 향해 트래픽이 전달됨 Fleet이라는 product - 물리적으로 나뉘어 있는 클러스터를 하나의 logical cluster처럼 만드는 기능 cluster API - 하나의 API로 여러 region에 클러스터를 배포할 수 있음. 멀티 클러스터로 트래픽을 분산하는 Load balancer에는 앞단에서 사용될..

istio 개념 정리 (2) - VirtualService / DestinationRule / Gateway

Canaries 애플리케이션의 사용량이 많을수록 유용한 기능. 사용자가 많은 애플리케이션에서 새로운 버전을 100% 바로 배포할 경우 발생할 수 있는 리스크를 줄일 수 있음. istio 없이 Kubernetes component로 Canary 적용하기 Single Service에 multiple pod를 연결하는 것이 가능함. deployment에 Label 붙이고, service에서 matchLabel로 pod 선택하는 게 가능하기 때문 k8s의 load balancing은 기본적으로 round robin. 따라서 위 그림과 같은 상황이라면, new version (staff-service:6)은 전체 트래픽의 33%를 점유하게 됨 대신, 이 방법은 traffic의 %를 변경하려면 그만큼 pod 비율을..

istio 개념 정리 (1) - Service Mesh와 istio

Istio Istio : Service Mesh의 한 종류. Service Meshcluster-based MicroService 프로젝트가 많아지면서, k8s와 같은 Orchestration tool만으로는 기능 요구사항을 맞추기 어려워지며 대두된 서비스.일종의 Extra Layer of Software that you deploy alongside k8s.Multiple Software Components가 서로 통신하고 연결되어 있는 Distributed Architecture라면 사용할 수 있음. 반드시 K8s 환경에서만 쓰이는 게 아님. 예시를 위한 도식. 각 Microservice에는 pod가 있고, 보통 하나의 pod에는 하나의 Container가 있다. 각각의 microservice는 Se..