Maintaining the Red Hat Container Development Kit on Fedora

Here's a set of instructions for running the Red Hat CDK (local OpenShift instance) on Fedora, from someone who uses it almost every day.

Virtualization Environment

The Red Hat Container Development Kit (based on Minishift) is compatible with several virtualization architectures. For Fedora, I use KVM.

Make sure virtualization is enabled

If the following command returns some matches, you should be good.
$ cat /proc/cpuinfo | egrep "vmx|svm"

If you see no output, you may need to enable virtualization in your BIOS (procedures vary depending on your machine).

Install virtualization packages

$ sudo dnf install libvirt qemu-kvm

Start and enable libvirtd

$ sudo systemctl start libvirtd
$ sudo systemctl enable libvirtd

Minishift Environment


Download the CDK


The file that you downloaded is the minishift binary, not an installer. There's nothing to unpack or unarchive or anything like that. The goal is just to get it onto your path so you can issue minishift ... commands. Here's what I do:

Make a directory wherever you like to install software. I like to put vendor software in /opt so for me:
$ sudo mkdir /opt/cdk

Move the downloaded Minishift binary into that directory, for example:
$ sudo mv ~/Downloads/cdk-3.8.0-2-minishift-linux-amd64 /opt/cdk/

Make sure it's executable:
$ sudo chmod +x /opt/cdk/cdk-3.8.0-2-minishift-linux-amd64

Make a symlink called minishift in the same directory and point to the CDK binary:
$ sudo ln -sfn /opt/cdk/cdk-3.8.0-2-minishift-linux-amd64 /opt/cdk/minishift

Make sure we're good so far:

$ /opt/cdk/minishift version
minishift v1.31.0+d06603e
CDK v3.8.0-2

Why symlink? I can manage multiple versions in /opt/cdk and point to the one I want to use. If it feels over-the-top for you, no worries, just rename the Minishift binary to minishift.

Next, add the /opt/cdk directory to your path (permanently):
echo 'export PATH=$PATH:/opt/cdk' >> ~/.bashrc
source ~/.bashrc

And test:

$ minishift version
minishift v1.31.0+d06603e
CDK v3.8.0-2

$ minishift setup-cdk


Start minishift with:
$ minishift start

I usually allocate resources with --cpus and --memory flags.
$ minishift start --cpus 3 --memory 10

And I often need to specify an OpenShift version with the --ocp-tag flag.
$ minishift start --openshift-version 3.11.104 --cpus 3 --memory 10G

When you start Minishift it will ask you for your Red Hat credentials to subscribe your cluster instance.


Point to the specific oc client version automatically downloaded by Minishift to your machine.
$ eval $(minishift oc-env)

Now you should be able to log in with full cluster privileges:
$ oc login -u system:admin

comments powered by Disqus