Step by step guide on deploying python app to Kubernetes cluster using Microk8s

Jayesh Kulkarni
2 min readJan 26, 2020

--

Containers are the future of software delivery

This is a complete guide on deploying a simple python app to kubernetes cluster. For simplicity I have divided this guide in four parts.

  1. Create a Kubernetes cluster using microk8s
  2. Create docker image and push image to docker hub
  3. Deploy python app to kubernetes cluster
  4. Update and rollback app

I am using AWS to launch ec2 instances required for setting up k8s cluster. For creating kubernetes cluster I will be using Microk8s. This is not production ready as of yet but can be used to test a fully functional k8s cluster.

There are other alternatives such as minikube, however I prefer microk8s as it is very lightweight and fast. For production deployments, managed kubernetes services such as AWS EKS, GCP GKE can be used.

First Part — Setting up a Kubernetes cluster using microk8s

In first part, we will setup a kubernetes cluster using microk8s, a lightweight and fast k8s single node cluster.

Second Part — Build and push docker image to Docker Hub

Here’s the link for 2nd part of this article. In second part we will build docker image of our python app and will push the image to Docker hub.

--

--

Jayesh Kulkarni
Jayesh Kulkarni

Written by Jayesh Kulkarni

DevOps Engineer | Developer | A geek and a writer!

No responses yet