일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- 카프카
- fetch
- Push
- crossfit_geeks #크로스핏 #crossfit #당산크로스핏 #크로스핏긱스 #running #역도 #오운완 #크로스핏터 #Django가 고장날때까지
- k8s
- Python #PEP
- pull
- pyenv
- nodeport
- til #loguru #str #format
- merge
- 오블완
- 티스토리챌린지
- Trino
- Python3 #PEP
- Git
- Glossary #Python
- trino #hive #sync
- 타입 #type
- 쿠버네티스
- aws #modernization #eks #k8s
- Exception
- Today
- Total
Django가 고장날때까지
네트워크 스터디 5주차 본문
목차
1. 5주차 스터디를 잘 이해하기 위해 알아두면 좋은 사전 지식(
+지난 스터디에 이어서 중복되는 부분,
+절대 잊어서 안되는 기본 개념)
2. 스터디 시간에 배운 개념 정리
- 로드밸런서와 관련된 개념
- Metallb에 대한 개념 - L2 모드, BGP 모드
- iptable 모드가 아닌 IPVS 모드
3. 기타
- Gratuitous ARP
# 2. 서비스를 만들면 endpoint가 생긴다.
# 쿠버네티스 서비스에서는 ICMP 프로토콜을 지원하지 않는다.
https://kubernetes.io/docs/reference/networking/service-protocols/
서비스 노드 포트 타입에 이어서 이번에는 서비스의 로드 밸런서 타입을 살펴보고, 다음주에는 ingress에 대해 살펴본다.
대용량 트래픽에는
metalb - l2 모드 보다 하드웨어 L4 장비 쓰는 것이 더 낫다
# externalTrafficPolicy
api 공식문서에서도 나와있듯이 masquerading을 하지 않는다. (엔드포인트가 없는 노드로 트래픽이 잘못 전달되면, 드랍될 수 있다)
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/
LoadBalancer (LoadBalancer가 Nodeport를 포함한다.)
출처: https://kimalarm.tistory.com/102
[Study 5주차] 쿠버네티스 Service - LoadBalancer (MetalLB)
CoudNet@ 팀의 가시다님께서 리딩하시는 KANS Study (Kubernetes Advanced Networking Study) 5주차 스터디 내용 정리 이번 글에는 Service 타입 중 LoadBalancer 에 대해서 알아보겠습니다.그 중, 온프레미스 환경에
kimalarm.tistory.com
(추가)
+ 하드웨어 / 소프트웨어
Cloud Native Korea Community Day 2024
Cloud Native Korea Community Day 2024, Kubernetes와 CNCF 프로젝트를 아우르는 대규모 기술 행사가 여러분을 기다립니다!
kcd-korea.net
9월 24일날 해당 행사에 참가해서, 전 f5라는 회사를 처음들었고(처음에는 이게 f1 레이싱 관련 회사의 뭐 사례 발표를 하는줄 알았습니다.?) 이 내용은 ingress 스터디 할때 보충해서 채워놓도록 하겠습니다. 관련해서 밑의 부분을 조금 읽어보다가. 지난주에 배운 내용과는 다른 부분이 있어서 ㅠㅠ 하드웨어 장비에 꽂혀서 직접적인 관련이 있는 것으로 잘못이해했습니다.
Gateway API (API Gateway가 아니라 Gateway API)
https://gateway-api.sigs.k8s.io/
Introduction - Kubernetes Gateway API
Introduction Gateway API is an official Kubernetes project focused on L4 and L7 routing in Kubernetes. This project represents the next generation of Kubernetes Ingress, Load Balancing, and Service Mesh APIs. From the outset, it has been designed to be gen
gateway-api.sigs.k8s.io
https://clouddocs.f5.com/containers/latest/userguide/what-is.html#cis-configuration-overview
https://konghq.com/blog/engineering/gateway-api-vs-ingress
서비스(Service) Type - LoadBalancer
DNAT 2번 (1번 만 일어나는 경우랑 비교)
장비기반(F5 - L4 로드발란서 역할해준다)
소프트웨어 - Metalb가 그 역할을 해준다.
vpc-cni - nlb 로드발란서의 경우
온프레미스 환경에서 표준 프로토콜 (ARP랑 BGP)
========================================================================================
Metallb
하나하나 읽어본다음에 캡쳐를 진행햇습니다.
<클라우드상의 제약 소개 - Metallb>
MetalLB의
L2 모드에 대한 소개
Layer2에서 VRRP를 사용하지 않은 이유
하드웨어 장비도 저기서 비슷한 역할을 함
<5주차의 핵심>
라우팅 테이블이 올라왔고, 워커노드 1번과 통신
서비스1번과 서비스2번은 워커노드 1번이 리더 파드이고, 서비스 3번은 워커노드 3번이 리더 파드이다.
iptable 분석하는 것을 잘해주셔서 ㅜㅜ 우선 이것을 블로그에서 다시 읽어봣습니다!
externalTrafficPolicy
만약 MetalLB를 사용하게 될 경우: BGP 모드를 사용하는 것을 권장 -> 이때는 externalTrafficPolicy 를 사용하는 것을 적극 권장
Calico BGP의 경우 pod 대역을 broadcast함! 그것이 다름
부하분산도 되고, ecmp로 최적 경로로도 갈수 있음
기존의 MetalLB - Layer 2 모드 의 경우 리더파드의 노드에만 노출이 되엇을텐데, 부하분산되어서 각각의 노드에 부하 분산이됨
SNAT가 일어나지 않음
================================================================================
주의 externalIP는 서비스의 타입이 아니다. 헷갈리지 말기.
https://kubernetes.io/docs/reference/node/node-status/#addresses
Node Status
The status of a node in Kubernetes is a critical aspect of managing a Kubernetes cluster. In this article, we'll cover the basics of monitoring and maintaining node status to ensure a healthy and stable cluster. Node status fields A Node's status contains
kubernetes.io
cf) 조금 더 심화 내용
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#nodestatus-v1-core
Kubernetes API Reference Docs
API Overview Welcome to the Kubernetes API. You can use the Kubernetes API to read and write Kubernetes resource objects via a Kubernetes API endpoint. Resource Categories This is a high-level overview of the basic types of resources provide by the Kuberne
kubernetes.io
https://github.com/kubernetes/kubernetes/pull/79391
=======================================================================================
<IPVS 모드>
IPVS 모드 -> nftables (앞으로의 미래이겟군 - 1.31 (beta)이니)
모든 노드에 다있다.
dummy interface
이 주소의 원천은 core-dns(지금은 이름이 바뀜), kubernetes cluster ip
=========================================================================
기타
쿠버네티스 데이 때 Loxilb 세션이 있어서... 아직 영상으로 제공되고 잇진 않음
'Docker 및 k8s' 카테고리의 다른 글
네트워크 스터디 6주차 (0) | 2024.10.12 |
---|---|
24년 10월 8일 AWS Operation Modernization Day(오프라인) - 역삼 센터필드 (0) | 2024.10.09 |
네트워크 스터디 4주차 (2) | 2024.09.29 |
네트워크 스터디 3주차 (0) | 2024.09.15 |
네트워크 스터디 2주차 - Pause Container 와 k8s CNI(Flannel) (0) | 2024.09.01 |