Skip to content

Instantly share code, notes, and snippets.

@jmarhee
Last active June 17, 2025 19:09
Show Gist options
  • Save jmarhee/fa41fd57c27a10b234ef7762e65b9242 to your computer and use it in GitHub Desktop.
Save jmarhee/fa41fd57c27a10b234ef7762e65b9242 to your computer and use it in GitHub Desktop.
Configure MetalLB VIP (192.168.1.101) to be Service IP for Nginx Ingress
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
namespace: kube-system
name: metallb
spec:
targetNamespace: metallb-system
createNamespace: true
version: v0.14.8
chart: metallb
repo: https://metallb.github.io/metallb
# Use https://apps.rancher.io/applications/metallb in all environments
# authSecret:
# name: example-repo-auth # will contain Rancher Prime helm repo credentials
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: rke2-default
namespace: metallb-system
spec:
addresses:
- 192.168.1.101/32
autoAssign: true
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: default
namespace: metallb-system
spec:
ipAddressPools:
- default
---
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
name: rke2-ingress-nginx
namespace: kube-system
spec:
valuesContent: |-
controller:
config:
use-forwarded-headers: "true"
enable-real-ip: "true"
publishService:
enabled: true
service:
enabled: true
type: LoadBalancer
externalTrafficPolicy: Local
annotations:
metallb.universe.tf/address-pool: rke2-default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment