Hello…I deployed rke2-server and then deployed met...
# rke2
w
Hello…I deployed rke2-server and then deployed metallb. MetalLB works, however rke2-ingress-nginx isn’t picking anything up and configuring itself to use the LoadBalancer type. Should it not pick that up automatically?
c
no… ingress-nginx doesn’t somehow automatically detect that you now have a LB controller present in the cluster and reconfigure itself. You need to modify the chart values to tell it to use a LoadBalancer Service and Deployment instead of just running as a DaemonSet with node ports.
w
ah, i assume that is done through the /var/lib/eancher/rke2/server/manifests/rke2-ingress-comfig.yaml file?
you could put the rke2-ingress-nginx HelmChartConfig in that file, yes. It doesn’t exist by default but that would be a good place for it.
w
c
yep that’s another good reference point
w
Trying to figure out how the config is setup now lol. Is it just me or is k8 a 10x version of java config hell lol
like as an example: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/configmap.md has a bunch of configuration options… then you have this https://github.com/kubernetes/ingress-nginx/tree/main/charts/ingress-nginx has a bunch of configuration options… the values.yaml or that page don’t even mention “use-forwarded-headers: true” but yet the comfigmap does.
c
You want to be looking at the chart values. As the values says, stuff under controller.config is just injected as-is into the configmap. There are a LOT of layers here and you need to know which layer you are working with.
in your case you want to change controller.kind to deployment and controller.service.enabled to true
in yaml that would be
Copy code
controller:
  kind: Deployment
  publishService:
    enabled: true
  service:
    enabled: true
w
won’t i need type LoadBalancer as well?
c
you’re not trying to configure ingress-nginx. you’re trying to configure how helm is deploying ingress-nginx to your cluster
look at the chart values for controller.service.type and tell me if you think that’s necessary
w
i guess not because it’s already default to “LoadBalancer”
You want to be looking at the chart values. As the values says, stuff under controller.config is just injected as-is into the configmap. There are a LOT of layers here and you need to know which layer you are working with.
Yeah i’m noticing the layer problem here.
granted that’s kind of confusing bc the “kind: Deployment” flag is the default. But i also might have misunderstood what you were implying too
c
w
yeah you said > look at the chart values for controller.service.type and tell me if you think that’s necessary It’s LoadBalancer by default so I didn’t quite understand what you mean on why thought it would or wouldn’t be necessary.
c
oh if you are going to run it as a service you usually want it as a deployment instead of a daemonset
it scales differently