Sysdig Documentation

v1765 Migration Tool for Upgrade (Kubernetes)

When upgrading to Sysdig platform version 1765 on Kubernetes, it is necessary first to apply a migration tool, due to a change which transitions from MySQL Connector to Maria DB Connector.

The migration tool sets the MySQL server authentication plugin for Sysdig admin user to mysql_native_password.

Run the tool even if you are unsure whether the authentication plugin setting requirement matches your environment. If the tool detects that your setting is already compatible with MariaDB Connector, no changes will be made.

After running the migration script, you will be ready to upgrade.

Run the Migration

Prerequisite

The migration tool script must be run on a computer with access to Sysdig Kubernetes namespace (default name "sysdigcloud")

Steps

  1. Download the migration tool script from https://raw.githubusercontent.com/draios/sysdigcloud-kubernetes/master/migrations/mysql/mysql8-mariadb-conj-auth-migration/mysql8-mariadb-conj-auth-migration.sh, by running:

    curl -O https://raw.githubusercontent.com/draios/sysdigcloud-kubernetes/v1765/migrations/mysql/mysql8-mariadb-conj-auth-migration/mysql8-mariadb-conj-auth-migration.sh

    or

    wget https://raw.githubusercontent.com/draios/sysdigcloud-kubernetes/v1765/migrations/mysql/mysql8-mariadb-conj-auth-migration/mysql8-mariadb-conj-auth-migration.sh
  2. Add "execute" permission and run the script:

    chmod u+x mysql8-mariadb-conj-auth-migration.sh
    ./mysql8-mariadb-conj-auth-migration.sh
  3. You will be prompted to enter values:

    1. Kubernetes context: By default, the script uses the current Kubernetes context for the migration. Enter a different context if required.

    2. Kubernetes namespace: By default, the script assumes the default name for Sysdig Kubernetes namespace "sysdigcloud". Enter a different namespace if required.

    3. (optional) MySQL port, root username, and root password : The script attempts to run the migration with the default values for MySQL port, root user, and root password. If custom values are required, the script will prompt you to enter them.

  4. Review the output. Note that the script cleans up after itself when the migration is complete.

  5. Proceed with the Upgrade to version 1765.

    1. Basic Upgrade Kubernetes Installations(if running Sysdig Monitor only)

    2. v1765 Upgrade (Kubernetes) (for Sysdig Platform-- i.e. Sysdig Monitor + Sysdig Secure with Scanning)

Sample Output

Using Default Parameters

Sysdig MySQL to MariaDB Connector Migration Tool
Please enter the required values (press Enter for default).
Sysdig Kubernetes context (default current-context):
Sysdig Kubernetes namespace (default sysdigcloud):

Running the migration script with default parameters.
pod/sysdig-mysql8-mariadb-conj-auth-migration created

Before:
+-------+------+-----------------------+
| User  | Host | plugin                |
+-------+------+-----------------------+
| admin | %    | caching_sha2_password |
+-------+------+-----------------------+

After:
+-------+------+-----------------------+
| User  | Host | plugin                |
+-------+------+-----------------------+
| admin | %    | mysql_native_password |
+-------+------+-----------------------+

Migration successful.
Your Sysdig installation is ready to be upgraded.

pod "sysdig-mysql8-mariadb-conj-auth-migration" deleted
Untagged: quay.io/sysdig/onprem_migration:mysql8-mariadb-conj-auth-migration-1.0.0
Untagged: quay.io/sysdig/onprem_migration@sha256:c07e8f0265afc82a24f9c3f440e4d14665ca91d3a2e7d11b4271012dc120e39e
Deleted: sha256:0409ae7b6604522e0dc48cafcacd2668545e2f2de861eee2a6e49c56acf42a8a

Using Custom Parameters

Sysdig MySQL to MariaDB Connector Migration Tool
Please enter the required values (press Enter for default).
Sysdig Kubernetes context (default current-context):
Sysdig Kubernetes namespace (default sysdigcloud):

Running the migration script with default parameters.
pod/sysdig-mysql8-mariadb-conj-auth-migration created
pod "sysdig-mysql8-mariadb-conj-auth-migration" deleted

Custom parameters required, please enter the values in the following prompts.
MySQL port (default 3306):
MySQL root username (default root):
MySQL root password:

Running the migration script with custom parameters.
secret/mysql8-mariadb-conj-auth-migration-secret created
pod/sysdig-mysql8-mariadb-conj-auth-migration created

Before:
+-------+------+-----------------------+
| User  | Host | plugin                |
+-------+------+-----------------------+
| admin | %    | caching_sha2_password |
+-------+------+-----------------------+

After:
+-------+------+-----------------------+
| User  | Host | plugin                |
+-------+------+-----------------------+
| admin | %    | mysql_native_password |
+-------+------+-----------------------+

Migration successful.
Your Sysdig installation is ready to be upgraded.

pod "sysdig-mysql8-mariadb-conj-auth-migration" deleted
secret "mysql8-mariadb-conj-auth-migration-secret" deleted
Untagged: quay.io/sysdig/onprem_migration:mysql8-mariadb-conj-auth-migration-1.0.0
Untagged: quay.io/sysdig/onprem_migration@sha256:c07e8f0265afc82a24f9c3f440e4d14665ca91d3a2e7d11b4271012dc120e39e
Deleted: sha256:0409ae7b6604522e0dc48cafcacd2668545e2f2de861eee2a6e49c56acf42a8a

When No Change Is Needed

If the tool detects that no changes are required, the output will be similar to the cases above, but instead of printing the Before and After tables and "Migration successful.", it will output "Nothing to be done: Sysdig admin user password already encoded with mysql_native_password encoder.".