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.

  1. Start a cluster as follows:

    minishift config set cpus 4
    minishift config set memory 8192
    minishift config set vm-driver virtualbox
    minishift start --openshift-version v3.11.0
    minikube start --cpus 4 --memory 8192 --kubernetes-version=1.15.6
    Specify Kubernetes version

    You 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.

  2. 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

    eval $(minishift docker-env)
    eval $(minishift oc-env)
    oc login -u system:admin
    oc adm policy add-cluster-role-to-user cluster-admin developer
    eval $(minikube docker-env)
  3. View your local cluster:

    oc get nodes
    kubectl get nodes
  4. Open the dashboard using the following command:

    minishift dashboard
    minikube dashboard

If you want to clean up or start over, you can delete the entire cluster:

minishift delete
minikube delete


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