Waiting until all OpenSearch nodes are compatible with OpenSearch Dashboards before starting saved objects migrations

I found the issue!

One of my coworker deleted the default user kibanaserver for OpenSearch for security concern.

If you see opensearch_dashboards.yml above, by default, it is using kibanaserver.

---
# Copyright OpenSearch Contributors
# SPDX-License-Identifier: Apache-2.0

# Description:
# Default configuration for OpenSearch Dashboards

server.host: '0'
opensearch.hosts: [https://localhost:9200]
opensearch.ssl.verificationMode: none
opensearch.username: kibanaserver
opensearch.password: kibanaserver
opensearch.requestHeadersWhitelist: [authorization, securitytenant]

opensearch_security.multitenancy.enabled: true
opensearch_security.multitenancy.tenants.preferred: [Private, Global]
opensearch_security.readonly_mode.roles: [kibana_read_only]
# Use this setting if you are running opensearch-dashboards without https
opensearch_security.cookie.secure: false

Based on the document at Redirecting…

If you override opensearch_dashboards.yml settings using environment variables, as seen above, use all uppercase letters and underscores in place of periods (e.g. for opensearch.hosts , use OPENSEARCH_HOSTS ).

To give OpenSearch Dashboards correct username and password to connect OpenSearch.
I just need set the right username and password by passing

OPENSEARCH_USERNAME=xxx
OPENSEARCH_PASSWORD=xxx

as Kubernetes environment that OpenSearch is using.