Coder Social home page Coder Social logo

k8s-self-healing-simulator's Introduction

K8s Self-Healing Simulator

The Kubernetes Self-Healing Simulator is a Python CLI tool designed to demonstrate the self-healing capabilities of Kubernetes that I developed for customer workshops. It allows users to delete a pod from a list of running pods and then watch as Kubernetes automatically recreates the pod, showcasing the system's resilience.

Features

  • List all running pods in a specified namespace.
  • Delete a selected pod and observe Kubernetes' response to maintain the desired state.
  • Watch and display events related to the pod's recreation process.

Prerequisites

  • Python 3.6+
  • Kubernetes cluster (Minikube or any cloud-based Kubernetes service)
  • kubectl configured to connect to your Kubernetes cluster
  • Kubernetes Python client

Installation

  1. Clone this repository:
    git clone https://github.com/yourusername/kubernetes-self-healing-simulator.git
  2. Navigate to the project directory:
    cd kubernetes-self-healing-simulator
  3. Create and activate a virtual environment:
    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  4. Install the required dependencies:
    pip install -r requirements.txt

Usage

  1. Ensure your kubectl is configured and points to the desired Kubernetes cluster.
  2. Run the simulator:
    python src/simulator.py
  3. Follow the on-screen prompts to select and delete a pod. Observe the self-healing process through event logs.

k8s-self-healing-simulator's People

Contributors

hariscats avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.