The information to bring Gluster into kubernetes was kind of scattered among few repos and we noticed few concerns on lagging single place to look into! it made the launch of new repo under gluster github account called “glusterfs-kubernetes” . This repo introduced a new tool called “gk-deploy” which helps to deploy the entire solution in kubernetes or Openshift environment.
An excerpt from its run.
[root@master deploy]# ./gk-deploy -g topology.json -n storagens
Welcome to the deployment tool for GlusterFS on Kubernetes and OpenShift.
Before getting started, this script has some requirements of the execution
environment and of the container platform that you should verify.
The client machine that will run this script must have:
* Administrative access to an existing Kubernetes or OpenShift cluster
* Access to a python interpreter 'python'
* Access to the heketi client 'heketi-cli'
Each of the nodes that will host GlusterFS must also have appropriate firewall
rules for the required GlusterFS ports:
* 2222 - sshd (if running GlusterFS in a pod)
* 24007 - GlusterFS Daemon
* 24008 - GlusterFS Management
* 49152 to 49251 - Each brick for every volume on the host requires its own
port. For every new brick, one new port will be used starting at 49152. We
recommend a default range of 49152-49251 on each host, though you can adjust
this to fit your needs.
In addition, for an OpenShift deployment you must:
* Have 'cluster_admin' role on the administrative account doing the deployment
* Add the 'default' and 'router' Service Accounts to the 'privileged' SCC
* Add the 'heketi-service-account' Service Account to the 'privileged' SCC
* Have a router deployed that is configured to allow apps to access services
running in the cluster
Do you wish to proceed with deployment?
[Y]es, [N]o? [Default: Y]: y
Multiple CLI options detected. Please select a deployment option.
[O]penShift, [K]ubernetes? [O/o/K/k]: o
Using OpenShift CLI.
NAME STATUS AGE
storagens Active 25s
Using namespace "storagens".
serviceaccount "heketi-service-account" created
On a successful run, you will have running Gluster pods, Heketi service..etc.