Giter Site home page Giter Site logo

global-pod-autoscaler's Introduction

GlobalPodAutoscaler (GPA)

GlobalPodAutoscaler (GPA) is a Kubernetes extension designed to provide high availability for your deployments by enabling automatic scaling of pods across multiple clusters. GPA actively scales deployments on a primary cluster while maintaining a backup cluster to ensure uninterrupted service in the event of resource outages on the primary cluster.

Features

  • Automatically scale pods across multiple clusters.
  • Active scaling on the primary cluster with a secondary cluster as a backup.
  • Seamless failover to secondary cluster in case of resource outages on the primary cluster.
  • Automatic recovery of deployments from the secondary cluster back to the primary cluster once resources become available.

Architecture

Global Pod Autoscaler architecture

Global pod autoscaler is deployed in primary cluster and watches the state of the deployment. The state of the deployment is reported back to KEDA every 5 second. Here is the KEDA scaler to talk to global pod autoscaler.

#examples/external-scalar.yaml
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: scaler-name
spec:
  scaleTargetRef:
    name: secondary-deployment-name
  minReplicaCount: 1
  maxReplicaCount: 20
  pollingInterval: 1
  triggers:
    - type: external-push
      metadata:
        scalerAddress: global-pod-autoscaler-service-link
        governer: main-cluster-deployment-to-watch
        namespace: main-cluster-deployment-namespace

KEDA is reported back the number of pods required every 5 second and KEDA provisions the necessary HPA to scale the secondary deployment.

In theory then you can set up multiple cluster and create a chain of deployments to make sure you are always up and running.

Installation

Create the necessary RBAC required to run GlobalPodAutoscaler

kubectl apply -f ./examples/rbac.yaml

Deploy the global pod autoscaler

kubectl apply -f ./examples/global-pod-autoscaler.yaml

Contributing

We welcome contributions to the GlobalPodAutoscaler project. Please feel free to submit issues, fork the repository, and send pull requests.

Read more about KEDA Extenal Scaler here.

License

This project is licensed under the MIT License.

global-pod-autoscaler's People

Contributors

aesher-bot avatar

Stargazers

 avatar  avatar  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.