How to Install Kubernetes on RHEL 7

Pull the RPMs

Enable or reposync the rhel-7-server-extras-rpms Yum repository

subscription-manager repos --enable=rhel-7-server-extras-rpms


reposync --repoid rhel-7-server-extras-rpms --arch=x86_64 --newest-only --download_path=/repo/
createrepo /repo/rhel-7-server-extras-rpms
find /repo/rhel7-server-extras-rpm -type f -exec chmod 644 {} \;
find /repo/rhel7-server-extras-rpm -type d -exec chmod 755 {} \;

Install Dependencies (Docker, Git, Go, Mercurial)

yum install docker, git, golang, mercurial
systemctl enable docker
systemctl start docker

Download & Install etcd

cd /opt
git clone
cd /opt/etcd/
ln -s /opt/etcd/bin/etcd /usr/local/bin/

Download godep

cd /opt
GOPATH=/opt/godep go get
ln -s /opt/godep/bin/godep /usr/local/bin/

Download Kubernetes

cd /opt
git clone

Note: If your RHEL7 machine is not registered with the Red Hat network, you may get an error in your logs saying /usr/share/rhel/secrets/rhel7.repo is not found. The workaround is to create the file as follows:

touch /usr/share/rhel/secrets/rhel7.repo

Start Kubernetes


Show what’s running in Kubernetes (nothing yet!)

Tell the client where the server is running

sed -i -e ’s/^KUBERNETES_PROVIDER.*$/KUBERNETES_PROVIDER=“local”/’ /opt/kubernetes/cluster/

List pods:

/opt/kubernetes/cluster/ list /pods

List services:

/opt/kubernetes/cluster/ list /services

List Replication Controllers:

/opt/kubernetes/cluster/ list /replicationControllers

Once you have this up and running, try deploying the GuestBook example: