Deploy kubernetes on CentOS 7.x/ppc64le with Flannel

If we want to deploy a multi-node kubernetes on CentOS 7.x with flannel on x86, then we can follow the steps in this blog.

Below are the steps to add a CentOS 7.x/ppc64le as a kubernetes node.

Installation Steps

1) Configure yum repo for the required packages

sudo vi /etc/yum.repos.d/docker.repo
[docker]
name=Docker
baseurl=http://ftp.unicamp.br/pub/ppc64el/rhel/7_1/docker-ppc64el/
enabled=1
gpgcheck=0

sudo vi /etc/yum.repos.d/docker-misc.repo
[docker-misc]
name=Docker
baseurl=http://ftp.unicamp.br/pub/ppc64el/rhel/7_1/misc_ppc64el/
enabled=1
gpgcheck=0

sudo vi /etc/yum.repos.d/at.repo
[at]
name=IBM Advanced Toolchain
baseurl=ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/redhat/RHEL7/
enabled=1
gpgcheck=0

2) Update the system and install ntpd as well

sudo yum update -y
sudo yum install ntp -y
sudo systemctl start ntpd

3) Install docker

sudo yum install docker-io -y

sudo mkdir -p /etc/systemd/system/docker.service.d
sudo vi /etc/systemd/system/docker.service.d/override.conf
[Service] 
ExecStart= 
ExecStart=/usr/bin/docker daemon --storage-driver=overlay $DOCKER_NETWORK_OPTIONS -H fd://

sudo systemctl daemon-reload
sudo systemctl enable docker

4) Install flannel

sudo yum install advance-toolchain-at9.0-devel -y
sudo yum install flannel -y

sudo vi /etc/sysconfig/flanneld
 FLANNEL_ETCD="http://<k8s-master>:2379"

sudo systemctl enable flanneld
sudo systemctl start flanneld
sudo systemctl start docker

Here we must install advance-toolchain explicitly, otherwise flanneld won’t start.

5) Install kubernetes node

sudo yum install kubernetes-node -y
sudo vi /etc/kubernetes/config
 KUBE_MASTER="--master=http://<k8s-master>:8080"

sudo vi /etc/kubernetes/kubelet

# You may leave this blank to use the actual hostname
 KUBELET_HOSTNAME=""

# location of the api-server
 KUBELET_API_SERVERS="--api_servers=http://<k8s-master>:8080"

6) Start and enabled all the services.

for SERVICES in kube-proxy kubelet; do
    sudo systemctl restart $SERVICES
    sudo systemctl enable $SERVICES
done

Verify that kubernetes node is correctly installed on CentOS 7.x/ppc64le

From your kubernetes master node, run

kubectl get nodes

And check that your centos 7.x/ppc64le host is listed in Ready status.

Sample output:

[centos@mengxd-master ~]$ kubectl get nodes
NAME           STATUS     AGE
mengxd-node1   Ready      13d
mengxd-node2   Ready      43s

 

References

[1] http://sudhaker.com/41/multi-node-kubernetes-on-centos-7-x-with-flannel

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s