ARTIFACTORY:如何登录postgresql pod数据库进行头盔安装

劳伦斯冯
2022-05-04 09:23

Artifactory默认Postgresql pod:

如果您没有使用外部数据库进行Artifactory helm安装,默认的helm安装将使用生成的数据库密码创建一个postgresql pod。当运行kubectl get pod时,你应该看到Artifactory使用的postgresql pod。

用户添加图片

注意:对于生产实例,建议使用外部化数据库。关于设置外部数据库的更多信息可以在我们的头盔安装文档

登录绑定的postgresql数据库:

1.默认情况下,postgresql密码保存为kubernetes secret。要获得秘密名称,您可以运行kubectl get secrets。要解码秘密中的密码,可以在提供postgresql秘密名称后运行下面的命令。Kubectl get secret -n -o jsonpath="{.data. data. "| base64——解码2.获得密码后,现在就可以登录到postgresql pod中的数据库。下面是在正在运行的postgresql pod上获取shell的命令。Kubectl exec -它的artifactory-postgresql-0 bash
3.在postgresql pod中运行psql,使用之前检索到的密码登录数据库。默认用户名为“artifactory”。psql -U artifactory password=