<<<<<<< HEAD
=======
This project provides automated solutions for container resource management and cost optimization in Kubernetes and Docker environments.
- Identifies and removes unused Docker images, containers, and volumes
- Configurable retention policies
- Safe cleanup with dry-run option
- Automated scaling of non-production clusters
- AWS Lambda integration for scheduled scaling
- Configurable scaling rules and thresholds
- Automated log management using Fluentd
- Configurable retention policies
- Elasticsearch integration for log storage
.
├── README.md
├── requirements.txt
├── docker_cleanup/
│ ├── __init__.py
│ └── cleanup.py
├── eks_optimization/
│ ├── __init__.py
│ └── scaling.py
└── log_management/
├── __init__.py
├── fluentd.conf
└── log_rotation.py
- Install dependencies:
pip install -r requirements.txt
- Configure AWS credentials:
aws configure
- Set up Fluentd (if using log management):
# Install Fluentd
brew install fluentd
python docker_cleanup/cleanup.py --dry-run
python eks_optimization/scaling.py --cluster-name my-cluster --scale-down
python log_management/log_rotation.py --retention-days 30
Each component can be configured through environment variables or configuration files:
DOCKER_CLEANUP_RETENTION_DAYS
: Number of days to retain Docker resourcesEKS_SCALING_SCHEDULE
: Cron expression for scaling scheduleLOG_RETENTION_DAYS
: Number of days to retain logs
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
MIT License
042d81b (Initial commit)