java - 在 OpenShift 部署中无法获取 registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift 映像错误
问题描述
我在 AWS 上有一个 OpenShift 源 (OKD) 集群设置。Jenkins 被用于 CICD 管道部署。基于 OpenShift 文档,我正在尝试使用 Source to Image (S2I) 将我的 Java 源代码转换为使用image 的redhat-openjdk-18/openjdk18-openshift
图像。我使用了以下命令
创建新版本
$ oc new-build --binary=true --name=bookstore --image-stream=openjdk18-openshift
--> Found image 24d98bd (7 days old) in image stream "cicd/openjdk18-openshift" under tag "latest" for "openjdk18-openshift"
Java Applications
-----------------
Platform for building and running plain Java applications (fat-jar and flat classpath)
Tags: builder, java
* A source build using binary input will be created
* The resulting image will be pushed to image stream "bookstore:latest"
* A binary build was created, use 'start-build --from-dir' to trigger a new build
--> Creating resources with label build=bookstore ...
imagestream "bookstore" created
buildconf
开始构建
$ oc start-build bookstore --from-dir=./ocp --follow
Uploading directory "ocp" as binary input for the build ...
build "bookstore-1" started
Receiving source from STDIN as archive ...
pulling image error : open /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt: no such file or directory
error: build error: unable to get registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift@sha256:38dab2c3f60ade6857cc2a592184c964d3a51e2d3b5ef07def4b8ad4215d2bbf
如上图,运行 start-build 命令时出现build error: unable to get registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift错误。
解决方案
谢谢,格雷厄姆的意见。我能够通过在所有节点(主节点和工作节点)节点上创建空文件来解决这个问题
$ sudo vi /etc/rhsm/ca/redhat-uep.pem
推荐阅读
- sql - 运行总 sql SAP B1 - 找不到解决它的正确方法
- java - 在 Android Firebase 存储中上传文件后如何获取文件下载 URL?getDownloadUrl() 不工作
- javascript - SweetAlert2 蹩脚的文字
- javascript - JS fetch,没有得到响应的标题
- ruby-on-rails - 将 ruby on rails 帖子分配给博客类别(通过 simple_form gem)
- sharepoint - SharePoint 中的 CAML 简介
- python - 用 Python + Beautiful Soup 刮掉任何包含 5 个数字的字符串
- java - 验证空值的成员列表变量
- html - 从不同的组件更改变量值 - Angular 4
- java - 如何在使用数据库更改通知程序 DCN 时检索 blob 类型数据