Migrate OpenSearch management to Nais Console ΒΆ

This guide will help you migrate an existing OpenSearch instance to instead be managed via Nais Console.

Prerequisites ΒΆ

Before we begin, ensure that:

Steps ΒΆ

1. Verify that your existing OpenSearch settings are compatible with Console ΒΆ

Before migrating, ensure that your existing OpenSearch instance is compatible with Nais Console.

Console currently supports the following fields:

  • .spec.plan - plan is now split into memory and tier
    • memory denotes the memory size of the instance
    • tier denotes the availability tier of the instance
      • SINGLE_NODE (equivalent to startup-*, or hobbyist for the smallest memory)
      • HIGH_AVAILABILITY (equivalent to business-*)
    • For example, if your existing plan is startup-4, you would set:
      • memory = "GB_4"
      • tier = "SINGLE_NODE"
    • If your existing plan is business-16, you would set:
      • memory = "GB_16"
      • tier = "HIGH_AVAILABILITY"
    • If your existing plan is hobbyist, you would set:
      • memory = "GB_2"
      • tier = "SINGLE_NODE"
  • .spec.userConfig.opensearch_version
  • .spec.project (automatically set)
  • .spec.terminationProtection (automatically enabled)

If you need other fields not supported by Console, reach out to the Nais team.

2. Delete OpenSearch manifest from your Git repository ΒΆ

Your Git repository might have a manifest file that was used to create the OpenSearch instance. It should look something like this:

opensearch.yaml

Delete the file from your repository.

3. Remove references from GitHub Actions workflows ΒΆ

If you have any GitHub Actions workflows that references the OpenSearch manifest file you just deleted, you should remove those references:

.github/workflows/deploy.yaml

4. Patch resource in Kubernetes ΒΆ

To allow Console to take over management of the OpenSearch instance, you need to add a label to the existing OpenSearch resource in your Kubernetes cluster.

To do so, run the following command:

shell

where

  • $OPENSEARCH_NAME is the fully qualified name of your OpenSearch instance, e.g. opensearch-<TEAM>-<INSTANCE>.
  • $TEAM is your team.
  • $ENVIRONMENT is the name of the environment you're targeting.

5. Finishing up ΒΆ

  1. Visit Nais Console.
  2. Navigate to your team.
  3. Navigate to the OpenSearch overview in the sidebar.
  4. Verify that you can see the OpenSearch instance without the prefix opensearch-<TEAM>- in its name.
  5. Click the OpenSearch instance to view its details.
  6. Verify that you can Edit or Delete the OpenSearch instance.

Congratulations! You've now successfully migrated your OpenSearch instance to be managed via Nais Console.