Add bgp routing with metallb

This commit is contained in:
Sambo Chea 2021-12-22 18:12:46 +07:00
parent e0f46beaab
commit 4950895bce
Signed by: sombochea
GPG Key ID: 3C7CF22A05D95490
2 changed files with 58 additions and 0 deletions

16
metallb/bgpconfig.yaml Normal file
View File

@ -0,0 +1,16 @@
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
peers:
- peer-address: 192.168.0.225
peer-asn: 65432
my-asn: 65433
address-pools:
- name: default
protocol: bgp
addresses:
- 10.25.0.10-10.25.3.250

42
metallb/nginx-test.yaml Normal file
View File

@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-nginx
namespace: default
spec:
selector:
matchLabels:
run: test-nginx
replicas: 3
template:
metadata:
labels:
run: test-nginx
spec:
containers:
- name: test-nginx
image: nginx
ports:
- containerPort: 80
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 100m
memory: 100Mi
---
apiVersion: v1
kind: Service
metadata:
name: test-nginx
namespace: default
labels:
run: test-nginx
spec:
type: LoadBalancer
ports:
- port: 80
protocol: TCP
selector:
run: test-nginx