

Zenko can be deployed on a managed-Kubernetes cluster on Google Cloud (GKE) using the Helm charts distributed in its repository. There are many other ways to run Zenko on a Kubernetes cluster, including our favorite Kubernetes distribution MetalK8s. The Helm charts are designed to isolate how Zenko is deployed from where it is deployed: any Kubernetes cluster will be good to get started. In some ways, it helps developers like Zenko itself tries to give developers the freedom to choose the best cloud storage system, abstracting the complex choices like supporting multiple APIs or aggregate metadata. GKE is an easy way to quickly set up a cloud-agnostic storage platform.
The first step is to start a new cluster on Kubernetes following the instructions on Google Cloud documentation. For better performance, you’ll need a cluster with 3 nodes, 8vCPU and 32GB RAM each (this is minimum, for bigger workloads use more compute power and memory). Once the cluster is running, connect to it.
Create Role For Tiller
Google Kubernetes Engine requires Role-Based Access Control to be setup. The first step is to create a serviceaccount
for tiller
:
$ kubectl create serviceaccount tiller --namespace kube-system
Check that the correct context is set:
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
gke-cluster-1-default-pool-9ad69bcf-4g2n Ready <none> 1m v1.8.10-gke.0
gke-cluster-1-default-pool-9ad69bcf-frj5 Ready <none> 1m v1.8.10-gke.0
gke-cluster-1-default-pool-9ad69bcf-rsbt Ready <none> 1m v1.8.10-gke.0
Install Helm on Kubernetes Cluster
Helm is not available by default on GKE and needs to be installed.
$ curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh
$ bash ./get_helm.sh
Once that’s completed, start Helm:
$ helm init
Deploy Zenko on GKE
Clone Zenko’s repo and go into the charts directory:
$ git clone https://github.com/scality/Zenko.git
$ cd ./Zenko/kebernetes
Now you can run the following shell command to deploy a three-nodes Zenko stack with Orbit enabled.
$ helm install --name zenko --set ingress.enabled=true
--set ingress.hosts[0]=zenko.local
--set cloudserver.endpoint=zenko.local zenko
Wait about 15-20 minutes while the pods stabilize. You can confirm that the zenko instance is ready when all pods are in the running state. To check:
$ kubectl get pods
NOTE: It is expected that the queue-config pods will multiply until one succeeds. Any “Completed” or “Error” queue-config pods can be deleted.
Zenko is now deployed!
Connect GKE Zenko To Orbit
Find the Instance ID
to use for registering your instance:
$ kubectl logs $(kubectl get pods --no-headers=true -o \
custom-columns=:metadata.name | grep cloudserver-front) | grep \
Instance | tail -n 1
The output will look something like this:
{"name":"S3",
"time":1529101607249,
"req_id":"9089628bad40b9a255fd",
"level":"info",
"message":"this deployment's Instance ID is 6075357a-b08d-419e-9af8-cc9f391ca8e2",
"hostname":"zenko-cloudserver-front-f74d8c48c-dt6fc",
"pid":23}
Copy the ID and head to Orbit to paste it in the Settings page. Once the Zenko instance is connected to Orbit you’ll be able to attach cloud storage from different providers.
Photo by Silvio Kundt on Unsplash