Home / FAQ / How to retrieve the access password for Redis/PostgreSQL in a deployed Harbor?

How to retrieve the access password for Redis/PostgreSQL in a deployed Harbor?

After deploying Harbor on the platform, the access passwords for the Redis/PostgreSQL components in Harbor are stored in the Secret within the namespace of the Harbor instance, after being encoded in Base64.

The Secret and fields that store the password, and the command line to retrieve the decoded password are listed in the table below.

Tip: You can click on the in the top navigation bar of the platform to open the CLI tool. Then, choose any control node in the cluster where the Harbor instance is located, and execute the command to quickly view the component passwords stored in the Secret. Before executing the command, please replace the variables in the command line (e.g., Harbor instance name) with actual values.

Component Name Secret Name Field Storing Password Command to Retrieve Password
Redis <Harbor instance name>-harbor-redis data.redis-password VALUE=$(kubectl -n <namespace of the instance> get secret <Harbor instance name>-harbor-redis -o jsonpath="{.data.redis-password}" | base64 -d); echo $VALUE
PostgreSQL <Harbor instance name>-harbor-database data.POSTGRES_PASSWORD VALUE=$(kubectl -n <namespace of the instance> get secret <Harbor instance name>-harbor-database -o jsonpath="{.data.POSTGRES_PASSWORD}" | base64 -d); echo $VALUE