This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.3.5.6.3. 将绑定作为文件绑定
odo link
提供的另一个有用标志是 --bind-as-files
。当传递此标记时,绑定信息不会作为环境变量注入组件的 Pod 中,而是作为文件系统挂载。
确保后端组件和 PostgreSQL 服务之间没有现有链接。您可以通过在后端组件的目录中运行 odo describe
来检查输出是否类似以下内容:
Linked Services: · PostgresCluster/hippo
Linked Services:
· PostgresCluster/hippo
使用以下命令从组件中取消链接该服务:
odo unlink PostgresCluster/hippo odo push
$ odo unlink PostgresCluster/hippo
$ odo push