spotter-cli


Namespotter-cli JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryProduction-grade spot instance scheduling for EKS worker nodes
upload_time2025-07-27 13:28:32
maintainerNone
docs_urlNone
authorSpotter Contributors
requires_python>=3.8
licenseMIT License Copyright (c) 2025 S Murali Krishnan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords aws eks spot-instances kubernetes cost-optimization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Spotter

**Production-grade spot instance scheduling for EKS worker nodes**

Spotter intelligently manages EC2 spot instances as EKS worker nodes, automatically finding the cheapest ARM64 instances across availability zones while handling interruptions gracefully. Achieves 70-80% cost savings over on-demand instances.

## Features

- **Real-time Pricing Analysis**: Continuous spot price monitoring with automatic instance selection
- **Multi-AZ Distribution**: Optimal instance placement across availability zones
- **Interruption Resilience**: Automatic replacement with fallback instance types
- **ARM64 Optimization**: Targets modern ARM64 families (c7g, c8g, m7g, m8g, r7g, r8g)
- **EKS Integration**: Native integration via CloudFormation launch templates

## Architecture

### Core Components

**Spotter Lambda**
- Analyzes spot pricing every 10 minutes
- Stores top 6 cheapest instances per AZ in SSM parameters
- Filters for ARM64, current-generation, non-burstable instances

**InstanceRunner Lambda**
- Launches instances based on pricing recommendations
- Handles spot interruption events with same-AZ replacement
- Implements intelligent fallback on Capacity issues

## Installation

### Prerequisites

- AWS CLI configured with appropriate permissions
- SAM CLI installed
- EKS cluster with kubectl access
- EC2 Spot service-linked role

### Quick Start

1. **Bootstrap Infrastructure**
```bash
spotter bootstrap --region us-west-2
```

2. **Onboard EKS Cluster**
```bash
spotter onboard my-cluster --region us-west-2
```

3. **Launch Instances**
```bash
spotter scale my-cluster --count 3
```

## Commands

### Infrastructure Management
```bash
spotter bootstrap [--region REGION] [--min-savings 80] [--check-frequency 10]
spotter destroy [--region REGION]
```

### Cluster Operations
```bash
spotter onboard CLUSTER [--region REGION] [--subnets SUBNET_IDS]
spotter offboard CLUSTER [--region REGION]
spotter list-clusters [--region REGION]
```

### Instance Management
```bash
spotter scale CLUSTER --count COUNT [--scale-to-count] [--region REGION]
spotter list-instances CLUSTER [--region REGION]
spotter rebalance CLUSTER [--region REGION]
```

### Monitoring
```bash
spotter pricing [--region REGION]
spotter refresh-prices [--region REGION]
```

## Configuration

### Instance Selection Criteria
- **Architecture**: ARM64 only
- **Families**: c7g, c8g, m7g, m8g, r7g, r8g
- **Generation**: Current generation
- **Performance**: Non-burstable
- **EKS Compatibility**: <110 pods per node

### Data Storage
Pricing data stored in SSM parameters:
- `/spotter/prices/{az}` - Top 6 instances per availability zone
- `/spotter/settings/{cluster}` - Cluster configuration


## Monitoring & Troubleshooting

### CloudWatch Logs
- `/aws/lambda/Spotter` - Pricing analysis logs
- `/aws/lambda/InstanceRunner` - Instance launch logs

### Troubleshooting
See [docs/troubleshooting.md](docs/troubleshooting.md) for comprehensive troubleshooting guidance.

## Cleanup

Remove all Spotter resources:
```bash
spotter destroy --region us-west-2
```

For cluster-specific cleanup:
```bash
spotter offboard my-cluster --region us-west-2
```

---

Vibe coded with [Amazon Q](https://github.com/aws/amazon-q-developer-cli)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "spotter-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "aws, eks, spot-instances, kubernetes, cost-optimization",
    "author": "Spotter Contributors",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/50/e8/73b67d5ddd485d2c50185d8ac10f4d2c781e6a5a45f429c83526903e7e07/spotter_cli-1.0.0.tar.gz",
    "platform": null,
    "description": "# Spotter\n\n**Production-grade spot instance scheduling for EKS worker nodes**\n\nSpotter intelligently manages EC2 spot instances as EKS worker nodes, automatically finding the cheapest ARM64 instances across availability zones while handling interruptions gracefully. Achieves 70-80% cost savings over on-demand instances.\n\n## Features\n\n- **Real-time Pricing Analysis**: Continuous spot price monitoring with automatic instance selection\n- **Multi-AZ Distribution**: Optimal instance placement across availability zones\n- **Interruption Resilience**: Automatic replacement with fallback instance types\n- **ARM64 Optimization**: Targets modern ARM64 families (c7g, c8g, m7g, m8g, r7g, r8g)\n- **EKS Integration**: Native integration via CloudFormation launch templates\n\n## Architecture\n\n### Core Components\n\n**Spotter Lambda**\n- Analyzes spot pricing every 10 minutes\n- Stores top 6 cheapest instances per AZ in SSM parameters\n- Filters for ARM64, current-generation, non-burstable instances\n\n**InstanceRunner Lambda**\n- Launches instances based on pricing recommendations\n- Handles spot interruption events with same-AZ replacement\n- Implements intelligent fallback on Capacity issues\n\n## Installation\n\n### Prerequisites\n\n- AWS CLI configured with appropriate permissions\n- SAM CLI installed\n- EKS cluster with kubectl access\n- EC2 Spot service-linked role\n\n### Quick Start\n\n1. **Bootstrap Infrastructure**\n```bash\nspotter bootstrap --region us-west-2\n```\n\n2. **Onboard EKS Cluster**\n```bash\nspotter onboard my-cluster --region us-west-2\n```\n\n3. **Launch Instances**\n```bash\nspotter scale my-cluster --count 3\n```\n\n## Commands\n\n### Infrastructure Management\n```bash\nspotter bootstrap [--region REGION] [--min-savings 80] [--check-frequency 10]\nspotter destroy [--region REGION]\n```\n\n### Cluster Operations\n```bash\nspotter onboard CLUSTER [--region REGION] [--subnets SUBNET_IDS]\nspotter offboard CLUSTER [--region REGION]\nspotter list-clusters [--region REGION]\n```\n\n### Instance Management\n```bash\nspotter scale CLUSTER --count COUNT [--scale-to-count] [--region REGION]\nspotter list-instances CLUSTER [--region REGION]\nspotter rebalance CLUSTER [--region REGION]\n```\n\n### Monitoring\n```bash\nspotter pricing [--region REGION]\nspotter refresh-prices [--region REGION]\n```\n\n## Configuration\n\n### Instance Selection Criteria\n- **Architecture**: ARM64 only\n- **Families**: c7g, c8g, m7g, m8g, r7g, r8g\n- **Generation**: Current generation\n- **Performance**: Non-burstable\n- **EKS Compatibility**: <110 pods per node\n\n### Data Storage\nPricing data stored in SSM parameters:\n- `/spotter/prices/{az}` - Top 6 instances per availability zone\n- `/spotter/settings/{cluster}` - Cluster configuration\n\n\n## Monitoring & Troubleshooting\n\n### CloudWatch Logs\n- `/aws/lambda/Spotter` - Pricing analysis logs\n- `/aws/lambda/InstanceRunner` - Instance launch logs\n\n### Troubleshooting\nSee [docs/troubleshooting.md](docs/troubleshooting.md) for comprehensive troubleshooting guidance.\n\n## Cleanup\n\nRemove all Spotter resources:\n```bash\nspotter destroy --region us-west-2\n```\n\nFor cluster-specific cleanup:\n```bash\nspotter offboard my-cluster --region us-west-2\n```\n\n---\n\nVibe coded with [Amazon Q](https://github.com/aws/amazon-q-developer-cli)\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 S Murali Krishnan\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.\n        ",
    "summary": "Production-grade spot instance scheduling for EKS worker nodes",
    "version": "1.0.0",
    "project_urls": {
        "Documentation": "https://github.com/mrlikl/spotter#readme",
        "Homepage": "https://github.com/mrlikl/spotter",
        "Issues": "https://github.com/mrlikl/spotter/issues",
        "Repository": "https://github.com/mrlikl/spotter"
    },
    "split_keywords": [
        "aws",
        " eks",
        " spot-instances",
        " kubernetes",
        " cost-optimization"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d05e4eacb73a6e359bb088f19d9ef1a8266b8a4e296adb3e7ee7d7e973daa804",
                "md5": "b9ae8dd71a8674ef6074b4947d842f17",
                "sha256": "2fd545f5438acc655c453d45673052958faa6bbe46bea2cf6f7125833529555d"
            },
            "downloads": -1,
            "filename": "spotter_cli-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b9ae8dd71a8674ef6074b4947d842f17",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 30086,
            "upload_time": "2025-07-27T13:28:31",
            "upload_time_iso_8601": "2025-07-27T13:28:31.261849Z",
            "url": "https://files.pythonhosted.org/packages/d0/5e/4eacb73a6e359bb088f19d9ef1a8266b8a4e296adb3e7ee7d7e973daa804/spotter_cli-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "50e873b67d5ddd485d2c50185d8ac10f4d2c781e6a5a45f429c83526903e7e07",
                "md5": "a4a6a83cd460d239893699373e74f497",
                "sha256": "8ebd63644eedc778755d1e7f03accf34812feca960b4149a8c89c924db1a7698"
            },
            "downloads": -1,
            "filename": "spotter_cli-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a4a6a83cd460d239893699373e74f497",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 22950,
            "upload_time": "2025-07-27T13:28:32",
            "upload_time_iso_8601": "2025-07-27T13:28:32.870349Z",
            "url": "https://files.pythonhosted.org/packages/50/e8/73b67d5ddd485d2c50185d8ac10f4d2c781e6a5a45f429c83526903e7e07/spotter_cli-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-27 13:28:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mrlikl",
    "github_project": "spotter#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "spotter-cli"
}
        
Elapsed time: 1.50971s