kube_backend.rst 1.48 KB
Newer Older
hxquangnhat's avatar
hxquangnhat committed
1
.. _kube-backend:
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

Kubernetes backend for Zoe
==========================

Overview
--------
* Running Zoe on a Kubernetes cluster instead of Swarm
* Support High availability for Zapp services

Requirements
------------
* A running Kubernetes cluster, version 1.4.7
* pykube python library, version >=0.14.0

How it works
------------
1. Zoe configuration file:

 * ``--backend``: put Kubernetes instead of Docker Swarm
 * ``--kube-config-file``: the configuration file of kubernetes cluster

2. Zoe:

* Zapp Description:
hxquangnhat's avatar
hxquangnhat committed
26

27
28
29
  * Add new field: ``replicas``, if users doesn't specify this value, the default value for each service would be ``1``.
  * In field ``require_resources``, the ``cores`` field can be float.

hxquangnhat's avatar
hxquangnhat committed
30
* Idea:
31
32
33
34
35
36
37
38
39

  * Create each **replication controller** per each service of a Zapp. Replication Controller assures to have at least a number of **replicas** (pod) always running.
  * Create a Kubernetes **service** per each **replication controller**, which has the same **labels** and **label selectors** with the associated **replication controller**. The service would help the zapp service be exposed to the network by exposing the same port of the service on all kubernetes nodes.

References
----------
* Kubernetes: https://kubernetes.io/
* Kubernetes Replication Controller : https://kubernetes.io/docs/user-guide/replication-controller/
* Kubernetes Service: https://kubernetes.io/docs/user-guide/services/
hxquangnhat's avatar
hxquangnhat committed
40
* Kubernetes Limit and Request: https://kubernetes.io/docs/user-guide/compute-resources/
41