我正在尝试在 AWS EC2 上创建一个带有 minishift 的 OpenShift 集群。
执行以下命令时,会发生错误并停止构建。
$ ./minishift start --vm-driver generic --remote-ipaddress <remote_IP_address> --remote-ssh-user <username> --remote-ssh-key <private_ssh_key>
-- Starting profile 'minishift'
-- Checking if provided oc flags are supported ... OK
-- Starting the OpenShift cluster using 'generic' hypervisor ...
-- Preparing Remote Machine ......................................... OK
-- Starting to provision the remote machine ........... FAIL E1110 12:30:16.999357 2234 start.go:491] Error starting the VM: Error starting stopped host: generic driver does not support start. Retrying.
Error starting the VM: Error starting stopped host: generic driver does not support start
版本:
$ ./minishift version
minishift v1.26.1+1e20f27
参考: https ://docs.okd.io/latest/minishift/using/run-against-an-existing-machine.html
在 minishift 上v1.27.0+707887e
,发生另一个错误。
(在执行以下minishift start
命令之前,remote user
必须属于docker
group。)
$ minishift start --vm-driver generic --remote-ipaddress 18.233.158.63 --remote-ssh-user centos --remote-ssh-key /home/vagrant/.ssh/id_rsa
-- Starting profile 'minishift'
-- Checking if provided oc flags are supported ... OK
-- Starting the OpenShift cluster using 'generic' hypervisor ...
-- Preparing Remote Machine ...... OK
-- Starting to provision the remote machine .................... OK
-- OpenShift cluster will be configured with ...
Version: v3.11.0
-- Pulling the OpenShift Container Image ......... OK
-- Copying oc binary from the OpenShift container image to VM ... OK
-- Starting OpenShift cluster ......................................................................Error during 'cluster up' execution: Error starting the cluster. ssh command error:
command : /var/lib/minishift/bin/oc cluster up --base-dir /var/lib/minishift/base --image 'openshift/origin-${component}:v3.11.0' --public-hostname 18.233.158.63 --routing-suffix 18.233.158.63.nip.io
err : exit status 1
output : Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3.11.0 is available ...
Pulling image openshift/origin-cli:v3.11.0
E1115 03:45:41.309220 11696 helper.go:173] Reading docker config from /home/centos/.docker/config.json failed: open /home/centos/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-cli:v3.11.0 anonymously
Image pull complete
Pulling image openshift/origin-node:v3.11.0
E1115 03:45:41.480331 11696 helper.go:173] Reading docker config from /home/centos/.docker/config.json failed: open /home/centos/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-node:v3.11.0 anonymously
Pulled 6/6 layers, 100% complete
Extracting
Image pull complete
Checking type of volume mount ...
Determining server IP ...
Using public hostname IP 18.233.158.63 as the host 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.0 is available ...
Starting OpenShift using openshift/origin-control-plane:v3.11.0 ...
I1115 03:45:47.686207 11696 config.go:40] Running "create-master-config"
I1115 03:45:50.350386 11696 config.go:46] Running "create-node-config"
I1115 03:45:51.702066 11696 flags.go:30] Running "create-kubelet-flags"
I1115 03:45:52.085289 11696 run_kubelet.go:49] Running "start-kubelet"
I1115 03:45:52.249024 11696 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
I1115 03:46:20.265246 11696 interface.go:26] Installing "kube-proxy" ...
I1115 03:46:20.265835 11696 interface.go:26] Installing "kube-dns" ...
I1115 03:46:20.265843 11696 interface.go:26] Installing "openshift-service-cert-signer-operator" ...
I1115 03:46:20.265849 11696 interface.go:26] Installing "openshift-apiserver" ...
I1115 03:46:20.265897 11696 apply_template.go:81] Installing "openshift-apiserver"
I1115 03:46:20.266386 11696 apply_template.go:81] Installing "kube-proxy"
I1115 03:46:20.268284 11696 apply_template.go:81] Installing "kube-dns"
I1115 03:46:20.268428 11696 apply_template.go:81] Installing "openshift-service-cert-signer-operator"
I1115 03:46:23.999620 11696 interface.go:41] Finished installing "kube-proxy" "kube-dns" "openshift-service-cert-signer-operator" "openshift-apiserver"
Error: timed out waiting for the condition