本文记录在OperatorHub中存在界面但缺少镜像的环境下如何安装部署。感谢王征提供的大力支持和指导。

现在一个在线环境找到etcd所需要的镜像

quay.io/coreos/etcd-operator@sha256:66a37fd61a06a43969854ee6d3e21087a98b93838e284a6086b13917f96b0d9b

quay.io/coreos/etcd:v3.2.13
docker.io/library/busybox:1.28.-glibc

找一个能上网的机器,建立registry.redhat.ren的docker-distribution,通过oc  image mirror命令把镜像的相关信息复制到本地

oc image mirror quay.io/coreos/etcd-operator@sha256:66a37fd61a06a43969854ee6d3e21087a98b93838e284a6086b13917f96b0d9b registry.redhat.ren/quay.io/coreos/etcd-operator

将本地的registry打包成tgz文件,

tar zcvf registry-etcd.tgz registry

然后上传到自己离线的registry,然后解压。

修改helper机器上的image.registries.conf,添加如下记录

[[registry]]
location = "quay.io/coreos/etcd-operator"
insecure = false
blocked = false
mirror-by-digest-only = false
prefix = "" [[registry.mirror]]
location = "registry.redhat.ren/quay.io/coreos/etcd-operator"
insecure = true [[registry]]
location = "docker.io/library/busybox"
insecure = false
blocked = false
mirror-by-digest-only = false
prefix = "" [[registry.mirror]]
location = "registry.redhat.ren/docker.io/library/busybox"
insecure = true [[registry]]
location = "quay.io/coreos/etcd"
insecure = false
blocked = false
mirror-by-digest-only = false
prefix = "" [[registry.mirror]]
location = "registry.redhat.ren/quay.io/coreos/etcd"
insecure = true

然后运行

config_source=$(cat ./image.registries.conf | python3 -c "import sys, urllib.parse; print(urllib.parse.quote(''.join(sys.stdin.readlines())))"  )

cat <<EOF > -worker-container-registries.yaml
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: -worker-container-registries
spec:
config:
ignition:
version: 2.2.
storage:
files:
- contents:
source: data:text/plain,${config_source}
verification: {}
filesystem: root
mode:
path: /etc/containers/registries.conf
EOF cat <<EOF > -master-container-registries.yaml
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: master
name: -master-container-registries
spec:
config:
ignition:
version: 2.2.
storage:
files:
- contents:
source: data:text/plain,${config_source}
verification: {}
filesystem: root
mode:
path: /etc/containers/registries.conf
EOF
oc apply -f ./-worker-container-registries.yaml -n openshift-config
oc apply -f ./-master-container-registries.yaml -n openshift-config

通过podman push把另外两个镜像推入到正确的位置,然后安装etcd Operator, 再建立etcd cluster.

[root@helper ocp4]# oc get pods
NAME READY STATUS RESTARTS AGE
etcd-operator-7f95f8497c-cczf9 / Running 3h46m
example-f6jg6px9q4 / Running 3h44m
example-mvlbn7v2tl / Running 3h43m
example-wkgcgjgpw4 / Running 3h43m

最新文章

  1. SAP CRM 性能小技巧
  2. [OC]宏与const 的使用
  3. 使用GDB 修改MySQL参数不重启
  4. 深入理解java虚拟机(1)------内存区域与内存溢出
  5. 查看Linux服务器各种信息方法
  6. ACM2035_(递归法求幂)
  7. UI设计网站参考
  8. 百度2017笔试题:寻找n个员工中未打卡的那一个
  9. POJ 2387 Til the Cows Come Home(dij+邻接矩阵)
  10. 获取Excel数据(或部分数据)并导出成txt文本格式
  11. android TextView实现滚动显示效果
  12. Apache+PHP+Mysql中文配置
  13. 【Bootstrap】 一些提示信息插件
  14. php网上支付易宝
  15. git 的简单实用
  16. 个人项目 Individual Project
  17. HDU-6370 Werewolf(杭电多校6I)
  18. NSL:CPK_NN神经网络实现预测哪个样本与哪个样本处在同一层,从而科学规避我国煤矿突水灾难—Jason niu
  19. Python3 tkinter基础 Entry insert delete 点击按钮 向输入框赋值 或 清空
  20. 网络基础之 tcp/ip五层协议 socket

热门文章

  1. Educational Codeforces Round 69 D. Yet Another Subarray Problem
  2. c语言联合union的使用用途
  3. Objective-C Classes Are also Objects
  4. react hooks沉思录
  5. (转)虚拟文件系统(VFS)浅析
  6. ES6学习笔记--default,rest
  7. Nginx是什么及作用?
  8. new String(&quot;123&quot;) 创建了几个对象?
  9. html 复习(for循环不同内容的div)
  10. 反射调用异常InvocationTargetException和代理类抛出异常