Metal LB(https://metallb.universe.tf/)는 On-Premise환경에서 로드밸런서를 제공해주는 오픈 소스다 :)
설치는 공식문서(https://metallb.universe.tf/installation)를 따라가 보기로한다.
1. 설치
MetalLB, bare metal load-balancer for Kubernetes
Installation Before starting with installation, make sure you meet all the requirements. In particular, you should pay attention to network addon compatibility. If you’re trying to run MetalLB on a cloud platform, you should also look at the cloud compat
metallb.universe.tf
먼저 Strict ARP를 활성화 해야한다.
kubectl edit configmap -n kube-system kube-proxy
내 경우 46번째 줄에 있었다. true로 수정하고 저장한다.
다음으로 Manifast를 설치한다. 현재 버전은 (0.13.7)
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.13.7/config/manifests/metallb-native.yaml
2. Layer 2 설정
설치했으니 설정을해야지..
https://metallb.universe.tf/configuration/의 Layer Configuration을 따라간다.
MetalLB, bare metal load-balancer for Kubernetes
Configuration MetalLB remains idle until configured. This is accomplished by creating and deploying various resources into the same namespace (metallb-system) MetalLB is deployed into. There are various examples of the configuration CRs in configsamples. A
metallb.universe.tf
입맛에 맞게 조금 수정했다. 다음 metallb_ipaddresspool.yaml로 저장 한후 kubectl apply -f metallb_ipaddresspool.yaml로 적용한다.
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: network-pool
namespace: metallb-system
spec:
addresses:
- 192.168.1.210-192.168.1.220
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: network-l2advertisement
namespace: metallb-system
spec:
ipAddressPools:
- network-pool
'Kubernetes' 카테고리의 다른 글
Istio 설치 (0) | 2023.02.20 |
---|---|
kubeadm 이용한 Ubuntu 에서 Kubernetes 설치하기 (0) | 2023.02.19 |
댓글0