因为有客户需求,所以必须尝试一下,可悲的是手里只有3.7的离线安装文档,加上之前3.11安装因为同事文档写得太好,基本没遇到什么坑,所以就没仔细研究就开始搞了。
结果果然是因为/etc/ansible/host文件写得有问题,遇到一堆问题,包括:
- 镜像不ready,虽然都pull下来了,可是没仔细看文档,就save -o了文档中的那几个,所以就造成下面的错误,只好重新开始下载
One or more required container images are not available: openshift3/registry-console:v3.6, registry.example.com/openshift3/ose-deployer:v3.6.173.0.130, registry.example.com/openshift3/ose-docker-registry:v3.6.173.0.130, registry.example.com/openshift3/ose-haproxy-router:v3.6.173.0.130, registry.example.com/openshift3/ose-pod:v3.6.173.0.130 Checked with: skopeo inspect [--tls-verify=false] [--creds=<user>:<pass>] docker://<registry>/<image> Default registries searched: registry.example.com, registry.access.redhat.com Failed connecting to: registry.example.com, registry.access.redhat.com
- registry 443端口没配,学3.11安装配了个80以为可以绕信过关,结果就报错了
[root@master ~]# oc logs registry-console-1-deploy -n default --> Scaling registry-console-1 to 1 --> Waiting up to 10m0s for pods in rc registry-console-1 to become ready E1114 13:34:58.912499 1 reflector.go:304] github.com/openshift/origin/pkg/deploy/strategy/support/lifecycle.go:509: Failed to watch *api.Pod: Get https://172.30.0.1:443/api/v1/namespaces/default/pods?labelSelector=deployment%3Dregistry-console-1%2Cdeploymentconfig%3Dregistry-console%2Cname%3Dregistry-console&resourceVersion=1981&timeoutSeconds=412&watch=true: dial tcp 172.30.0.1:443: getsockopt: connection refused
- pull service-catalog的镜像出问题,这个是个大坑啊,每次一装就需要1个多钟头,错误如下
15m 13m 4 kubelet, master.example.com spec.containers{apiserver} Normal Pulling pulling image "registry.access.redhat.com/openshift3/ose-service-catalog:v3.6" 15m 13m 4 kubelet, master.example.com spec.containers{apiserver} Warning Failed Failed to pull image "registry.access.redhat.com/openshift3/ose-service-catalog:v3.6": rpc error: code = 2 desc = All endpoints blocked. 15m 13m 6 kubelet, master.example.com spec.containers{apiserver} Normal BackOff Back-off pulling image "registry.access.redhat.com/openshift3/ose-service-catalog:v3.6" 15m 4m 46 kubelet, master.example.com Warning FailedSync Error syncing pod
- master上安装docker找不到,大家都是配置同样的yum repository,后来只好通过联网方式的subscription-manager注册解决。
3.6不像3.11有一个Prequrest的check,这个直接安装上来,就需要一直等他是否出错的信息了,所以每次安装很长时间。
host文件的选项可以参考,踩坑必看啊。
https://docs.okd.io/3.6/install_config/install/advanced_install.html#enabling-service-catalog
虽然踩了不少坑,但对安装过程也有了进一步的了解,好吧,我只能这样安慰一下自己了。