Run Minishift/Minikube
You need a running cluster to perform the remaining configuration steps, such as initializing Helm and running the Console install script.
Running Minishift or Minikube
The following procedures describe how to start a cluster, modify the environment, and start the Kubernetes dashboard.
-
Start a cluster as follows:
- Minishift
-
minishift config set cpus 4 minishift config set memory 8192 minishift config set vm-driver virtualbox minishift start --openshift-version v3.11.0
- Minikube
-
minikube start --cpus 4 --memory 8192 --kubernetes-version=1.15.6
Specify Kubernetes versionYou must use a Kubernetes version that is within the range of supported versions. Check the documentation of your container platform provider to see what version of Kubernetes they support and how to specify it.
-
Once the cluster is running, set the Docker environment in your command window. Minishift has additional parameters for
oc
access. See Troubleshooting permissions on Minishift- Minishift
-
eval $(minishift docker-env) eval $(minishift oc-env) oc login -u system:admin oc adm policy add-cluster-role-to-user cluster-admin developer
- Minikube
-
eval $(minikube docker-env)
-
View your local cluster:
- Minishift
-
oc get nodes
- Minikube
-
kubectl get nodes
-
Open the dashboard using the following command:
- Minishift
-
minishift dashboard
- Minikube
-
minikube dashboard
If you want to clean up or start over, you can delete the entire cluster:
- Minishift
-
minishift delete
- Minikube
-
minikube delete
Troubleshooting
Minikube start problem
On the mac, if you see the following error when running minikube start
Creating hyperkit VM (CPUs=4, Memory=8192MB, Disk=20000MB) ...
Retriable failure: create: Error creating machine: Error in driver during machine creation: hyperkit crashed! command line:
hyperkit loglevel=3 console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes random.trust_cpu=on hw_rng_model=virtio base host=minikube
Deleting "minikube" in hyperkit ...
This means that minikube uses hyperkit as default vm driver instead of virtualbox, and something went wrong.
Solution 1
Use virtualbox instead of hyperkit. Please add parameter --vm-driver=virtualbox
in minikube start command.
Solution 2
Check if hyperkit version is too old by command line hyperkit version
If the version is less then 0.20190802
, please upgrade it with the following commands.
brew uninstall hyperkit
rm $(which hyperkit)
brew install hyperkit
hyperkit -v
permissions on Minishift
More information on Minishift can be found here
Note: If you have trouble logging in as system:admin
, you can try logging in as user/developer
and then try to log in as system:admin
, if the problem persists, delete minishift and create a new cluster.
You can also provide cluster-admin
privileges to user developer by executing the following command.
oc adm policy add-cluster-role-to-user cluster-admin developer