Kubernetes Playground

You can find source code and guidelines on Github.

Intention behind this project to practice some of the most used software products such as:

  • Terraform
  • Kubernetes (K8s)
  • Docker

And, some of the most used databases such as:

  • Redis
  • PostgreSQL

Also, deployment to a cloud platform such as:

  • Google Cloud Platform (GCP)

To achieve these intentions, the project consists two simple web services:

1. Hello

As the most usual tutorial beginnings, Hello service is our “Hello World” program.

It simply handles two endpoints:

  • GET /greeting: returns plain text “Hello World”
  • GET /health: returns Status OK (200), and used for liveness probe by K8s

Hello service helps you to practice the following:

  • Creating a cluster on Google Kubernetes Engine (GKE) with Terraform.
  • Build and push a container to Google Container Registry (GCR) with Docker.
  • Deploy and manage your app on cluster with Kubernetes.

2. TODO

To build something looks more like a web service, the second service utilizes caching, database, and a REST API with CRUD operations.

So, TODO service stores your reminders, you can get, add, update, and delete your reminders.

It handles the following endpoint:

  • GET /todos: retrieves all todos.
  • GET /todos/done: retrives all todos that are done.
  • GET /todos/remaining: retrieves all todos that are remaining.
  • GET /todos/{id}: retrieves todo with given id.
  • POST /todos: creates a new todo from request body.
  • PUT /todos/status: updates the status of a todo from request body.
  • DELETE /todos/{id}: deletes todo with given id.

In addition to Hello service, TODO service helps you to practice using volumes and databases on clusters such as Redis and PostgreSQL. Also, you will practice orchestration of multiple services with K8s.

In this step, you will be more familiar with Kubernetes terminologies such as:

  • Deployment
  • Service
  • ConfigMap
  • PersistentVolume
  • PersistentVolumeClaim
  • Secrets

In addition, if you prefer to work on your local machine, you will practice running composition of multiple Docker images with docker-compose.