Red Hat CDK Red Hat Container Development Kit

Red Hat Container Development Kit (CDK) provides a single-node Red Hat OpenShift cluster designed to assist with containerized application development. This environment is like a production OpenShift environment, but it is designed to work on a single user's computer. For this purpose, CDK runs Red Hat Enterprise Linux and Red Hat OpenShift Container Platform in a virtual machine.

Follow these steps to install CDK 3.4 on Fedora 28:

  1. Set up the virtualization environment.
  2. Install and configure CDK.
  3. Start CDK.

Below are details for performing these steps.

Set Up the Virtualization Environment

CDK requires Kernel-based Virtual Machine (KVM)/ libvirt virtualization technology and the KVM Docker Machine driver plug-in. Perform the following steps to download and configure the required components.

1. Download the KVM driver plug-in and make it executable:

$ sudo curl -L -o /usr/local/bin/docker-machine-driver-kvm
$ sudo chmod +x /usr/local/bin/docker-machine-driver-kvm

2. Install KVM/libvirt:

$ sudo dnf install libvirt qemu-kvm

3. Add yourself to the libvirt group:

$ sudo usermod -a -G libvirt ${USER}

4. Update your user session to apply the group change:

$ newgrp libvirt

5. Launch libvirtd and configure it to start at boot:

$ sudo systemctl start libvirtd
$ sudo systemctl enable libvirtd

Install and Configure CDK

1. Download CDK for Linux.

Note: The following steps assume that CDK is placed in the ~/Downloads directory. The file should be named ~/Downloads/cdk-3.4.0-2-minishift-linux-amd64.

2. Create the ~/bin directory and copy CDK to it:

$ mkdir -p ~/bin
$ cp ~/Downloads/cdk-3.4.0-2-minishift-linux-amd64 ~/bin/minishift
$ chmod +x ~/bin/minishift

Note: The ~/bin directory should already be in your $PATH. You may use another directory of your choice, but we recommend placing minishift in your $PATH. If that is not possible, you can run it as ./minishift from the directory containing minishift.

3. Set up CDK:

$ minishift setup-cdk

Note: This will create the directory ~/.minishift. This directory includes the virtual machine image and related configuration files.

Start CDK

1. You must start CDK using the minishift binary.

Register the virtual machine running Red Hat Enterprise Linux:

Note: Replace $RED_HAT_USERNAME and $RED_HAT_PASSWORD with the credentials you use to install other Red Hat Enterprise Linux systems.

$ echo "export MINISHIFT_USERNAME=\"$MINISHIFT_USERNAME\"" >> ~/.bashrc
$ echo "export MINISHIFT_PASSWORD=\"$MINISHIFT_PASSWORD\"" >> ~/.bashrc

2. Start CDK:

$ minishift start

3. Verify that CDK is running:

$ minishift status

Congratulations, CDK is now running on your Fedora 28 system!

See the CDK Getting Started Guide for more information about using CDK.

Last updated: December 1, 2023