Skip to main content

Simple Kubernetes Deployment

Project description

Project Eastern

Travis GitHub license Read the Docs PyPI Docker Hub

A Kubernetes templating and deployment tool.

Table of Contents


  • Simple, logicless template engine designed for YAML
  • Work with multiple environments
  • In use in production at Wongnai
  • Extensible plugin architecture


Note that Eastern requires kubectl.

Installing from PyPI

Run pip install eastern to install.

Running from Docker Image

Eastern is available on Docker Hub for continuous delivery users.

docker run -v `pwd`:/projects/ --rm wongnai/eastern eastern generate /projects/kubernetes.yaml

Installing from Git

  1. Clone this repository
  2. Run python3 install. You might to run this as root.
  3. Run eastern to verify that it is installed.


Template language

At its core, Eastern is a YAML templating tool. Eastern provides the following commands as YAML comment.

  • load? file_1.yaml, file_2.yaml ...: Load the first file available
  • load! file_1.yaml, file_2.yaml ...: Same as load? but throw when no file is loaded.

The file name and contents may contains variable interpolation. Available variable is

  • ${NAMESPACE}: Name of namespace

Additional variables can be passed by -s var=value.

For example:

image: wongnai/eastern:${IMAGE_TAG}
  # load! env-${NAMESPACE}.yaml, env.yaml

See full deployment example in the example folder.

Once you have written a template, test it with eastern generate path/to/file.yaml namespace -s IMAGE_TAG=2.0.


To deploy, run eastern deploy path/to/file.yaml namespace.

Available options:

  • --set var=value (-s): Set additional template variables
  • --edit (-e): Edit resulting YAML before deploying
  • --no-wait: Exit after running kubectl without waiting for rolling deploy

Deploy jobs

Eastern comes with Job deployment tool.

To start a job, run eastern job path/to/file.yaml namespace image_tag. The file must have the job as its only document. Eastern will add image_tag as job suffix, deploy, wait until job's completion and remove the job.

Supplied image_tag is available in the template as ${IMAGE_TAG}.


Eastern is extensible. We use Eastern plugins ourselves. The API docs is available on Read the Docs.


(C) 2017 Wongnai Media Co, Ltd.

Eastern is licensed under MIT License

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eastern-5.0.0.tar.gz (13.7 kB view hashes)

Uploaded Source

Built Distribution

eastern-5.0.0-py3-none-any.whl (15.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page