artur-barsegyan / tarantool-operator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tarantool Kubernetes Operator

The Tarantool Operator provides automation that simplifies the administration of Tarantool Cartridge based clusters on Kubernetes.

The Operator instroduces new API version tarantool.io/v1alpha1 and installs custom resources to for objects of custom types Cluster, Role, ReplicasetTemplate.

Resources

Cluster - represents single Tarantool Cartridge cluster

Role - represents Tarantool Cartridge user role

ReplicasetTemplate - is a template for StatefulSet's created as a members of Role

Resource ownerhip

Resources managed by Operator being deployed forms resource ownership hierarchy:

Resource ownership

Resource ownership directly affects how k8s garbage collector works. If you execute delete command on parent resource then all it's dependants will be removed.

Deploying Tarantool Operator on Minikube

  1. Install required software:

  2. Create minikube cluster

    minikube start --memory=4096

    You will need 4Gb of RAM allocated to minikube cluster to run examples

    Ensure Minikube is up and running:

    minikube status

    in case of success you will see output

    host: Running
    kubelet: Running
    apiserver: Running
  3. Create operator resources

    kubectl create -f deploy/service_account.yaml
    kubectl create -f deploy/role.yaml
    kubectl create -f deploy/role_binding.yaml
  4. Create Tarantool Operator CRD's

    kubectl create -f deploy/crds/tarantool_v1alpha1_cluster_crd.yaml
    kubectl create -f deploy/crds/tarantool_v1alpha1_role_crd.yaml
    kubectl create -f deploy/crds/tarantool_v1alpha1_replicasettemplate_crd.yaml
  5. Start operator

    kubectl create -f deploy/operator.yaml

    ensure operator is up

    kubectl get pods --watch

    wait for tarantool-operator-xxxxxx-xx Pod's STATUS became Runnning

Examples

Distributed key value storage

About


Languages

Language:Go 98.1%Language:Shell 1.2%Language:Dockerfile 0.6%