如何在 Kuscia 中使用自定义镜像仓库

打开链接即可点亮社区Star,照亮技术的前进之路。

Github 地址:github.com/secretflow/...

Kuscia支持自动拉取远程的应用镜像(比如:SecretFlow 等),这样可以不用手动导入镜像到容器中。可以在 Kuscia 配置文件中配置私有(or 公开)镜像仓库地址。

如何配置使用自定义镜像仓库

配置文件中的 image 字段用来配置自定义仓库。相关含义参考 Kuscia 配置文件说明

私有镜像仓库

如果有一个私有镜像仓库(示例:private.registry.com),对应的配置如下:

yaml 复制代码
- image:
  - defaultRegistry: private # It doesn't matter, as long as it corresponds to <image.registries[0].name>
  - registries:
    - name: private
      endpoint: private.registry.com/test
      username: testname
      password: testpass

公开镜像仓库

如果使用公开的镜像仓库(示例:secretflow-registry.cn-hangzhou.cr.aliyuncs.com),对应的配置如下:

yaml 复制代码
- image:
  - defaultRegistry: aliyun # It doesn't matter, as long as it corresponds to <image.registries[0].name>
  - registries:
    - name: aliyun
      endpoint: secretflow-registry.cn-hangzhou.cr.aliyuncs.com/secretflow

关于镜像仓库和AppImage的搭配使用

配置文件中有image字段,AppImage 中也存在image相关的配置,他们的搭配关系示例如下:

配置文件 AppImage配置 实际镜像地址 备注
无配置 secretflow/app:v1 docker.io/secretflow/app:v1
无配置 private.registry.com/secretflow/app:v1 private.registry.com/secretflow/app:v1
private.registry.com secretflow/app:v1 private.registry.com/app:v1
private.registry.com/secretflow app:v1 private.registry.com/secretflow/app:v1 推荐配置
private.registry.com/secretflow secretflow/app:v1 private.registry.com/secretflow/app:v1
private.registry.com/secretflow test/app:v1 private.registry.com/secretflow/app:v1
private.registry.com/secretflow private.registry.com/secretflow/app:v1 private.registry.com/secretflow/app:v1
private.registry.com/secretflow public.aliyun.com/secretflow/app:v1 public.aliyun.com/secretflow/app:v1 强烈不推荐配置,未来可能会禁止这种配置

注:Kuscia推荐在 AppImage 中只配置镜像名(不带镜像仓库地址),否则切换仓库的时候,需要批量修改AppImage,所以不建议如此配置。

镜像拉取失败

当发现镜像拉取失败时,请确认 配置文件中仓库地址,以及账密相关配置是否正确, 以及参考上文,确保 AppImage 的镜像地址配置正确.

vbnet 复制代码
2024-06-06 13:33:00.534 ERROR framework/pod_workers.go:978 Error syncing pod "ant-test-0_ant(7fd5285b-2a5c-4a75-930a-2908e98c8799)", skipping: failed to "StartContainer" for "test" with ErrImagePull: "faile to pull image \"registry.xxxx.com/secretflow/nginx:v1\" with credentials, detail-> rpc error: code = Unknown desc = failed to pull and unpack image \"registry.xxxx.com/secretflow/nginx:v1\": failed to resolve reference \"registry.xxxx.com/secretflow/nginx:v1\": unexpected status from HEAD request to https://registry.xxxx.com/v2/secretflow/nginx/manifests/v1: 401 Unauthorized"
相关推荐
L、2183 小时前
Flutter 与开源鸿蒙(OpenHarmony):跨平台开发的新未来
flutter·华为·开源·harmonyos
CoderJia程序员甲4 小时前
GitHub 热榜项目 - 日榜(2025-12-11)
git·ai·开源·llm·github
500845 小时前
鸿蒙 Flutter 隐私合规:用户授权中心与数据审计日志
flutter·华为·开源·wpf·音视频
DisonTangor6 小时前
Mistral AI 开源一款专为软件工程任务设计的智能大语言模型——Devstral 2 123B Instruct 2512
人工智能·开源·aigc·软件工程
周杰伦_Jay7 小时前
【字节开源Golang框架Eino】技术详解:架构原理+实战落地+避坑指南(附代码)
架构·golang·开源
路由侠内网穿透.7 小时前
本地部署开源的网盘聚合工具 OpenList 并实现外部访问
服务器·网络协议·信息可视化·开源·远程工作
济南壹软网络科技有限公司7 小时前
掘金国际盲盒电商:UniApp + ThinkPHP6 构建的全球化技术基石
uni-app·开源·盲盒源码·国际盲盒
豆豆8 小时前
企业网站整站源码 开源企业网站源码 企业网页源码
开源·cms·源码·网站模板·网站源码·网页源码·源码建站
说私域8 小时前
开源AI智能名片链动2+1模式商城小程序在淘宝首页流量生态中的应用与影响研究
人工智能·小程序·开源