Deploy Zenko on Amazon EKS in 30 minutes

Do you have half an hour and an AWS account? If so, you can install Zenko and use Orbit to manage your data. Below is a step-by-step guide with time estimates to get started. If you are an AWS user with appropriate permissions or policies to create EC2 instances and EKS clusters, you can dive […]

Written By Anurag Mittal

On February 6, 2019
"

Read more

Solve the challenges of large-scale data, once and for all.

Do you have half an hour and an AWS account? If so, you can install Zenko and use Orbit to manage your data. Below is a step-by-step guide with time estimates to get started.

If you are an AWS user with appropriate permissions or policies to create EC2 instances and EKS clusters, you can dive into this tutorial. Otherwise, contact your administrator, who can add permissions (full documentation).

Initial Machine Setup (estimated time: 10 minutes):

For this tutorial, we use a jumper EC2 instance with Amazon Linux to deploy and manage our Kubernetes cluster. A power user can use their own workstation or laptop to manage the Kubernetes cluster.

Follow this guide to set up your EC2 instance and connect to your new instance using the information hereOnce connected to the instance, install applications that will help set up the Kubernetes cluster.

Install Kubectl, a command-line tool for running commands against Kubernetes clusters.

$ curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl

$ chmod +x ./kubectl
$ sudo mv ./kubectl /usr/local/bin/kubectl

Verify that kubectl is installed (expect a similar output):

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.2", GitCommit:"cff46ab41ff0bb44d8584413b598ad8360ec1def", GitTreeState:"clean", BuildDate:"2019-01-10T23:35:51Z", GoVersion:"go1.11.4", Compiler:"gc", Platform:"linux/amd64"}

Download aws-iam-authenticator, a tool to use AWS IAM credentials to authenticate to a Kubernetes cluster.

$ curl -o aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.11.5/2018-12-06/bin/linux/amd64/aws-iam-authenticator

$ chmod +x ./aws-iam-authenticator
$ mkdir bin
$ cp ./aws-iam-authenticator $HOME/bin/aws-iam-authenticator && export PATH=$HOME/bin:$PATH

Install eksctl. eksctl is a simple CLI tool for creating clusters on EKS – Amazon’s new managed Kubernetes service for EC2.

$ curl --silent --location "https://github.com/weaveworks/eksctl/releases/download/latest_release/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp

$ sudo mv /tmp/eksctl /usr/local/bin

Configure AWS credentials:

$ mkdir ~/.aws
$ vim ~/.aws/credentials
$ cat ~/.aws/credentials
[default]
aws_access_key_id = AKIAII25IGOGWQITLYIQ
aws_secret_access_key = 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
$ export AWS_SHARED_CREDENTIALS_FILE=~/.aws/credentials

Verify credentials work. If the output looks similar, you are ready to launch your Kubernetes cluster:

$ eksctl get clusters
No clusters found

Deploy a Three-Node Kubernetes Cluster for Zenko: (estimated time: 10–15 minutes):

$ eksctl create cluster --name=zenko-eks-cluster --nodes=3 --region=us-west-2

Once you get the line below, your cluster is ready:

[✔]  EKS cluster "zenko-eks-cluster" in "us-west-2" region is ready

Install Helm:

$ curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh 
$ bash ./get_helm.sh
$ helm version
Client: &version.Version{SemVer:"v2.12.3", GitCommit:"eecf22f77df5f65c823aacd2dbd30ae6c65f186e", GitTreeState:"clean"}

EKS requires role-based access control to be set up. The first step is to create a service account for Tiller:

$ kubectl create serviceaccount tiller --namespace kube-system

Create a Tiller service account: Make a rbac-config.yaml file and apply it.

$ cat rbac-config.yaml
apiVersion: v1
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
 name: tiller-role-binding
roleRef:
 kind: ClusterRole
 name: cluster-admin
 apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
 name: tiller
 namespace: kube-system

$ kubectl apply -f rbac-config.yaml
$ helm init --service-account tiller

Deploy Zenko (estimated time: 10 minutes)

Install Git:

$ sudo yum install git

Clone Zenko:

$ git clone https://github.com/scality/Zenko/

Go to the kubernetes folder and deploy Zenko. This will take about 10 minutes.

$ cd Zenko/kubernetes/
$ helm init
$ helm install --name zenko --set ingress.enabled=true \
--set ingress.hosts[0]=zenko.local \
--set cloudserver.endpoint=zenko.local zenko

Connect EKS 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-manager) | grep Instance | tail -n 1

{"name":"S3","time":1548793280888,"req_id":"a67edf37254381fc4781","level":"info","message":"this deployment's Instance ID is fb3c8811-88c6-468c-a2f4-aebd309707ef","hostname":"zenko-cloudserver-manager-8568c85497-5k5zp","pid":17}

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.

If you have any questions or want to show off a faster time than 30 minutes, join us at the Zenko forum.

Photo by chuttersnap on Unsplash

Simple, secure S3 object storage software for modern applications