oc cluster up timeout waiting for condition

11/25/2018

I am trying to setup openshift origin on my local Virtualbox centos 7.4. This is a all-in-one environment for study purpose only. I followed the exact document:

https://docs.okd.io/latest/getting_started/administrators.html

Method 1: Running in a container

I installed docker and when I am running the command it failed due to timeout:

[root@master openshift]# oc cluster up
Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3.11 is available ...
Checking type of volume mount ...
Determining server IP ...
Checking if OpenShift is already running ...
Checking for supported Docker version (=>1.22) ...
Checking if insecured registry is configured properly in Docker ...
Checking if required ports are available ...
Checking if OpenShift client is configured properly ...
Checking if image openshift/origin-control-plane:v3.11 is available ...
Starting OpenShift using openshift/origin-control-plane:v3.11 ...
I1125 22:16:31.799473   10736 flags.go:30] Running "create-kubelet-flags"
I1125 22:16:32.867498   10736 run_kubelet.go:49] Running "start-kubelet"
I1125 22:16:33.568909   10736 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
I1125 22:17:02.633369   10736 interface.go:26] Installing "kube-proxy" ...
I1125 22:17:02.633386   10736 interface.go:26] Installing "kube-dns" ...
I1125 22:17:02.633392   10736 interface.go:26] Installing "openshift-service-cert-signer-operator" ...
I1125 22:17:02.633397   10736 interface.go:26] Installing "openshift-apiserver" ...
I1125 22:17:02.633420   10736 apply_template.go:81] Installing "openshift-apiserver"
I1125 22:17:02.634511   10736 apply_template.go:81] Installing "kube-proxy"
I1125 22:17:02.635754   10736 apply_template.go:81] Installing "kube-dns"
I1125 22:17:02.635924   10736 apply_template.go:81] Installing "openshift-service-cert-signer-operator"
I1125 22:17:12.316042   10736 interface.go:41] Finished installing "kube-proxy" "kube-dns" "openshift-service-cert-signer-operator" "openshift-apiserver"
Error: timed out waiting for the condition


[root@master openshift]# oc version
oc v3.11.0+0cbc58b
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO
-- Terry Hu
kubernetes
openshift
openshift-origin

1 Answer

7/31/2019

I encountered this problem using minishift but the cause appears to be the same. You can try below steps and it shud be helpful.

Workaround which has worked for me :

Using hyperv + oc 3.11 + minishift v1.34.1+c2ff9cb. Problem only on not so good internet connections. Once minishift start command fails for the first time, ssh into minishift vm. Run oc cluster down followed by oc cluster up (copy this from the logs). Repeat this down/up step till your cluster is up. It could be 10-20 times or more or less depending on the network maybe. Once the cluster is up, run minishift stop/ start and then you will be ready. Hope this helps

-- user2599052
Source: StackOverflow