https://rancher.com/ logo
Title
i

icy-apple-1347

05/08/2023, 9:11 PM
Hey guys, I'm trying to update RKE2's ingress helm chart config to allow the ingress to be served on a LoadBalancer service. Here is my yaml file:
apiVersion: <http://helm.cattle.io/v1|helm.cattle.io/v1>
kind: HelmChartConfig
metadata:
  name: rke2-ingress-nginx
  namespace: kube-system
spec:
  valuesContent: |-
    controller:
      service:
        type: LoadBalancer
        loadBalancerIP: {{ kubernetes_api_floating_ip }}
Once I copied this manifest onto the servers, rke2 applied it and took the existing rke2-nginx-ingress controller pods and service down, but didn't re-deploy anything new. The
rke2-server
logs say:
error syncing 'kube-system/rke2-ingress-nginx': handler on-helm-chart-remove: unable to update status of helm chart to add uninstall job name helm-delete-rke2-ingress-nginx, requeuing
But nothing else. Am I doing something wrong, or missing something?
Followup: I just deleted my custom HelmChartConfig, and the old nginx-ingress controllers did not come back... I think I may have broke something 👀 Is there a way to tell rke2 to force apply a helm chart?
$ kubectl get addons -n kube-system
NAME                               AGE
kube-vip                           3h49m
rke2-cilium                        3h49m
rke2-coredns                       3h49m
rke2-ingress-nginx                 3h49m
rke2-metrics-server                3h49m
rke2-snapshot-controller           3h49m
rke2-snapshot-controller-crd       3h49m
rke2-snapshot-validation-webhook   3h49m
$ kubectl get helmchart -n kube-system
NAME                               AGE
rke2-cilium                        3h49m
rke2-coredns                       3h49m
rke2-metrics-server                3h49m
rke2-snapshot-controller           3h49m
rke2-snapshot-controller-crd       3h49m
rke2-snapshot-validation-webhook   3h49m
$ kubectl get helmchartconfig -n kube-system
NAME                 AGE
rke2-ingress-nginx   40m
This seems weird... nginx-ingress is not in the
kubectl get helmchart
listing?
c

creamy-pencil-82913

05/08/2023, 9:31 PM
you didn’t overwrite the existing rke2-ingress-nginx.yaml with that HelmChartConfig, did you?
i

icy-apple-1347

05/08/2023, 9:32 PM
Hahaha maybe? Does it live at
/var/lib/rancher/rke2/server/manifests/rke2-ingress-nginx.yaml
by default? If so, then yeah, I probably did 😂 Do you happen to have a copy of the existing one?
c

creamy-pencil-82913

05/08/2023, 9:32 PM
yes you did
just restart rke2 on one of the servers, it’ll put it back.
call your file rke2-ingress-nginx-config.yaml or something
i

icy-apple-1347

05/08/2023, 9:36 PM
Amazing. Thanks!