minishift安装

时间:2024-10-26 17:05:08

先下载安装包

https://github.com/minishift/minishift/releases

mac上运行命令

minishift start --vm-driver=virtualbox --registry-mirror=https://docker.mirrors.ustc.edu.cn

运行中会下载一个iso镜像,如果比较慢,就手工下载下来,然后放到相关用户的.minishift相应路径下

我的是 /Users/ericnie/.minishift/cache/iso/centos/v1.12.0

minishift安装

加入path路径后,然后通过

ericdeMacBook-Pro:v1.12.0 ericnie$ minishift start --vm-driver virtualbox
-- Starting profile 'minishift'
-- Check if deprecated options are used ... OK
-- Checking if https://github.com is reachable ... OK
-- Checking if requested OpenShift version 'v3.10.0' is valid ... OK
-- Checking if requested OpenShift version 'v3.10.0' is supported ... OK
-- Checking if requested hypervisor 'virtualbox' is supported on this platform ... OK
-- Checking if VirtualBox is installed ... OK
-- Checking the ISO URL ... OK
-- Checking if provided oc flags are supported ... OK
-- Starting the OpenShift cluster using 'virtualbox' hypervisor ...
-- Starting Minishift VM ......................... OK
-- Checking for IP address ... OK
-- Checking for nameservers ... OK
-- Checking if external host is reachable from the Minishift VM ...
Pinging 8.8.8.8 ... FAIL
VM is unable to ping external host
-- Checking HTTP connectivity from the VM ...
Retrieving http://minishift.io/index.html ... OK
-- Checking if persistent storage volume is mounted ... OK
-- Checking available disk space ... % used OK
-- OpenShift cluster will be configured with ...
Version: v3.10.0
-- Copying oc binary from the OpenShift container image to VM ... OK
-- Starting OpenShift cluster ................................
Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3. is available ...
Checking type of volume mount ...
Determining server IP ...
Using public hostname IP 192.168.99.100 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. is available ...
Starting OpenShift using openshift/origin-control-plane:v3. ...
I0924 ::47.549769 flags.go:] Running "create-kubelet-flags"
I0924 ::48.749646 run_kubelet.go:] Running "start-kubelet"
I0924 ::49.070376 run_self_hosted.go:] Waiting for the kube-apiserver to be ready ...
I0924 ::12.245945 interface.go:] Installing "kube-proxy" ...
I0924 ::12.246519 interface.go:] Installing "kube-dns" ...
I0924 ::12.246529 interface.go:] Installing "openshift-apiserver" ...
I0924 ::12.246570 apply_template.go:] Installing "openshift-apiserver"
I0924 ::12.248961 apply_template.go:] Installing "kube-proxy"
I0924 ::12.250870 apply_template.go:] Installing "kube-dns"
I0924 ::21.826217 interface.go:] Finished installing "kube-proxy" "kube-dns" "openshift-apiserver"
I0924 ::05.262675 run_self_hosted.go:] openshift-apiserver available
I0924 ::05.263334 interface.go:] Installing "openshift-controller-manager" ...
I0924 ::05.263358 apply_template.go:] Installing "openshift-controller-manager"
I0924 ::08.089585 interface.go:] Finished installing "openshift-controller-manager"
Adding default OAuthClient redirect URIs ...
Adding router ...
Adding web-console ...
Adding centos-imagestreams ...
Adding registry ...
Adding sample-templates ...
Adding persistent-volumes ...
I0924 ::08.109483 interface.go:] Installing "openshift-router" ...
I0924 ::08.109517 interface.go:] Installing "openshift-web-console-operator" ...
I0924 ::08.109527 interface.go:] Installing "centos-imagestreams" ...
I0924 ::08.109535 interface.go:] Installing "openshift-image-registry" ...
I0924 ::08.109542 interface.go:] Installing "sample-templates" ...
I0924 ::08.109549 interface.go:] Installing "persistent-volumes" ...
I0924 ::08.113860 apply_list.go:] Installing "centos-imagestreams"
I0924 ::08.115257 apply_template.go:] Installing "openshift-web-console-operator"
I0924 ::08.117497 interface.go:] Installing "sample-templates/postgresql" ...
I0924 ::08.117517 interface.go:] Installing "sample-templates/cakephp quickstart" ...
I0924 ::08.117529 interface.go:] Installing "sample-templates/dancer quickstart" ...
I0924 ::08.117540 interface.go:] Installing "sample-templates/django quickstart" ...
I0924 ::08.117554 interface.go:] Installing "sample-templates/sample pipeline" ...
I0924 ::08.117564 interface.go:] Installing "sample-templates/mongodb" ...
I0924 ::08.117573 interface.go:] Installing "sample-templates/mysql" ...
I0924 ::08.117583 interface.go:] Installing "sample-templates/rails quickstart" ...
I0924 ::08.117596 interface.go:] Installing "sample-templates/jenkins pipeline ephemeral" ...
I0924 ::08.117606 interface.go:] Installing "sample-templates/mariadb" ...
I0924 ::08.117616 interface.go:] Installing "sample-templates/nodejs quickstart" ...
I0924 ::08.117730 apply_list.go:] Installing "sample-templates/nodejs quickstart"
I0924 ::08.118007 apply_list.go:] Installing "sample-templates/postgresql"
I0924 ::08.118198 apply_list.go:] Installing "sample-templates/cakephp quickstart"
I0924 ::08.118422 apply_list.go:] Installing "sample-templates/dancer quickstart"
I0924 ::08.118483 apply_list.go:] Installing "sample-templates/django quickstart"
I0924 ::08.119167 apply_list.go:] Installing "sample-templates/sample pipeline"
I0924 ::08.119756 apply_list.go:] Installing "sample-templates/mongodb"
I0924 ::08.168681 apply_list.go:] Installing "sample-templates/mysql"
I0924 ::08.169096 apply_list.go:] Installing "sample-templates/rails quickstart"
I0924 ::08.169257 apply_list.go:] Installing "sample-templates/jenkins pipeline ephemeral"
I0924 ::08.169400 apply_list.go:] Installing "sample-templates/mariadb"
I0924 ::20.746839 interface.go:] Finished installing "sample-templates/postgresql" "sample-templates/cakephp quickstart" "sample-templates/dancer quickstart" "sample-templates/django quickstart" "sample-templates/sample pipeline" "sample-templates/mongodb" "sample-templates/mysql" "sample-templates/rails quickstart" "sample-templates/jenkins pipeline ephemeral" "sample-templates/mariadb" "sample-templates/nodejs quickstart"
I0924 ::20.746863 interface.go:] Finished installing "openshift-router" "openshift-web-console-operator" "centos-imagestreams" "openshift-image-registry" "sample-templates" "persistent-volumes"
Server Information ...
OpenShift server started. The server is accessible via web console at:
https://192.168.99.100:8443

运行oc-env命令,将路径加到path中

ericdeMacBook-Pro:v1.12.0 ericnie$ minishift oc-env
export PATH="/Users/ericnie/.minishift/cache/oc/v3.10.0/darwin:$PATH"
# Run this command to configure your shell:
# eval $(minishift oc-env)

然后就可以愉快的玩耍了......