ARTIFACTORY:如何登录数据库进行postgresql pod的helm安装
默认Postgresql pod:
如果您没有使用外部数据库进行Artifactory helm安装,默认的helm安装将使用生成的数据库密码创建一个postgresql pod。当运行kubectl get pod时,您应该看到Artifactory使用的postgresql pod。
注意:对于生产实例,建议使用外部化数据库。关于设置外部数据库的更多信息可以在我们的舵机安装文档。
登录绑定的postgresql数据库:
1.默认情况下,postgresql的密码保存为kubernetes的秘密。要获取秘密名称,可以运行kubectl get secrets。要解码secret中的密码,您可以在提供postgresql secret名称后运行以下命令。Kubectl get secret -n 2.获得密码后,就可以登录到postgresql pod中的数据库了。下面是在正在运行的postgresql pod上获取shell的命令。Kubectl - exec - artifactory-postgresql-0 bash
3.在postgresql pod中运行psql,使用之前检索到的密码登录数据库。默认用户名为artifactory。psql -U artifactory password=
