Manage your data in an S3-compatible object storage with Scality CloudServer and Kubernetes

Jean-Marie Aliaga
Nov 3 · 5 min read
An open source S3 server

Zenko CloudServer (formerly S3 Server) is an Open Source project provided under the Apache License.
It provides a single unifying interface using the Amazon S3 API, supporting multi-cloud backend data storage both on-premises and in the Amazon S3 public cloud as well as other services, including: Available now for Amazon S3, Scality RING and Docker. Coming soon for other cloud platforms.

Deployable as a Docker container, Scality’s S3 Server transforms any storage space into S3-compatible storage. The software uses the same authentication model as the Amazon AWS S3 service. This allows a developer to develop an application based on local storage as if it were interacting with Amazon AWS S3.

Use Cases with S3 Server

First, you need to install the latest version of Docker.
An example with Linux Ubuntu (that I use in a VM VirtualBox)

Install Docker CE on Linux “Ubuntu”

https://docs.docker.com/install/linux/docker-ce/ubuntu/

sudo apt-get update && apt-get install docker-ce docker-ce-cli containerd.io

Install minikube for a cluster with only one node (master and node)

Minikube runs a single-node Kubernetes cluster

Installation for minikube with option “none driver” on Linux VM

https://github.com/robertluwang/docker-hands-on-guide/blob/master/minikube-none-installation.md

Verify the installation

minikube status

minikube: Running cluster: Running kubectl: Correctly Configured: pointing to minikube-vm at 10.0.2.15

kubectl cluster-info

Kubernetes master is running at https://10.0.2.15:8443 KubeDNS is running at https://10.0.2.15:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use ‘kubectl cluster-info dump’.

kubectl get pods --all-namespaces

NAMESPACE NAME READY STATUS RESTARTS AGE

Verify that the ADDON dashboard is enabled and set the ADDON heapster at enabled, then start the k8s console

minikube addons enable heapster

minikube addons list

Start the k8s console

minikube dashboard

A simple view before deployment

Deploy CloudServer with Kubernetes

Refer to my GitHub repository for S3Server deployment files

https://github.com/Tigrou59/Scality/tree/master/S3-Server/k8s

In Dev environnment with k8s in cluster minikube

In production, we expect a cluster n nodes (3 nodes minimum) installed with kubeadm or provided by a cloud provider we also expect that data will be persistent. That you will use the multiple backends capabilities of Zenko CloudServer, and that you will have a custom endpoint for your local storage, and custom credentials for your local storage:

Many object k8s will be created, in logical order : ConfigMap that stores ENV variables

kubectl apply -f configmap-s3server.yml

kubectl get cm -o wide

NAME DATA AGE

Persistent Volumes for storage local or on any other types of storage suported by kubernetes (Volume Plugin)

kubectl apply -f pv-s3server.yml

kubectl get pv -o wide

NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE

PersistentVolumeClaim for binding the PersistentVolume and then use refered this in pods

kubectl apply -f pvc-s3server.yml

kubectl get pvc -o wide

NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE

At the hight level, the Deployment wich including replicas, pods, labels, environment config, strategy of rolling update, claim for pvc…

kubectl apply -f deploy-s3server-pv.yml --record

kubectl get deploy -o wide

NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR

kubectl get rs -l app=s3server -o wide

NAME DESIRED CURRENT READY AGE CONTAINERS IMAGES SELECTOR

kubectl get pods -l app=s3server -o wide

NAME READY STATUS RESTARTS AGE IP NODE

And finally the Service “NodeType” bring a stable and reliable network, DNS, load-balancing and expose your app outside of the kubernetes cluster, Cluster IP and Port (in our case : 10.109.72.126:30042 over TCP)

DNS-Based Service Recovery requires the DNS cluster — add-on, The DNS add-on implements a POD-based DNS service in the cluster and configures all kubelets (nodes) to use it for DNS ie: minikube addons list

kubectl apply -f svc-nodeport.yml

kubectl get svc -l app=s3server -o wide

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR

In summary

By providing a free-standing implementation of the S3 API, CloudServer offers developers the freedom to build S3 apps and run them either on-premises, in the AWS public cloud, or both — with no code changes. CloudServer is deployed in a Docker container.

Behind the scene

Public Docker repository for cloudserver Scality Zenko

Public GitHub source repo

Zenko Cloud Server

Install minikube on a VM

Kubernetes documentation

Follow us on Twitter 🐦 and Facebook 👥 and join our Facebook Group 💬.

To join our community Slack 🗣️ and read our weekly Faun topics 🗞️, click here⬇

If this post was helpful, please click the clap 👏 button below a few times to show your support for the author! ⬇

Faun

The Must-Read Publication for Aspiring Developers & DevOps Enthusiasts. Medium’s largest DevOps publication.

Jean-Marie Aliaga

Written by

Architect SI & Services at Orange — Contact LinkedIn https://www.linkedin.com/in/jean-marie-aliaga-b21487175/

Faun

Faun

The Must-Read Publication for Aspiring Developers & DevOps Enthusiasts. Medium’s largest DevOps publication.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade