-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
metallb.yaml
56 lines (56 loc) · 1.45 KB
/
metallb.yaml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Further reference: https://microk8s.io/docs/addon-metallb
#
# metallb address pool
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: custom-addresspool
namespace: metallb-system
spec:
addresses:
# Reference: "Step 4.7: Enable and configure MetalLB" https://foolcontrol.org/?p=4004
# Must match initial node pool configured as part of: "Step 3.10: Comment existing contents and add static configuration"
- 192.168.1.1-192.168.1.100
---
# metallb-service for each LoadBlanacer service
apiVersion: v1
kind: Service
metadata:
name: metallb-service
annotations:
metallb.universe.tf/address-pool: custom-addresspool
spec:
selector:
name: nginx
type: LoadBalancer
# loadBalancerIP is optional. MetalLB will automatically allocate an IP
# from its pool if not specified. You can also specify one manually.
# loadBalancerIP: x.y.z.a
ports:
- protocol: TCP
port: 80
targetPort: 80
---
# metallb ingress service
apiVersion: v1
kind: Service
metadata:
name: ingress
namespace: ingress
spec:
selector:
name: nginx-ingress-microk8s
type: LoadBalancer
# loadBalancerIP is optional. MetalLB will automatically allocate an IP
# from its pool if not specified. You can also specify one manually.
# loadBalancerIP: x.y.z.a
loadBalancerIP: 192.168.1.110
ports:
- name: http
protocol: TCP
port: 80
targetPort: 80
- name: https
protocol: TCP
port: 443
targetPort: 443