Kubernetes - High Availabilty and Lifecycle management for Stateful Applications


Prabhat Sharma


@hiprabhat
@prabhatsharma

Basic principles

Redundancy is the key

If you have two, then you have one.

If you have one, then you have none.

How to achieve redundancy

  1. Application specific mechanisms
    • Replication
    • e.g. MySQL, MongoDB, Postgres
    • Implemented via helm charts and operators
  2. Storage Layer

Lifecycle management

HA is not enough. We need to manage day 1 & day 2

  1. Day 1
    1. Installation
    2. High Availabilty
  2. Day 2
    1. Upgrades
    2. Backup & restore
    3. Auto recovery
    4. Automatic/On-demand scalability
    5. Configuration management
    6. Deep insights

Helm

Helm helps you manage Kubernetes applications — Helm Charts help you define, install, and upgrade even the most complex Kubernetes application.

Operator

“A Kubernetes Operator is an abstraction for deploying non-trivial applications on Kubernetes. It wraps the logic for deploying and operating an application using Kubernetes constructs.” –Richard Laub, staff cloud engineer at Nebulaworks

Solutions for Application aware deployment

Solution Pros Cons
Manual Deployment None Time taking. Difficult
Helm charts Easy Day 2 ops missing
Operators Day 1 & Day 2 covered Still maturing

Elasticsearch operator

					
apiVersion: elasticsearch.k8s.elastic.co/v1alpha1
kind: Elasticsearch
metadata:
  name: quickstart
spec:
  version: 7.1.0
  nodes:
  - nodeCount: 1
  config:
    node.master: true
    node.data: true
    node.ingest: true
					
				

Elasticsearch Operator Lab

Finding operators

Thank You

Questions?