[英]Spring Cloud Data Flow with Docker images from private repo - imagePullSecrets not being used. Cant Pull image
So I am unable to Launch a custom task application stored in a private docker repo .所以我无法启动存储在私有 docker repo 中的自定义任务应用程序。 All my docker images in Kubernetes come are pulled from this private repo.
我在 Kubernetes 中的所有 docker 镜像都来自这个私有仓库。 So the imagePullSecrets works fine but it seems it is not being used by Spring Cloud Dataflow when deploying the task to Kubernetes.
所以imagePullSecrets工作正常,但在将任务部署到 Kubernetes 时,Spring Cloud Dataflow 似乎没有使用它。 If I inspect the pod there is no imagepullSecret set.
如果我检查 pod,则没有设置 imagepullSecret。
The error I get is:我得到的错误是:
xxxxx- no basic auth credentials xxxxx- 没有基本的身份验证凭据
The server has been deployed with the ENV variable which the guide states will fix this服务器已使用 ENV 变量进行部署,指南指出将解决此问题
- name: SPRING_CLOUD_DEPLOYER_KUBERNETES_IMAGE_PULL_SECRET
value: regcred
I have even tried to add custom properties on a per-application bases我什至尝试在每个应用程序基础上添加自定义属性
I have read through the guide HERE我已经阅读了这里的指南
I am running the following versions:我正在运行以下版本:
Kubernetes 1.15 & Kubernetes 1.15 &
I have been stuck on this issue for weeks and simply can't find a solution.我已经被这个问题困住了几个星期,根本找不到解决方案。 I'm hoping somebody has seen this issue and managed to solve it before?
我希望有人已经看到这个问题并设法解决它之前?
Is there something else I'm missing?还有什么我想念的吗?
So I found if I do the following it pulls the image (it seems i put this in the wrong place as the documentation doesn't clearly specify where and how)所以我发现如果我执行以下操作,它会拉取图像(似乎我把它放在错误的地方,因为文档没有明确说明在哪里以及如何)
But using the global environment variable as stated above does not seem to work still但是使用如上所述的全局环境变量似乎仍然不起作用
Using the environment variable SPRING_CLOUD_DEPLOYER_KUBERNETES_IMAGE_PULL_SECRET
also didnt work for me.使用环境变量
SPRING_CLOUD_DEPLOYER_KUBERNETES_IMAGE_PULL_SECRET
对我也不起作用。
An alternative that made it work in my case is adding the following to the application.yaml
of the SCDF Server in Kubernetes:使得它在我的情况下工作,另外一个办法是添加以下的
application.yaml
的新加坡民防部队服务器中的Kubernetes的:
[...]
command: ["java", "-jar", "spring-cloud-dataflow-server.jar"]
args:
- --spring.cloud.dataflow.task.platform.kubernetes.accounts.default.imagePullSecret=<your_secret>
[...]
or, when you are using a custom SCDF image like i do, you can of course specify it as argument:或者,当您像我一样使用自定义 SCDF 图像时,您当然可以将其指定为参数:
[...] command: ["java", "-jar", "spring-cloud-dataflow-server.jar"] args: - --spring.cloud.dataflow.task.platform.kubernetes.accounts.default.imagePullSecret=<your_secret> [...]
More details on https://docs.spring.io/spring-cloud-dataflow/docs/current/reference/htmlsingle/有关https://docs.spring.io/spring-cloud-dataflow/docs/current/reference/htmlsingle/ 的更多详细信息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.