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
  1. Zoe:
  • Zapp Description:
    • 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.
  • Idea:
    • 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.

Additional notes

The host running Zoe must be able to translate via DNS/hosts K8S node names and IPs.

Many of the features of the Zoe scheduler have not been implemented for the Kubernetes back-end.

Kubernetes network configuration can be done in many different ways. The Zoe Kubernetes back-end implements a very simple algorithm for setting and retrieving port forwading information to show on the web interface. You will have to customize this implementation to support your own Kubernetes deployment, with the network and port forwarding back-end of your choice.

This version of Zoe has been tested with microk8s v.1.12