adding in metallb configuration and sample app with auto load balancer working
This commit is contained in:
@@ -12,3 +12,7 @@ Note: we are not using pi-hole as a DHCP server. We leave this to the router, al
|
|||||||
|
|
||||||
### Discoveries
|
### Discoveries
|
||||||
1. Do not have a secondary DNS server in router config. This makes pi-hole local DNS not work.
|
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
@@ -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
|
||||||
@@ -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
|
||||||
@@ -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
|
||||||
|
|
||||||
Reference in New Issue
Block a user