I reviewed several of the issues of the HA chart and there are a few migration items to consider. First is from support, stating that a number of issues arise from Nexus OSS not shutting down cleanly in kubernetes, which can lead to internal database corruption. They recommend using an external database to avoid this issue, which was a pro feature that requires a license until recently. https://github.com/sonatype/nxrm3-ha-repository/pull/80#issuecomment-2220854343
I have been able to get Nexus working with the latest HA chart, however a small modification is required to the chart. I will see if I can make a PR to the upstream chart with my changes that will enable the Community edition of Nexus.
I used the following override file to set certain scale the replicas down to 1 and reduce the memory and CPU counts so the pod would start on my local system. I also provided database credentials for the external Postgres database that I needed to create.
I used the following command to install the chart with overrides
helm install nxrm-ha -f overrides.yaml ./nxrm-ha
Prior to installing the chart, it is recommended to create a postgres database, otherwise you will have to apply the new settings over the existing deployment and scale down/up. I did so with the following commands:
helm install nexus-db oci://registry-1.docker.io/bitnamicharts/postgresql# Once it is created, create a user and database for nexus. Start by connecting to the podkubectl run nexus-db-postgresql-client --rm--tty-i--restart='Never'--namespace nexusrepo --image docker.io/bitnami/postgresql:17.4.0-debian-12-r3 --env="PGPASSWORD=$POSTGRES_PASSWORD"\\n --command-- psql --host nexus-db-postgresql -U postgres -d postgres -p 5432
Once I was connected to the database, I created a user and database
It was a quick and dirty change just to prove that it is possible to run community edition with the HA chart, however I would rewrite this if/else statement to include a third option for community edition deployments that removes the -Dnexus.licenseFile=${LICENSE_FILE} parameter and replaces it with -Dnexus.loadAsOSS=true. I think this would allow for a community edition deployment without impacting pro users who want a single instance deployment of Nexus.