Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Being Stateful in Kubernetes


Published on

Containers aren't just for stateless apps. You might have mission-critical stateful applications like MySQL, Kafka, or Cassandra databases that you want to run in containers as well. Sahil Sawhney gave an overview on how both; stateless and stateful services could be deployed over Kubernetes with ease thus reducing the service management efforts and making the scaling more manageable.

This pdf walks you through, the application of Stateful Sets and Operators and how they work internally to ensure state maintenance over the K8 cluster

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Being Stateful in Kubernetes

  1. 1. Being Stateful In Kubernetes Presented By : Sahil Sawhney Sr. Software Consultant @lihas5
  2. 2. Agenda In this session we will explore how feasible it is to deploy a stateful services over Kubernetes. Introduction Knowing Kubernetes Types Of Services Understanding stateful and stateless services Stateful Sets And Operators Knowing how to deploy a stateful Service Case Study With Demo Lets See Things Rolling
  3. 3. Kubernetes, The Buzz Kubernetes is a production grade open source orchestration system used to deploy, scale and manage containerised applications. It is based on the same principles that allow Google to run billions of containers a week. Container Platform With Kubernetes you can orchestrate your fleet of containers with ease. Microservices Platform K8 could also be used as a platform for deploying your microservice architecture Portable Cloud Platform K8 as a platform makes it easier to deploy, scale, and manage apps
  4. 4. Service Types Stateless Applications Single-Instance Stateful Application Replicated Stateful Application Nginx, My Play/Akka-Http Application or any other stateless Microservice. My single node mysql with a persistent volume. Use a StatefulSet to create a Cassandra ring.
  5. 5. Comparing Our Protagonists services applies operations on the input data and produces an output. Fos same set of inputs, the output will always be same. Stateless means the system can be in different states ie. The same input can produce different output based on other information in the system Stateful
  6. 6. Once Upon A Time ... The classic containerized approach of deploying a microservice architecture meant this : Spark I am a processing engine. My mistake is that i sometimes I do stateful operations. Kafka I am a message queue. My mistake is that I persist the inter service comm. messages. Cassandra I am a NOSQL Db. My mistake is that I can scale easily on bare metals. Elasticsearch Hang me please …..
  7. 7. Kubernetes is not just a platform to run your containers. It provides various other rich features like network management and persistent storage which could be exploited so as to deploy your microservice architecture that follow Reactive Manifesto: But Isn't Kubernetes All About Containers ?
  8. 8. The Saviour StatefulSets are valuable for applications that require one or more of the following. Stable, unique network identifiers. Graceful deployment and scaling. automated rolling updates. Stable, persistent storage. Use Case Used majorly to deploy stateful services like 1). Databases (Mysql, MongoDB, ES) 2). Queues (Kafka) Many more ... Stateful Sets
  9. 9. Demonstration
  10. 10. Noida, NSEZ +919871211045 sahil.sawhney.10 @lihas5 Thank You! Stay in Touch