{"id":37824197,"url":"https://github.com/quortex/kubestitute","last_synced_at":"2026-01-16T15:44:14.190Z","repository":{"id":38444054,"uuid":"314801685","full_name":"quortex/kubestitute","owner":"quortex","description":"An operator to handle scheduling of substitution instances as kubernetes nodes.","archived":false,"fork":false,"pushed_at":"2025-03-31T08:06:18.000Z","size":16722,"stargazers_count":4,"open_issues_count":7,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-31T09:23:00.800Z","etag":null,"topics":["aws","cluster-autoscaler","kubebuilder","operator"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quortex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-21T12:00:15.000Z","updated_at":"2025-01-06T08:58:33.000Z","dependencies_parsed_at":"2023-02-17T06:15:53.800Z","dependency_job_id":"25786a55-b14a-4dfd-a8c3-41acd5dba009","html_url":"https://github.com/quortex/kubestitute","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/quortex/kubestitute","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quortex%2Fkubestitute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quortex%2Fkubestitute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quortex%2Fkubestitute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quortex%2Fkubestitute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quortex","download_url":"https://codeload.github.com/quortex/kubestitute/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quortex%2Fkubestitute/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cluster-autoscaler","kubebuilder","operator"],"created_at":"2026-01-16T15:44:14.095Z","updated_at":"2026-01-16T15:44:14.169Z","avatar_url":"https://github.com/quortex.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kubestitute\n\n## Overview\n\nThis project is an operator allowing Kubernetes to automatically manage the lifecycle of instances within a cluster based on specific events.\n\nThis tool is not intended to replace existing tools such as the [Cluster Autoscaler](https://github.com/kubernetes/autoscaler) but rather to supplement them in order to have more control and responsiveness over the provisioning of instances in a cluster.\n\nKubestitute only works with clusters deployed on AWS using Auto Scaling Groups at the moment.\n\n## Usage\n\nThe standard use case for this tool is to provision on-demand fallback instances in case Spot instances cannot be scheduled.\n\nTo do so, configure an Auto Scaling Group of Spot instances managed by the Cluster Autoscaler and another one of on-demand fallback instances managed by Kubestitute.\n\nKubestitute will scale up the on-demand Auto Scaling Group according to events on the Spot instances Auto Scaling Group retrieved from the cluster-autoscaler status.\nIt will also drain fallback instances and detach them from the Auto Scaling Group according to events (typically when the Spot instances have finally been scheduled).\n\n## Prerequisites\n\n### Kubernetes\n\nA Kubernetes cluster of version v1.11.3+ is required. If you are just starting out with Kubestitute, it is highly recommended to use the latest version.\n\n### \u003ca id=\"Prerequisites_AWS\"\u003e\u003c/a\u003eAWS\n\nTo be used with AWS and interact with Auto Scaling Groups, an AWS account or IAM role with the following permissions on Auto Scaling Groups managed by Kubestitute is required:\n\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"AllObjectActions\",\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"autoscaling:DescribeAutoScalingGroups\",\n        \"autoscaling:SetDesiredCapacity\",\n        \"autoscaling:TerminateInstanceInAutoScalingGroup\"\n      ],\n      \"Resource\": \"*\"\n    }\n  ]\n}\n```\n\n## Installation\n\n### Helm\n\nFollow Kubestitute documentation for Helm deployment [here](./helm/kubestitute).\n\n## Configuration\n\n### \u003ca id=\"Configuration_Optional_args\"\u003e\u003c/a\u003eOptional args\n\nThe kubestitute container takes as argument the parameters below.\n| Key                                             | Description                                                                                                                           | Default                              |\n| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |\n| clusterautoscaler-namespace                     | The namespace the clusterautoscaler belongs to.                                                                                       | kube-system                          |\n| clusterautoscaler-status-name                   | The names of the clusterautoscaler status configmap.                                                                                  | cluster-autoscaler-status            |\n| cluster-autoscaler-priority-expander-config-map | The name of the clusterautoscaler priority expander config map.                                                                       | cluster-autoscaler-priority-expander |\n| clusterautoscaler-status-legacy-format          | Set if the clusterautoscaler status configmap is formatted the legacy readable format, used by cluster-autoscaler up to version 1.29. | `false`                              |\n| priority-expander-enabled                       | Is the PriorityExpander controller enabled.                                                                                           | `false`                              |\n| priority-expander-namespace                     | The namespace the _unique_ priority expander object belongs to.                                                                       | kubestitute-system                   |\n| priority-expander-name                          | The only accepted name for the priority expander object.                                                                              | priority-expander-default            |\n| dev                                             | Enable dev mode for logging.                                                                                                          | `false`                              |\n| v                                               | Logs verbosity. 0 =\u003e panic, 1 =\u003e error, 2 =\u003e warning, 3 =\u003e info, 4 =\u003e debug                                                           | 3                                    |\n| asg-poll-interval                               | AutoScaling Groups polling interval (used to generate custom metrics about ASGs).                                                     | 30                                   |\n| eviction-timeout                                | The timeout in seconds for pods eviction on Instance deletion.                                                                        | 300                                  |\n| instances-max-concurrent-reconciles             | The maximum number of concurrent Reconciles which can be run for Instances.                                                           | 10                                   |\n| metrics-bind-address                            | The address the metric endpoint binds to.                                                                                             | :8080                                |\n| health-probe-bind-address                       | The address the probe endpoint binds to.                                                                                              | :8081                                |\n| leader-elect                                    | Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.                 | `false`                              |\n\n## CustomResourceDefinitions\n\nA core feature of Kubestitute is to monitor the Kubernetes API server for changes to specific objects and ensure that the current cluster infrastructure match these objects.\n\nThe Operator acts on the following [custom resource definitions (CRDs)](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/):\n\n**`Instance`** defines a desired Instance (only AWS EC2 instances in Auto Scaling Groups supported at the moment).\n\n**`Scheduler`** defines a scheduler for Instances (only AWS EC2 instances in Auto Scaling Groups supported at the moment). This resource is used to configure advanced instances scheduling based on node groups events.\n\n**`PriorityExpander`** defines a template that will be used to dynamically create cluster-autoscaler configmap. More information [here](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler/expander/priority)\n\nYou can find examples of CRDs defined by Kubestitute [here](./config/samples).\n\nFull API documentation is available [here](./docs/api-docs.asciidoc).\n\n## Supervision\n\n### Logs\n\nBy default, Kubestitute produces structured logs, with \"Info\" verbosity. These settings can be configured as described [here](#Configuration_Optional_args).\n\n### Metrics\n\nKubestitute being built from Kubebuilder, it natively exposes a collection of performance metrics for each controller.\nKubebuilder documentation about metrics can be found [here](https://book.kubebuilder.io/reference/metrics.html).\n\nWe also expose custom metrics as described here:\n\nAll the metrics are prefixed with kubestitute\\_\n\n| Metric name                        | Metric type | Labels                                                  | Description                                                               |\n| ---------------------------------- | ----------- | ------------------------------------------------------- | ------------------------------------------------------------------------- |\n| scaled_up_nodes_total              | Counter     | `autoscaling_group_name`, `scheduler_name`              | Number of nodes added by kubestitute.                                     |\n| scaled_down_nodes_total            | Counter     | `autoscaling_group_name`, `scheduler_name`              | Number of nodes removed by kubestitute.                                   |\n| evicted_pods_total                 | Counter     | `autoscaling_group_name`, `node_name`, `scheduler_name` | Number of pods evicted by kubestitute.                                    |\n| autoscaling_group_desired_capacity | Gauge       | `autoscaling_group_name`                                | The desired size of the autoscaling group.                                |\n| autoscaling_group_capacity         | Gauge       | `autoscaling_group_name`                                | The current autoscaling group capacity (Pending and InService instances). |\n| autoscaling_group_min_size         | Gauge       | `autoscaling_group_name`                                | The minimum size of the autoscaling group.                                |\n| autoscaling_group_max_size         | Gauge       | `autoscaling_group_name`                                | The maximum size of the autoscaling group.                                |\n| priority_expander_template_error   | Gauge       |                                                         | Returns 1 if template can't be parsed.                                    |\n\n## License\n\nDistributed under the Apache 2.0 License. See `LICENSE` for more information.\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning.\n\n## Contributing\n\nTo contribute to this project, please first consult the [contribution rules guide](CONTRIBUTING.md).\n\nGot a question?\nFile a GitHub [issue](https://github.com/quortex/kubestitute/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquortex%2Fkubestitute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquortex%2Fkubestitute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquortex%2Fkubestitute/lists"}