我创建了一个NestJs
应用程序,使用 将其打包到 bin 文件中pkg
,使用 docker 映像将其容器化并命名为projectABC
。所有这些都部署在 Ubuntu20 中,并且 bin 文件运行良好。
接下来,我想尝试港口存储库。按照教程,我使用这个tut创建了带有自签名证书的本地港口存储库。我正在使用minikube
在我的机器上部署港口。
Harbor启动后,我创建了一个名为“project”的项目,然后将projectABC
图像推入其中,并将其Project registry
设置为Public
. 从docker login
, docker tag
, 到一切都很好docker push
。测试新推送的图像,我可以按预期docker pull
检查运行。projectABC
所以现在我想使用helm chart 进行部署。到目前为止,我已成功登录注册表并推送了一个空图表项目。
helm create projectABC
export HELM_EXPERIMENTAL_OCI=1
helm chart save ./projectABC 192.168.1.69/project/ABC
helm registry login https://192.168.1.69 --insecure
helm chart push 192.168.1.69/project/ABC:0.0.1
然后我修改values.yaml
以从港口回购中提取图像
image:
repository: 192.168.1.69/project/ABC:0.0.1
pullPolicy: Always
但它失败了结果:
container in pod is waiting to start: trying and failing to pull image
所以我的问题:
- 我如何将我的本地港口注册为 helm 中的 repo?
- 我的本地港口是否被视为私人或公共回购?
- 我应该怎么做才能让我的图表从本地港口回购中提取图像?