Search code examples
openshiftokd

OKD: After Creating Persistent Memory for a Cluster image registry not reachable


My Cluster Setup:

Baremetal OKD 4.15

1 Bootstrap : Fedora CoreOS 4CPU 16 RAM 120 GIB Storage 192.168.4.x
3 Control : Fedora CoreOS 4CPU 16 RAM 120 GIB Storage 192.168.4.x
2 Compute : Fedora CoreOS 4CPU 16 RAM 120 GIB Storage 192.168.4.x
1 Service : CENTOS 09 4CPU 16 RAM 100 GIB Storage 192.168.4.x

Its Setup with Proxmox via VAN. Every node can reach other nodes via DNS. A haproxy is working as LoadBalancer at the Service Node. The Web Console ist active and the Cluster in a green state.

Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+ (etc...)
error:failed to ping registry https://image-registry.openshift-image-registry.svc:5000: Get "https://image-registry.openshift-image-registry.svc:5000/": dial tcp 172.30.252.81:5000: connect: connection refused...

I cannot get a route via oc get route -n openshift-image-registry but i can see other created Project Pods with that command. So it only seems that i cannot reach the specific image registry POD for the persistent memory. Is there anything else i can do to pinpoint the Problem?

I created a persistent memory with an NFS Server on the Service Machine which is already in a "bound" State. It is managed and claimed.

When i set the image registry operator to managed und claimed an image-pruner-xxxx-xpssn Pod starts and throws errors like seen above.


Solution

  • So in this case i solved the Problem. While the error message itself does not say very much (at least to me) it hints that something is wrong with the image-registry of the OKD Cluster. This Error first appeared after i setup up an nfs-Server on my Service Node to create a PV for the image registry. I did two things wrong:

    • Giving the the wrong permissions to the PV-DNS Directory. Without the correct permissions OKD will throw an error when it tries to reach the image-registry.

    • Setting the PV Path in the exports wrong. I put it like (var/nfsshare/PVfile) not (var/nfsshare)

    I also manually changed the image registry operator to claim the PV via oc edit configs.imageregistry.operator.openshift.io. This is a bit tedious and typos can break things really fast. I later found out that i can do the same stuff via Web Console of OKD (Claiming and Creating PV and mount them) and avoid some trouble.