Skip to content

Instantly share code, notes, and snippets.

@janeczku
Created November 10, 2023 13:41
Show Gist options
  • Save janeczku/a114a795a19e5585a10f801788b692f0 to your computer and use it in GitHub Desktop.
Save janeczku/a114a795a19e5585a10f801788b692f0 to your computer and use it in GitHub Desktop.

Revisions

  1. janeczku created this gist Nov 10, 2023.
    34 changes: 34 additions & 0 deletions rke2-nginx-lb.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    1. Before installing RKE2 on the node create the following file:

    ```
    # /var/lib/rancher/rke2/server/manifests/rke2-ingress-nginx-config.yaml
    ---
    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
    external:
    enabled: true
    externalTrafficPolicy: Local
    annotations:
    metallb.universe.tf/loadBalancerIPs: 192.168.20.45 # Configure static load balancer IP
    ```

    2. Install RKE2 normally

    3. Install Metallb into the cluster

    4. Have fun!