Preparing a CentOS or RHEL 7 system for running Platform9 Managed Kubernetes

Before you can run Platform9 Managed Kubernetes, you must prepare your CentOS or RHEL machine for it.

Read through and follow the general requirements checklist related to the memory and networking prerequisites for Platform9 Managed Kubernetes.

Once the prerequisites are met, follow the steps given below to prepare your CentOS or RHEL 7 host ready for Platform9 Managed Kubernetes.

  1. Disable incompatible services
  2. Prepare Docker storage

Let us look at each of the aforementioned steps in detail.

Disable Incompatible Services

Network applications should be uninstalled or disabled because they can interfere with Docker and Kubernetes networking services.

The firewalld service must be disabled. There is a known incompatibility between firewalld and Docker's use of iptables, and it is documented at https://github.com/docker/docker/issues/16137.

Run the following command to disable firewalld.

systemctl stop firewalld
systemctl disable firewalld

Prepare Docker Storage

Follow the steps given below to prepare Docker storage.

  1. Choose a free block device, or create a new block device.
  2. Create an LVM thin pool.

Let us look at each of the aforementioned steps in detail.

Choose Block Device or Create Block Device

On CentOS/RHEL 7, Docker uses the devicemapper storage driver, by default, to manage container images and disk layers. For production, the storage driver must be configured to use direct-lvm mode (The loop-lvm mode is acceptable for testing, but is not supported for production deployments). The direct-lvm mode requires one free block device (a disk or a partition).

If a free block device is available, note the path of the block device, e.g., /dev/sdb for a disk, /dev/sdc1 for a partition.

If a free block device is not available, create a new block device, then note the block device path. You can attach a new disk, or create a new partition. The block device should be at least 40 GB in size. Attaching a new disk is outside the scope of these instructions. To create a new partition, use fdisk (man 8 fdisk). Set the partition type to 8e (Linux LVM). See http://tldp.org/HOWTO/Partition/fdisk_partitioning.html for detailed information on fdisk.

Create LVM thin pool

Follow the steps given below to create an LVM thin pool.

  1. Ensure that LVM is installed on the host by running the following command.
    yum list installed lvm2

    The lvm2 package should be listed as installed. If it is not installed, run the following command to install the lvm2 package.

    yum install lvm2
  2. Download the bash script to create an LVM thin pool from GitHub by running the following command.
    wget https://raw.githubusercontent.com/platform9/support-locker/master/pmk/bd2tp.sh 
  3. Change the file permissions of the downloaded shell script so that it can be run.
    chmod +x bd2tp.sh
  4. Run the downloaded bash script with the path of the free block device chosen or created above and the name of the volume group.
    ./bd2tp.sh <block_device_name> <volume_group_name>

May 06, 2016