L’interface est localisée ; les présentations et documents des Skills sont traduits automatiquement par IA dans votre langue. Le code, les commandes, chemins et termes techniques restent en version originale, et le document de l’auteur fait foi.
Explorer les Skills
Design et création · SKILL.md

container-strategy

container-strategy

Design container strategies — image optimization, orchestration selection, security scanning, registry management, and resource limits. TRIGGER when: user says /container-strategy, needs container architecture guidance, or asks about Docker/Kubernetes best practices.

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentation de la Skill

GitHub

name: container-strategy description: > Design container strategies — image optimization, orchestration selection, security scanning, registry management, and resource limits. TRIGGER when: user says /container-strategy, needs container architecture guidance, or asks about Docker/Kubernetes best practices. argument-hint: "[application or service to containerize]" user-invocable: true

Container Strategy

You are a platform engineering specialist. Design a container strategy that balances performance, security, and operability.

Process

Step 1: Assess Requirements

DimensionQuestions
Workload typeStateless web, stateful database, batch job, ML inference?
ScaleNumber of services, instances, expected growth
Team expertiseContainer/K8s experience level
EnvironmentCloud, on-prem, hybrid, multi-cloud
ComplianceSecurity scanning requirements, approved base images

Step 2: Optimize Images

PracticeDetails
Base imageUse minimal images (Alpine, distroless, scratch)
Multi-stage buildsSeparate build dependencies from runtime
Layer orderingPut least-changing layers first for cache efficiency
.dockerignoreExclude test files, docs, .git
Image size target< 100MB for services, < 500MB for ML workloads
No secrets in imagesUse runtime injection, never bake in credentials

Step 3: Select Orchestration

OptionBest ForComplexity
Kubernetes (EKS/GKE/AKS)Large-scale, multi-service, team expertiseHigh
ECS/FargateAWS-native, simpler operational modelMedium
Cloud Run / App RunnerStateless HTTP services, minimal opsLow
Docker ComposeDevelopment, small deploymentsLow
NomadMulti-runtime, simpler than K8sMedium

Step 4: Security

LayerControls
Image scanningScan for CVEs in CI/CD (Trivy, Snyk, Grype)
Base image policyApproved base images only, auto-rebuild on CVE
Runtime securityRead-only filesystem, non-root user, no privileged mode
Network policiesRestrict pod-to-pod communication
SecretsExternal secrets manager, mounted at runtime
RegistryPrivate registry, signed images, access controls

Step 5: Resource Management

ResourceApproach
CPU requestsSet to average usage, limits to peak
Memory requestsSet to working set, limits to max + buffer
StorageUse ephemeral for temp, PV for persistence
AutoscalingHPA on CPU/custom metrics, VPA for right-sizing
Resource quotasPer-namespace limits to prevent noisy neighbors

Step 6: Operations

ConcernSolution
LoggingStructured JSON, collected by sidecar or DaemonSet
MonitoringPrometheus metrics, Grafana dashboards
Health checksLiveness + readiness + startup probes
Rollout strategyRolling update with maxSurge/maxUnavailable
DebuggingEphemeral debug containers, kubectl exec policies

Output Format

## Container Strategy: [Service/Platform]
### Architecture: [Orchestration choice with rationale]
### Image Standards: [Base image, size targets, scanning]
### Resource Defaults: [CPU/memory requests/limits]
### Security: [Scanning, runtime, network policies]
### Operations: [Logging, monitoring, rollout]

Quality Checklist

  • Images are minimal and multi-stage built
  • Security scanning integrated in CI/CD
  • Resource requests and limits defined
  • Health checks configured for all services
  • Non-root containers enforced
  • Registry access controlled

Edge Cases

  • For ML workloads with GPU, use NVIDIA runtime and GPU resource scheduling
  • For legacy apps, consider init containers for migration scripts
  • If team is new to K8s, start with managed services (Fargate, Cloud Run)
  • For stateful workloads, evaluate operators (e.g., PostgreSQL operator)
Skills enregistrées