deployment-patterns

Explain deployment strategies, Dockerfiles, CI/CD pipelines, and Kubernetes probes.

Updated Jan 9, 2025
One-click install
npx skills add https://github.com/baotoq/go-shortener --skill deployment-patterns-baotoq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deployment-patterns
Source: https://github.com/baotoq/go-shortener/tree/main/.agents/skills/deployment-patterns
Command: npx skills add https://github.com/baotoq/go-shortener --skill deployment-patterns-baotoq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance on deploying applications to production, ensuring reliability, and streamlining the release process.

Core Features & Use Cases

  • Deployment Strategies: Explains Rolling, Blue-Green, and Canary deployments with pros and cons.
  • Dockerization: Offers multi-stage Dockerfile examples for Go, Node.js, and Python, along with best practices.
  • CI/CD: Includes a GitHub Actions example and outlines typical pipeline stages.
  • Health Checks & Readiness: Details health check endpoints and Kubernetes probes.
  • Configuration & Rollback: Covers environment configuration (Twelve-Factor App) and rollback strategies.
  • Production Readiness: Provides a detailed checklist for ensuring applications are ready for production.

Quick Start

Use the deployment-patterns skill to generate a multi-stage Dockerfile for a Go application.

Frequently Asked Questions about deployment-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the difference between rolling, blue-green, and canary deployment strategies?

Rolling deployment updates instances gradually, blue-green switches traffic between two identical environments, and canary releases to a subset of users first. Each strategy offers distinct trade-offs in speed, risk, and rollback complexity for production releases.

How do I write a multi-stage Dockerfile for a Node.js or Go application?

Multi-stage Dockerfiles use separate builder and runtime stages to compile your application and copy only the final artifacts into a minimal base image. This pattern reduces final image size and improves security for production deployments.

How do I configure Kubernetes health checks and readiness probes?

Kubernetes probes check container health using liveness and readiness endpoints. Liveness probes restart failing containers, while readiness probes control traffic routing to ensure only healthy pods receive requests during deployments.

What should be included in a production readiness checklist for Kubernetes deployments?

A production readiness checklist verifies health checks, rollback strategies, environment configuration, and CI/CD pipeline stages. It ensures applications follow the Twelve-Factor App pattern for configuration and have proper Docker containerization before release.

How do I automate deployment and rollback using GitHub Actions CI/CD pipelines?

GitHub Actions CI/CD pipelines automate deployment through defined workflow stages that build, test, and push Docker images. Rollback strategies execute by re-deploying previous stable image tags when health checks fail in production.

When should I use canary deployment instead of a rolling update?

Use canary deployment when you need to validate changes with a small subset of traffic before full release, reducing risk. Choose rolling updates for faster, simpler deployments when you have high confidence in your application's backward compatibility.