add demo of metallb working
This commit is contained in:
parent
7109768862
commit
b4d6a9f46d
3 changed files with 48 additions and 0 deletions
8
kubernetes/ip-address-pool.yaml
Normal file
8
kubernetes/ip-address-pool.yaml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
apiVersion: metallb.io/v1beta1
|
||||||
|
kind: IPAddressPool
|
||||||
|
metadata:
|
||||||
|
name: main
|
||||||
|
namespace: metallb-system
|
||||||
|
spec:
|
||||||
|
addresses:
|
||||||
|
- 192.168.40.100-192.168.40.253
|
5
kubernetes/l2-advertisement.yaml
Normal file
5
kubernetes/l2-advertisement.yaml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
apiVersion: metallb.io/v1beta1
|
||||||
|
kind: L2Advertisement
|
||||||
|
metadata:
|
||||||
|
name: main
|
||||||
|
namespace: metallb-system
|
35
kubernetes/loadbalancer-test.yaml
Normal file
35
kubernetes/loadbalancer-test.yaml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: loadbalancer-test
|
||||||
|
# annotations:
|
||||||
|
# metallb.universe.tf/loadBalancerIPs: 192.168.1.100
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 8000
|
||||||
|
selector:
|
||||||
|
app: loadbalancer-test
|
||||||
|
type: LoadBalancer
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: loadbalancer-test
|
||||||
|
labels:
|
||||||
|
app: loadbalancer-test
|
||||||
|
spec:
|
||||||
|
replicas: 3
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: loadbalancer-test
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: loadbalancer-test
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: loadbalancer-test
|
||||||
|
image: mpepping/cyberchef
|
||||||
|
ports:
|
||||||
|
- containerPort: 8000
|
Loading…
Reference in a new issue