adding in metallb configuration and sample app with auto load balancer working

This commit is contained in:
Arjun Patel
2023-11-16 17:14:20 -08:00
parent 96bd735824
commit be881e0918
5 changed files with 1250 additions and 0 deletions
+4
View File
@@ -12,3 +12,7 @@ Note: we are not using pi-hole as a DHCP server. We leave this to the router, al
### Discoveries
1. Do not have a secondary DNS server in router config. This makes pi-hole local DNS not work.
2. Do not use `.local` for domain in local DNS. You will see a warning when using dig that `.local` is reserved for mDNS.
## Container registry
For saving docker images.
File diff suppressed because it is too large Load Diff
+16
View File
@@ -0,0 +1,16 @@
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: first-pool
# namespace: metallb-system
spec:
addresses:
- 192.168.50.101-192.168.50.110
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: example
# namespace: metallb-system
+20
View File
@@ -0,0 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: sample-app-deployment
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: public.ecr.aws/nginx/nginx:1.23
ports:
- name: tcp
containerPort: 80
+15
View File
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: sample-app-service
annotations:
metallb.universe.tf/address-pool: first-pool
spec:
ports:
- port: 80
targetPort: 80
protocol: TCP
type: LoadBalancer
selector:
app: nginx