installer: Still waiting for the Kubernetes API: the server could not find the requested resource

Version

$ openshift-install version
./openshift-install unreleased-master-2361-g6a0eb9136b57a8e2609554b0eaeed3a3534e8cab
built from commit 6a0eb9136b57a8e2609554b0eaeed3a3534e8cab
release image registry.svc.ci.openshift.org/origin/release:4.3

Platform:

What happened?

I run “./installer/bin/openshift-install --dir install-dir create cluster” and can see the message: INFO Obtaining RHCOS image file from ‘https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.4/44.81.202001030903.0/x86_64/rhcos-44.81.202001030903.0-qemu.x86_64.qcow2.gz?sha256=a7931dc062f4dcd1f614e487bac8c53699d54c78c84caa7b528a52f6788b5504’ INFO The file was found in cache: /root/.cache/openshift-installer/image_cache/b9c268865d8b4d59ae24cb5ebdaee1b7. Reusing… INFO Creating infrastructure resources… INFO Waiting up to 30m0s for the Kubernetes API at https://api.mycluster.5u04.info:6443…

When I check with

racut:/# [ 1687.486884] ignition[1600]: GET https://api-int.mycluster.5u04.info:22623/config/master: attempt #269 [ 1687.494911] ignition[1600]: GET error: Get https://api-int.mycluster.5u04.info:22623/config/master: dial tcp: lookup api-int.mycluster.5u04.info on 192.168.126.1:53: dial udp 192.168.126.1:53: connect: network is unreachable exit[ 1692.487719] ignition[1600]: GET https://api-int.mycluster.5u04.info:22623/config/master: attempt #270 [ 1692.495112] ignition[1600]: GET error: Get https://api-int.mycluster.5u04.info:22623/config/master: dial tcp: lookup api-int.mycluster.5u04.info on 192.168.126.1:53: dial udp 192.168.126.1:53: connect: network is unreachable [ 1697.213307] dhclient[932]: DHCPREQUEST on ens3 to 192.168.126.1 port 67 (xid=0xe7408a54) [ 1697.218104] dhclient[932]: send_packet: Network is unreachable [ 1697.220282] dhclient[932]: send_packet: please consult README file regarding broadcast address. [ 1697.223543] dhclient[932]: dhclient.c:3099: Failed to send 300 byte long packet over fallback interface. [ 1697.489567] ignition[1600]: GET https://api-int.mycluster.5u04.info:22623/config/master: attempt #271 [ 1697.498060] ignition[1600]: GET error: Get https://api-int.mycluster.5u04.info:22623/config/master: dial tcp: lookup api-int.mycluster.5u04.info on 192.168.126.1:53: dial udp 192.168.126.1:53: connect: network is unreachable

#ping api.mycluster.5u04.info PING api.mycluster.5u04.info (192.168.126.10) 56(84) bytes of data. 64 bytes from api.mycluster.5u04.info (192.168.126.10): icmp_seq=1 ttl=64 time=0.147 ms 64 bytes from api.mycluster.5u04.info (192.168.126.10): icmp_seq=2 ttl=64 time=0.328 ms

ping is fine in my baremetal machine but I see “unreachable” error from VM continuously.

What you expected to happen?

Unrechearble error is removed.

How to reproduce it (as minimally and precisely as possible)?

All the time.

$ your-commands-here

Anything else we need to know?

As a result: INFO Obtaining RHCOS image file from ‘https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.4/44.81.202001030903.0/x86_64/rhcos-44.81.202001030903.0-qemu.x86_64.qcow2.gz?sha256=a7931dc062f4dcd1f614e487bac8c53699d54c78c84caa7b528a52f6788b5504’ INFO The file was found in cache: /root/.cache/openshift-installer/image_cache/b9c268865d8b4d59ae24cb5ebdaee1b7. Reusing… INFO Creating infrastructure resources… INFO Waiting up to 30m0s for the Kubernetes API at https://api.mycluster.5u04.info:6443… ERROR Attempted to gather ClusterOperator status after installation failure: listing ClusterOperator objects: the server could not find the requested resource (get clusteroperators.config.openshift.io) INFO Pulling debug logs from the bootstrap machine ERROR Attempted to gather debug logs after installation failure: failed to create SSH client, ensure the proper ssh key is in your keyring or specify with --key: dial tcp 185.53.177.30:22: connect: connection timed out FATAL Bootstrap failed to complete: waiting for Kubernetes API: context deadline exceeded

References

  • enter text here.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 35 (13 by maintainers)

Most upvoted comments

I finally got a running mini-cluster deployed on libvirt.

The Workaround with using OCP images was the key:

  1. Put every suggestion from https://github.com/openshift/installer/blob/master/docs/dev/libvirt/README.md in place
  2. Patch Installer source for RAM on bootstrap to 16GB (installer/pkg/asset/machines/libvirt/machines.go)
  3. Build the installer for libvirt and 4.3
  4. Set export OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE=quay.io/openshift-release-dev/ocp-release:4.3.1-x86_64 before running the installer.

A proper pull secret from RedHat has to be entered for usage of OCP images for install-config.

As a result i have a master and a worker running.

@thdevelthreesixtiy

thanks for the info on the error. I tried the ‘fcos’ suggestion-- saw there’s a branch in Git for that:

git clone https://github.com/openshift/installer.git -b 'fcos'

it seemed to get further and there is a bootstrap and master machine running in virsh and I can curl the API endpoint at port 6443 at the hostname (after adding it to /etc/hosts) but still am not able to connect fully.

hope that helps

@avidwriter: No - i am still stuck.

The issue is topic of several other tickets. Most of them marked closed with regard to using image override feature for OCP. For OKD @abhinavdahiya suggests using an “fcos branch” here: https://github.com/openshift/installer/issues/3030 I dont know of any “fcos branch”.

In https://github.com/openshift/installer/issues/3043 it seems that for OCP deplyoment is working with image override.

Other tickets with same issue: https://github.com/openshift/installer/issues/2856 https://github.com/openshift/os/issues/394

All of them indicate an problem with machine-config-operator during generation of ignition fpr master. Tweaking the template manually during installation is no solution. The rendering process itself seems to be the problem.