【发布时间】:2020-06-04 06:10:35
【问题描述】:
我需要在 Kubernetes 中部署一个容器。我创建的图像需要某些参数,其中一个是放置在外部位置的文件,比如 Github。
我如何能够挂载这个外部文件的路径,以便在我部署这个容器并传递参数时,文件可以传递给容器。
目前已给出文件的完整路径
args: ["update","--changesetFile","https://github.com/lbg-gcp-foundation/ep-liquibase-db-propagation/blob/db-prop-pipeline/resources/release1.0/customer/ddl/db.changelog.customer.ddl.rel1.sql","--url=jdbc:cloudspanner:/projects/eplus-cus-02-ide-d08b/instances/spn-01/databases/spd-01","--labels","base","--tag","0.0.1-test"]
【问题讨论】:
-
当我得到 404 时,我猜它是您的私有目录。如果此故障仅包含文本,您可以考虑创建 ConfigMap。如果此映像是由 Dockerfile 创建的,您可以在映像中对其进行硬编码。还是必须以某种特定方式安装?