简体   繁体   English

带有来自私有存储库的 Docker 图像的 Spring Cloud 数据流 - 未使用 imagePullSecrets。 不能拉图像

[英]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的:

application.yaml 应用程序.yaml
[...]
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 图像时,您当然可以将其指定为参数:

deployment.yaml 部署.yaml
 [...] 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.

相关问题 ElasticBeanstalk - 无法从私有 Docker Hub 存储库中提取 docker 镜像 - ElasticBeanstalk - cannot pull docker image from private Docker Hub repo 使用 Minikube 时无法从私有仓库中拉取 docker 镜像 - Can not pull docker image from private repo when using Minikube 从多个 docker hub 镜像或私有 repo docker 构建镜像 - Building image from multiple docker hub images or private repo docker Docker-从私有gitlab存储库中提取库 - Docker - Pull library from a private gitlab repo 准备运行Spring Cloud Data Flow的Docker映像 - Ready to run docker images for Spring Cloud Data Flow 如何远程从私有 Docker Hub 存储库中提取 Docker 映像? - How can I pull a Docker image from a private Docker Hub repo remotely? 无法在Docker中提取私人仓库 - Unable to pull private repo in docker Kubectl无法从私有gcr.io存储库中提取docker映像 - Kubectl Failed to pull docker image from private gcr.io repo 在不使用 imagePullSecrets 的情况下从 kubernetes 中的私有存储库中提取图像 - Pulling images from private repository in kubernetes without using imagePullSecrets 无法从docker repo中提取图像 - Can't pull image from docker repo
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM