The CDK 3 Beta release introduces Minishift - a CLI tool that helps you run the OpenShift Container Platform locally by launching a single-node OpenShift cluster on top of a RHEL7 virtual machine.
CDK 3 addresses a lot of usability issues we had with CDK 2.x. We aim to provide an improved user experience with CDK 3.
What has changed between CDK 2.x and CDK 3 :
In CDK 3 we changed the following technologies to make the installation steps simpler and easier as compared to CDK 2.4 and earlier:
- CDK 3 is not based on Vagrant but it is a single native binary i.e. minishift.
- CDK 3 supports native hypervisors i.e. KVM on RHEL, Xhyve on OS X and HyperV on Microsoft Windows 10
Overview of CDK 3 Beta
CDK 3 consists of three main components namely Minishift CLI, a RHEL 7 ISO and the OpenShift oc
CLI. To improve user experience, we packaged all the three components together into the minishift binary. You just need to run a single command to unpack everything (as mentioned below)
Minishift is a fork of the Minikube project and uses libmachine to interact with the underlying virtualization software. It also uses OpenShift’s “cluster up” functionality for provisioning the local OCP cluster (version v3.4.1.2).
In order to run CDK 3 you will need to install a hypervisor. At the moment, KVM, Virtualbox, Xhyve and HyperV are the supported hypervisors.
Note: The CDK 3 Beta provisions an instance of the Red Hat OpenShift Container Platform, version 3.
Prerequisites:
- Install a Minishift supported hypervisor on your operating system.
- Refer to the prerequisites in the Minishift upstream documentation for further information.
- If you plan to use Xhyve on OS X or KVM on RHEL, you need to install an additional driver. Refer to these steps for driver installation.
Installation steps :
-
- Download the minishift binary to your workstation from https://developers.redhat.com/products/cdk/download/.
- Rename the downloaded binary to minishift.exe for Windows, minishift for GNU/Linux and OS X.
- (Optional) Add the binary to your environment path.
- Make sure the minishift binary has executable permissions.
- Run the following command to do the required setup.
-
$ ./minishift setup-cdk
- This command will extract and put the ISO and the `oc` binary in the ~/.minishift/cache directory and create the configuration file with defaults for properties along with the cdk marker file in ~/.minishift/cdk.
-
- (Optional) Review and change the default configuration properties as needed
- View the created configuration file:
-
$ ./minishift config view
-
- Use the ‘minishift config set’ command to change default values for properties such as the memory, CPU or vm-driver. For example, if you want to allocate a specific number of CPUs to the virtual machine:
-
$ ./minishift config set cpus 2
-
- You can also use flags e.g. --cpus , --memory with minishift start command. Check the usage of the minishift start command for details.
- View the created configuration file:
Running CDK 3 Beta :
Important: You need a Red Hat subscription (such as a Red Hat developer subscription) to run the CDK.
Run the CDK 3 with the following command:
$ ./minishift --username <RHN_Username> --password <RHN_Password> start
Red Hat subscription credentials can either be passed via the environment variables MINISHIFT_USERNAME and MINISHIFT_PASSWORD or the --username and --password flags.
For detailed documentation please refer to the upstream Minishift documentation.
The CDK 3 Beta is at the moment not on par in terms of features with the CDK 2.4. The following features are still in progress for the next GA release:
- Exposing OpenShift registry as a local docker registry
- Host directory mount to the virtual machine
Feedback:
We would love to get your feedback. The Red Hat Container Tools mailing list is open to all. Please try the CDK 3 Beta and send us your feedback on the container-tools at redhat.com mailing list.
Community:
The Minishift community hangs out on the IRC channel #minishift (https://freenode.net). You are welcome to join, participate in the discussions, and contribute.
Resources:
Last updated: February 11, 2024