Monday, November 12, 2018

How to install MapR Data Fabric for Kubernetes(KDF) on Kubernetes Cluster


This article explains the steps in details on how to install MapR Data Fabric for Kubernetes(KDF) on Kubernetes Cluster.


CentOS 7.4
4 Nodes(v1 to v4, and v1 will be the master node for Kubernetes Cluster):
  • xx.xx.xx.41 v1
  • xx.xx.xx.42 v2
  • xx.xx.xx.43 v3
  • xx.xx.xx.44 v4
Kubernetes v1.12.2
Docker 18.06.1-ce
MapR Data Fabric for Kubernetes(KDF) v1.0.2


Before following below steps, please follow How to install a Kubernetes Cluster on CentOS 7 to install a Kubernetes Cluster firstly.
Below are several reference links to be read firstly as well:
  • Concept and Architecture of KDF:
  • KDF YAML file Download location:
  • KDF Installation Documentation:

1. Download the KDF YAML files


2. Create mapr-system namespace

kubectl create -f kdf-namespace.yaml

$ kubectl get namespace|grep -i mapr
mapr-system   Active   6h21m

3. Install RBAC file

kubectl create -f kdf-rbac.yaml
In this YAML file, it will complete below tasks in namespace "mapr-system":
  • Create a Service Account named "maprkdf".
  • Create a Cluster Role named "mapr:kdf" with several privileges.
  • Create a ClusterRoleBinding named "kdf" to assign Cluster Role "mapr:kdf" to Service Account "maprkdf".
$ kubectl get serviceaccount -n mapr-system |grep -i mapr
maprkdf        1         66s

$ kubectl get clusterroles |grep -i mapr
mapr:kdf                                                               4m45s

$ kubectl describe clusterrolebinding mapr:kdf
Name:         mapr:kdf
Labels:       <none>
Annotations:  <none>
  Kind:  ClusterRole
  Name:  mapr:kdf
  Kind            Name     Namespace
  ----            ----     ---------
  ServiceAccount  maprkdf  mapr-system

4. Create MapR KDF plugin

We need to modify the "kdf-plugin-centos.yaml" to change the IP:PORT of the kubernetes API server.
You can find the IP:PORT of the kubernetes API server by running below command:
$ kubectl config view|grep -i server
    server: https://xx.xx.xx.41:6443
Then change below part of the "kdf-plugin-centos.yaml":
            value: "changeme!:6443"
            value: "xx.xx.xx.41:6443"
And then create the MapR KDF plugin:
kubectl create -f kdf-plugin-centos.yaml
In this YAML file, basically it creates a DaemonSet named "mapr-kdfplugin" running a container named "mapr-kdfplugin" on all nodes of the Kubernetes Cluster.
A DaemonSet ensures that all (or some) Nodes run a copy of a Pod.
$ kubectl get pods -n mapr-system -o wide
NAME                   READY   STATUS    RESTARTS   AGE   IP            NODE         NOMINATED NODE
mapr-kdfplugin-hbv4f   1/1     Running   0          93s   <none>
mapr-kdfplugin-hkwll   1/1     Running   0          93s   <none>
mapr-kdfplugin-lvg2z   1/1     Running   0          93s   <none>
mapr-kdfplugin-zkqbt   1/1     Running   0          93s   <none>

5. Create provisioner

kubectl create -f kdf-provisioner.yaml
In this YAML file, it creates a Deployment named "mapr-kdfprovisioner" in namespace "mapr-system".
This Deployment will run a container named "mapr-kdfprovisioner".
$ kubectl get pods -n mapr-system -o wide|grep -i provisioner
mapr-kdfprovisioner-c49954679-vgbjx   1/1     Running   0          70s   <none>

Then next steps are following documentation on how to use KDF:

No comments:

Post a Comment

Popular Posts