This message was deleted.
# rke2
a
This message was deleted.
s
it appears to be a static pod. Does it comes back when the daemon is restarted?
a
Touch the yaml in manifest
s
i redeployed using rke2 gui...is there better way of doing this like a command? also, what Im trying to do is expose cloudnative-postgresql service to port 5432 but I can't seem to find any good resource about it. I already add this manifest in the
/var/lib/rancher/rke2/server/manifests
Copy code
kind: HelmChartConfig
metadata:
  name: rke2-ingress-nginx
  namespace: kube-system
spec:
  valuesContent: |-
    tcp:
       5432: "<namespace>/<cnpg-service-rw>:5432"
s
no - you should not touch the manifests to create ingress
a
hmm you want to tcp proxy, why not just update the helm to expose a service as load balancer
👍 1
s
what helm chart should I update? the helm for rke2-ingress-nginx?
a
no, this is unrelated, I don't know your setup how you could achieve this
how did you install postgres
s
I installed using CloudNativePG operator. it has some details on exposing the service created but I can't imagine how it will work well with rke2 helmchartconfig https://cloudnative-pg.io/documentation/1.15/expose_pg_services/
a
Oh I see in this case you should look at the crd options regarding service
s
did you do install with kubectl apply or through helm chart
s
do you have any links or documentation i can look into for the crd options? kinda new with this
i used kubectl apply for the cnpg
a
well in worst case case scenario you could inspect crd schema what are the options
Probably issue if you want with nginx tcp proxy you have to open a port first
but rke2 is approaching differently than it is described here
s
https://docs.rke2.io/helm/#customizing-packaged-components-with-helmchartconfig just saw this. I think we have to expose extra ports in nginx through the manifest
https://artifacthub.io/packages/helm/rke2-charts/rke2-ingress-nginx you can find the available options from here
a
you can, but use rke2 options, I think they changed defaults and repackaged
yup I always help with default values
and one deviation is that nginx in rke2 uses host ports which is not "Load Balancer"
👀 1
and port 5432 isn't among them
you would have to reconsider to be a deployment and service as LB
and then you don't have this limitation
s
agree...it is tricky to customize rke2's ingress
a
Not really, if you know what you're doing
s
apologies for confusion..so with this, I need to update the helm chart for the rke2-nginx-ingress with addition of port 5432 in tcp? can i just do helm upgrade --install on the rke2-ingress-nginx which is installed default when i setup the rancher in rke2?
a
You can, though rke2 ingress has it's own helm processing within rke2 ecosystem
it's enough to update HelmChartConfig on the server node folder
s
do I need to add the the new helmchartconfig on the 3 masters nodes
/var/lib/rancher/rke2/server/manifests
or i can just add that in the 1st master node? and i need to add in the config is to add the port 5432 and tcp service in the config like this lines in the helm chart?
Its working right now. I just modified the rke2-ingress-nginx app in rancher UI. Below are the changes i've done:
Copy code
controller:
  service:
    ports:
      http: 80
      https: 443
      postgres: 5432
    targetPorts:
      http: http
      https: https
      postgres: tcp
tcp:
  '5432': <namespace>/<cnpg-service-rw>:5432
but im just really curious how can i modify it using the advised helmchartconfig....i prepared the manifest already and put it in 1 of the masternodes but not sure if there are command I need to run? hoping you can guide me on this :)
a
no commands
Job is run which synchronizes the cluster
kubectl get jobs
you will rke2-helm or something in this fashion
s
Copy code
NAMESPACE     NAME                                            COMPLETIONS   DURATION   AGE
kube-system   helm-install-rke2-canal                         1/1           14s        22h
kube-system   helm-install-rke2-coredns                       1/1           14s        22h
kube-system   helm-install-rke2-ingress-nginx                 1/1           52s        22h
kube-system   helm-install-rke2-metrics-server                1/1           50s        22h
kube-system   helm-install-rke2-snapshot-controller           1/1           49s        22h
kube-system   helm-install-rke2-snapshot-controller-crd       1/1           45s        22h
kube-system   helm-install-rke2-snapshot-validation-webhook   1/1           51s        22h
so its just okay to put the additional config in 1 master node only?
a
yes, it will sync to other server nodes
I think 😄
it listens on all folders on servers
s
got it. thank you so much for the help!!