canary-deployment
canary deployment — production-ready canary configuration and management for Kubernetes infrastructure.
Canary Deployment
Deploy and manage canary infrastructure with battle-tested patterns and automation.
Overview
This skill provides comprehensive guidance for canary deployment in production environments. It covers initial setup, configuration management, scaling strategies, and operational best practices that teams use to run reliable infrastructure.
The skill handles the full lifecycle — from bootstrapping a new canary configuration to debugging production issues, managing upgrades, and implementing security hardening. It produces infrastructure-as-code that is reviewable, testable, and version-controlled.
Built on real-world patterns from organizations running canary at scale, this skill emphasizes repeatability, observability, and cost-efficiency while avoiding common footguns that lead to outages or security incidents.
When to Use
Activate this skill when the user needs to:
Set up canary for a new project or environment
Migrate existing infrastructure to canary-managed configuration
Debug and troubleshoot canary deployment issues
Implement security hardening for canary resources
Optimize Kubernetes costs through canary configuration
Create CI/CD pipelines that include canary operations
Core Capabilities
Initial Setup & Configuration
Generates complete canary configuration files with sensible defaults, proper directory structure, and environment-specific overrides. Includes documentation comments explaining each configuration choice.
Security Hardening
Applies least-privilege principles, encrypts sensitive data, implements network policies, and follows CIS benchmarks for canary deployments. Generates audit-ready configurations.
Scaling & Performance
Configures auto-scaling policies, resource limits, health checks, and load balancing. Monitors resource utilization and recommends right-sizing based on actual usage patterns.
Disaster Recovery
Implements backup strategies, failover configurations, and recovery procedures. Tests disaster scenarios and documents runbooks for operational teams.
Example Prompts
Users might ask:
"Set up canary for our Kubernetes production environment"
"Create a canary module for the database cluster"
"Debug why the canary deployment is failing on the staging environment"
"Add monitoring and alerting to our canary infrastructure"
"Optimize the canary configuration to reduce our monthly cloud bill"
Configuration
ParameterDefaultDescription
environmentproductionTarget deployment environment
regionus-east-1Primary cloud region
dryRunfalsePreview changes without applying
backupEnabledtrueEnable automated backups
Best Practices
Use version control for all infrastructure code — Every configuration change should go through code review, just like application code
Implement state locking — Prevent concurrent modifications that can corrupt infrastructure state
Use modules for reusability — Extract common patterns into reusable modules with well-defined interfaces
Tag all resources — Apply consistent tags for cost allocation, ownership, and environment identification
Test infrastructure changes — Use plan/preview commands before applying, and run automated validation tests
Document operational procedures — Maintain runbooks for common operations like scaling, failover, and rollback
Common Pitfalls
⚠️ Hardcoding secrets in configuration files — use secret managers or environment variables
⚠️ Not using state locking — concurrent applies can corrupt infrastructure state
⚠️ Skipping the plan/preview step — always review what will change before applying
⚠️ Over-provisioning resources — start small and scale based on actual metrics
⚠️ Not testing disaster recovery — untested backups are not backups
Output Format
Generates complete canary configuration files, module structures, variable definitions, and CI/CD pipeline configurations. Includes inline documentation and operational runbooks.