[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F47KX3CB2KYJW247S3G01R":3,"skill-same:01M6F47KX3CB2KYJW247S3G01R":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":46,"linkOnly":47,"markdownContent":48,"markdownBody":49,"frontMatter":50,"refName":36,"commitSha":60,"skillDirectory":61,"forksCount":62,"repositoryHtmlUrl":63,"repositoryHomepageUrl":6,"ownerHtmlUrl":64,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":65,"install":66,"resources":79},"01M6F47KX3CB2KYJW247S3G01R","blue-green-deploy",null,"Configure zero-downtime deployment strategies including blue-green, canary, and rolling deployments.","boisenoise\u002Fskills-collections","boisenoise","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F193180?v=4","01M6CDBDQK6BDN55ZMA6B6PKBM","01M6CDBDVSJ3JPTBYN26FZ7TZK",13,"MIT","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-blue-green-deploy\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"deploy","blue","blue green deploy","blue green","green","2026","security","blue-green","relevant","scripts","critical","strategies","deployment strategies","main","community","only","configure","access","canary","devops-security","kubectl","ci","git","2026-11-10 10:12:30",false,"---\nname: blue-green-deploy\ndescription: Configure zero-downtime deployment strategies including blue-green, canary,\n  and rolling deployments.\ncategory: devops\nrisk: critical\nsource: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\nsource_repo: BagelHole\u002FDevOps-Security-Agent-Skills\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires the relevant platform CLIs (kubectl, helm, terraform, git,\n  CI runners) and authorized access to the target environment. Docs-only; helper scripts\n  and templates not bundled.\nmetadata:\n  author: devops-skills\n  version: '1.0'\n---\n\n# Blue-Green & Deployment Strategies\n\nImplement zero-downtime deployment patterns for production systems.\n\n## Prerequisites\n\n- Load balancer or ingress controller\n- Container orchestration (K8s) or cloud platform\n- CI\u002FCD pipeline\n- Health check endpoints\n\n## Deployment Strategy Overview\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    DEPLOYMENT STRATEGIES                     │\n├─────────────┬─────────────┬─────────────┬──────────────────┤\n│  Blue-Green │   Canary    │   Rolling   │    Recreate      │\n├─────────────┼─────────────┼─────────────┼──────────────────┤\n│ Full env    │ Gradual %   │ Pod by pod  │ All at once      │\n│ swap        │ rollout     │ replacement │                  │\n├─────────────┼─────────────┼─────────────┼──────────────────┤\n│ Instant     │ Slow, safe  │ Moderate    │ Fast, risky      │\n│ rollback    │ rollback    │ rollback    │                  │\n├─────────────┼─────────────┼─────────────┼──────────────────┤\n│ 2x resources│ +10-25%     │ Same        │ Same             │\n│ needed      │ resources   │ resources   │                  │\n└─────────────┴─────────────┴─────────────┴──────────────────┘\n```\n\n## Blue-Green Deployment\n\n### Concept\n\n```\nBefore:\n┌─────────┐     ┌───────────────┐\n│  Users  │────▶│  Blue (v1)    │ ◀── Active\n└─────────┘     └───────────────┘\n                ┌───────────────┐\n                │  Green (v2)   │ ◀── Staging\n                └───────────────┘\n\nAfter Switch:\n┌─────────┐     ┌───────────────┐\n│  Users  │     │  Blue (v1)    │ ◀── Standby\n└─────────┘     └───────────────┘\n      │         ┌───────────────┐\n      └────────▶│  Green (v2)   │ ◀── Active\n                └───────────────┘\n```\n\n### Kubernetes Implementation\n\n```yaml\n# blue-deployment.yaml\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: myapp-blue\n  labels:\n    app: myapp\n    version: blue\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: myapp\n      version: blue\n  template:\n    metadata:\n      labels:\n        app: myapp\n        version: blue\n    spec:\n      containers:\n      - name: myapp\n        image: myapp:v1.0.0\n        ports:\n        - containerPort: 8080\n        readinessProbe:\n          httpGet:\n            path: \u002Fhealth\n            port: 8080\n          initialDelaySeconds: 5\n          periodSeconds: 5\n---\n# green-deployment.yaml\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: myapp-green\n  labels:\n    app: myapp\n    version: green\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: myapp\n      version: green\n  template:\n    metadata:\n      labels:\n        app: myapp\n        version: green\n    spec:\n      containers:\n      - name: myapp\n        image: myapp:v2.0.0\n        ports:\n        - containerPort: 8080\n        readinessProbe:\n          httpGet:\n            path: \u002Fhealth\n            port: 8080\n          initialDelaySeconds: 5\n          periodSeconds: 5\n---\n# service.yaml - Switch by changing selector\napiVersion: v1\nkind: Service\nmetadata:\n  name: myapp\nspec:\n  selector:\n    app: myapp\n    version: blue  # Change to 'green' to switch\n  ports:\n  - port: 80\n    targetPort: 8080\n```\n\n### Switch Script\n\n```bash\n#!\u002Fbin\u002Fbash\n# blue-green-switch.sh\n\nset -euo pipefail\nNEW_VERSION=${1:?Usage: blue-green-switch.sh blue|green}\ncase \"$NEW_VERSION\" in blue|green) ;; *) echo \"Invalid color\" >&2; exit 2 ;; esac\n\nCURRENT=$(kubectl get svc myapp -o jsonpath='{.spec.selector.version}')\n\necho \"Current version: $CURRENT\"\necho \"Switching to: $NEW_VERSION\"\n\n# Verify new deployment is ready\nkubectl rollout status \"deployment\u002Fmyapp-$NEW_VERSION\" --timeout=300s\n\n# Check health\nHEALTH=$(kubectl exec \"deployment\u002Fmyapp-$NEW_VERSION\" -- curl --fail --silent --show-error --max-time 5 localhost:8080\u002Fready)\nif ! printf '%s' \"$HEALTH\" | jq -e '.status == \"healthy\"' >\u002Fdev\u002Fnull; then\n  echo \"Health check failed\"\n  exit 1\nfi\n\n# Switch traffic\nkubectl patch svc myapp -p \"{\\\"spec\\\":{\\\"selector\\\":{\\\"version\\\":\\\"$NEW_VERSION\\\"}}}\"\n\necho \"Switched to $NEW_VERSION\"\n```\n\n### AWS ECS Blue-Green\n\n```yaml\n# AWS CodeDeploy appspec.yml\nversion: 0.0\nResources:\n  - TargetService:\n      Type: AWS::ECS::Service\n      Properties:\n        TaskDefinition: \"arn:aws:ecs:region:account:task-definition\u002Fmyapp:2\"\n        LoadBalancerInfo:\n          ContainerName: \"myapp\"\n          ContainerPort: 8080\nHooks:\n  - BeforeInstall: \"LambdaFunctionToValidateBeforeTrafficShift\"\n  - AfterInstall: \"LambdaFunctionToValidateAfterTrafficShift\"\n  - AfterAllowTestTraffic: \"LambdaFunctionToValidateTestTraffic\"\n  - BeforeAllowTraffic: \"LambdaFunctionToValidateBeforeAllowTraffic\"\n  - AfterAllowTraffic: \"LambdaFunctionToValidateAfterAllowTraffic\"\n```\n\nThe switch example assumes curl inside the application container and local jq. Test the green endpoint separately, preserve the old selector for rollback, and verify service endpoints and external health after switching. The Istio example below needs a service selecting both stable and canary pods; do not reuse the color-restricted blue\u002Fgreen selector.\n\n## Canary Deployment\n\n### Kubernetes with Istio\n\n```yaml\n# VirtualService for traffic splitting\napiVersion: networking.istio.io\u002Fv1beta1\nkind: VirtualService\nmetadata:\n  name: myapp\nspec:\n  hosts:\n  - myapp\n  http:\n  - match:\n    - headers:\n        x-canary:\n          exact: \"true\"\n    route:\n    - destination:\n        host: myapp\n        subset: canary\n  - route:\n    - destination:\n        host: myapp\n        subset: stable\n      weight: 90\n    - destination:\n        host: myapp\n        subset: canary\n      weight: 10\n---\napiVersion: networking.istio.io\u002Fv1beta1\nkind: DestinationRule\nmetadata:\n  name: myapp\nspec:\n  host: myapp\n  subsets:\n  - name: stable\n    labels:\n      version: stable\n  - name: canary\n    labels:\n      version: canary\n```\n\n### Argo Rollouts\n\n```yaml\napiVersion: argoproj.io\u002Fv1alpha1\nkind: Rollout\nmetadata:\n  name: myapp\nspec:\n  replicas: 5\n  strategy:\n    canary:\n      steps:\n      - setWeight: 10\n      - pause: {duration: 5m}\n      - setWeight: 25\n      - pause: {duration: 5m}\n      - setWeight: 50\n      - pause: {duration: 5m}\n      - setWeight: 75\n      - pause: {duration: 5m}\n      analysis:\n        templates:\n        - templateName: success-rate\n        startingStep: 2\n        args:\n        - name: service-name\n          value: myapp\n  selector:\n    matchLabels:\n      app: myapp\n  template:\n    metadata:\n      labels:\n        app: myapp\n    spec:\n      containers:\n      - name: myapp\n        image: myapp:v2.0.0\n        ports:\n        - containerPort: 8080\n---\napiVersion: argoproj.io\u002Fv1alpha1\nkind: AnalysisTemplate\nmetadata:\n  name: success-rate\nspec:\n  args:\n  - name: service-name\n  metrics:\n  - name: success-rate\n    interval: 1m\n    successCondition: result[0] >= 0.95\n    failureLimit: 3\n    provider:\n      prometheus:\n        address: http:\u002F\u002Fprometheus:9090\n        query: |\n          sum(rate(http_requests_total{service=\"{{args.service-name}}\",status=~\"2.*\"}[5m]))\n          \u002F\n          sum(rate(http_requests_total{service=\"{{args.service-name}}\"}[5m]))\n```\n\n## Rolling Deployment\n\n### Kubernetes Default\n\n```yaml\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: myapp\nspec:\n  replicas: 5\n  strategy:\n    type: RollingUpdate\n    rollingUpdate:\n      maxSurge: 1        # Max pods above desired\n      maxUnavailable: 0   # Max pods unavailable\n  selector:\n    matchLabels:\n      app: myapp\n  template:\n    metadata:\n      labels:\n        app: myapp\n    spec:\n      containers:\n      - name: myapp\n        image: myapp:v2.0.0\n        ports:\n        - containerPort: 8080\n        readinessProbe:\n          httpGet:\n            path: \u002Fready\n            port: 8080\n          initialDelaySeconds: 5\n          periodSeconds: 5\n        livenessProbe:\n          httpGet:\n            path: \u002Fhealth\n            port: 8080\n          initialDelaySeconds: 10\n          periodSeconds: 10\n```\n\n### Rolling Update Commands\n\n```bash\n# Update image\nkubectl set image deployment\u002Fmyapp myapp=myapp:v2.0.0\n\n# Watch rollout\nkubectl rollout status deployment\u002Fmyapp\n\n# Pause rollout\nkubectl rollout pause deployment\u002Fmyapp\n\n# Resume rollout\nkubectl rollout resume deployment\u002Fmyapp\n\n# Rollback\nkubectl rollout undo deployment\u002Fmyapp\n\n# Rollback to specific revision\nkubectl rollout undo deployment\u002Fmyapp --to-revision=2\n\n# View history\nkubectl rollout history deployment\u002Fmyapp\n```\n\n## Health Checks\n\n### Comprehensive Health Endpoint\n\n```python\n# Flask health endpoint\nfrom flask import Flask, jsonify\nimport psycopg2\nimport redis\nimport os\nDATABASE_URL = os.environ[\"DATABASE_URL\"]\nREDIS_URL = os.environ[\"REDIS_URL\"]\n\napp = Flask(__name__)\n\n@app.route('\u002Fhealth')\ndef health():\n    \"\"\"Liveness probe - is the app running?\"\"\"\n    return jsonify({'status': 'healthy'}), 200\n\n@app.route('\u002Fready')\ndef ready():\n    \"\"\"Readiness probe - can the app serve traffic?\"\"\"\n    checks = {}\n    \n    # Database check\n    try:\n        conn = psycopg2.connect(DATABASE_URL, connect_timeout=3)\n        conn.close()\n        checks['database'] = 'ok'\n    except Exception as e:\n        checks['database'] = 'unavailable'\n        return jsonify({'status': 'unhealthy', 'checks': checks}), 503\n    \n    # Redis check\n    try:\n        r = redis.from_url(REDIS_URL, socket_connect_timeout=3, socket_timeout=3)\n        r.ping()\n        checks['redis'] = 'ok'\n    except Exception as e:\n        checks['redis'] = 'unavailable'\n        return jsonify({'status': 'unhealthy', 'checks': checks}), 503\n    \n    return jsonify({'status': 'healthy', 'checks': checks}), 200\n```\n\n\n## Contents\n\n- [Rollback Procedures](references\u002Fdetails.md)\n- [Rollback Checklist](references\u002Fdetails.md)\n- [Common Issues](references\u002Fdetails.md)\n- [Best Practices](references\u002Fdetails.md)\n- [Related Skills](references\u002Fdetails.md)\n\n## When to Use This Skill\n\nUse this skill when:\n- Implementing zero-downtime deployments\n- Reducing deployment risk\n- Enabling instant rollbacks\n- Running canary releases\n- Performing A\u002FB testing in production\n\n## Limitations\n\n- Guidance executes against real environments: confirm target, blast radius, and rollback plan before applying anything.\n- Never deploy to production without explicit approval. Docs-only import: upstream scripts and templates not bundled.\n\n### Example\n\n```bash\ngit status && git diff --stat\nkubectl diff -f manifest.yaml\n```\n\n> Adapted from [BagelHole\u002FDevOps-Security-Agent-Skills](https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.\n","# Blue-Green & Deployment Strategies\n\nImplement zero-downtime deployment patterns for production systems.\n\n## Prerequisites\n\n- Load balancer or ingress controller\n- Container orchestration (K8s) or cloud platform\n- CI\u002FCD pipeline\n- Health check endpoints\n\n## Deployment Strategy Overview\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    DEPLOYMENT STRATEGIES                     │\n├─────────────┬─────────────┬─────────────┬──────────────────┤\n│  Blue-Green │   Canary    │   Rolling   │    Recreate      │\n├─────────────┼─────────────┼─────────────┼──────────────────┤\n│ Full env    │ Gradual %   │ Pod by pod  │ All at once      │\n│ swap        │ rollout     │ replacement │                  │\n├─────────────┼─────────────┼─────────────┼──────────────────┤\n│ Instant     │ Slow, safe  │ Moderate    │ Fast, risky      │\n│ rollback    │ rollback    │ rollback    │                  │\n├─────────────┼─────────────┼─────────────┼──────────────────┤\n│ 2x resources│ +10-25%     │ Same        │ Same             │\n│ needed      │ resources   │ resources   │                  │\n└─────────────┴─────────────┴─────────────┴──────────────────┘\n```\n\n## Blue-Green Deployment\n\n### Concept\n\n```\nBefore:\n┌─────────┐     ┌───────────────┐\n│  Users  │────▶│  Blue (v1)    │ ◀── Active\n└─────────┘     └───────────────┘\n                ┌───────────────┐\n                │  Green (v2)   │ ◀── Staging\n                └───────────────┘\n\nAfter Switch:\n┌─────────┐     ┌───────────────┐\n│  Users  │     │  Blue (v1)    │ ◀── Standby\n└─────────┘     └───────────────┘\n      │         ┌───────────────┐\n      └────────▶│  Green (v2)   │ ◀── Active\n                └───────────────┘\n```\n\n### Kubernetes Implementation\n\n```yaml\n# blue-deployment.yaml\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: myapp-blue\n  labels:\n    app: myapp\n    version: blue\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: myapp\n      version: blue\n  template:\n    metadata:\n      labels:\n        app: myapp\n        version: blue\n    spec:\n      containers:\n      - name: myapp\n        image: myapp:v1.0.0\n        ports:\n        - containerPort: 8080\n        readinessProbe:\n          httpGet:\n            path: \u002Fhealth\n            port: 8080\n          initialDelaySeconds: 5\n          periodSeconds: 5\n---\n# green-deployment.yaml\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: myapp-green\n  labels:\n    app: myapp\n    version: green\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: myapp\n      version: green\n  template:\n    metadata:\n      labels:\n        app: myapp\n        version: green\n    spec:\n      containers:\n      - name: myapp\n        image: myapp:v2.0.0\n        ports:\n        - containerPort: 8080\n        readinessProbe:\n          httpGet:\n            path: \u002Fhealth\n            port: 8080\n          initialDelaySeconds: 5\n          periodSeconds: 5\n---\n# service.yaml - Switch by changing selector\napiVersion: v1\nkind: Service\nmetadata:\n  name: myapp\nspec:\n  selector:\n    app: myapp\n    version: blue  # Change to 'green' to switch\n  ports:\n  - port: 80\n    targetPort: 8080\n```\n\n### Switch Script\n\n```bash\n#!\u002Fbin\u002Fbash\n# blue-green-switch.sh\n\nset -euo pipefail\nNEW_VERSION=${1:?Usage: blue-green-switch.sh blue|green}\ncase \"$NEW_VERSION\" in blue|green) ;; *) echo \"Invalid color\" >&2; exit 2 ;; esac\n\nCURRENT=$(kubectl get svc myapp -o jsonpath='{.spec.selector.version}')\n\necho \"Current version: $CURRENT\"\necho \"Switching to: $NEW_VERSION\"\n\n# Verify new deployment is ready\nkubectl rollout status \"deployment\u002Fmyapp-$NEW_VERSION\" --timeout=300s\n\n# Check health\nHEALTH=$(kubectl exec \"deployment\u002Fmyapp-$NEW_VERSION\" -- curl --fail --silent --show-error --max-time 5 localhost:8080\u002Fready)\nif ! printf '%s' \"$HEALTH\" | jq -e '.status == \"healthy\"' >\u002Fdev\u002Fnull; then\n  echo \"Health check failed\"\n  exit 1\nfi\n\n# Switch traffic\nkubectl patch svc myapp -p \"{\\\"spec\\\":{\\\"selector\\\":{\\\"version\\\":\\\"$NEW_VERSION\\\"}}}\"\n\necho \"Switched to $NEW_VERSION\"\n```\n\n### AWS ECS Blue-Green\n\n```yaml\n# AWS CodeDeploy appspec.yml\nversion: 0.0\nResources:\n  - TargetService:\n      Type: AWS::ECS::Service\n      Properties:\n        TaskDefinition: \"arn:aws:ecs:region:account:task-definition\u002Fmyapp:2\"\n        LoadBalancerInfo:\n          ContainerName: \"myapp\"\n          ContainerPort: 8080\nHooks:\n  - BeforeInstall: \"LambdaFunctionToValidateBeforeTrafficShift\"\n  - AfterInstall: \"LambdaFunctionToValidateAfterTrafficShift\"\n  - AfterAllowTestTraffic: \"LambdaFunctionToValidateTestTraffic\"\n  - BeforeAllowTraffic: \"LambdaFunctionToValidateBeforeAllowTraffic\"\n  - AfterAllowTraffic: \"LambdaFunctionToValidateAfterAllowTraffic\"\n```\n\nThe switch example assumes curl inside the application container and local jq. Test the green endpoint separately, preserve the old selector for rollback, and verify service endpoints and external health after switching. The Istio example below needs a service selecting both stable and canary pods; do not reuse the color-restricted blue\u002Fgreen selector.\n\n## Canary Deployment\n\n### Kubernetes with Istio\n\n```yaml\n# VirtualService for traffic splitting\napiVersion: networking.istio.io\u002Fv1beta1\nkind: VirtualService\nmetadata:\n  name: myapp\nspec:\n  hosts:\n  - myapp\n  http:\n  - match:\n    - headers:\n        x-canary:\n          exact: \"true\"\n    route:\n    - destination:\n        host: myapp\n        subset: canary\n  - route:\n    - destination:\n        host: myapp\n        subset: stable\n      weight: 90\n    - destination:\n        host: myapp\n        subset: canary\n      weight: 10\n---\napiVersion: networking.istio.io\u002Fv1beta1\nkind: DestinationRule\nmetadata:\n  name: myapp\nspec:\n  host: myapp\n  subsets:\n  - name: stable\n    labels:\n      version: stable\n  - name: canary\n    labels:\n      version: canary\n```\n\n### Argo Rollouts\n\n```yaml\napiVersion: argoproj.io\u002Fv1alpha1\nkind: Rollout\nmetadata:\n  name: myapp\nspec:\n  replicas: 5\n  strategy:\n    canary:\n      steps:\n      - setWeight: 10\n      - pause: {duration: 5m}\n      - setWeight: 25\n      - pause: {duration: 5m}\n      - setWeight: 50\n      - pause: {duration: 5m}\n      - setWeight: 75\n      - pause: {duration: 5m}\n      analysis:\n        templates:\n        - templateName: success-rate\n        startingStep: 2\n        args:\n        - name: service-name\n          value: myapp\n  selector:\n    matchLabels:\n      app: myapp\n  template:\n    metadata:\n      labels:\n        app: myapp\n    spec:\n      containers:\n      - name: myapp\n        image: myapp:v2.0.0\n        ports:\n        - containerPort: 8080\n---\napiVersion: argoproj.io\u002Fv1alpha1\nkind: AnalysisTemplate\nmetadata:\n  name: success-rate\nspec:\n  args:\n  - name: service-name\n  metrics:\n  - name: success-rate\n    interval: 1m\n    successCondition: result[0] >= 0.95\n    failureLimit: 3\n    provider:\n      prometheus:\n        address: http:\u002F\u002Fprometheus:9090\n        query: |\n          sum(rate(http_requests_total{service=\"{{args.service-name}}\",status=~\"2.*\"}[5m]))\n          \u002F\n          sum(rate(http_requests_total{service=\"{{args.service-name}}\"}[5m]))\n```\n\n## Rolling Deployment\n\n### Kubernetes Default\n\n```yaml\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: myapp\nspec:\n  replicas: 5\n  strategy:\n    type: RollingUpdate\n    rollingUpdate:\n      maxSurge: 1        # Max pods above desired\n      maxUnavailable: 0   # Max pods unavailable\n  selector:\n    matchLabels:\n      app: myapp\n  template:\n    metadata:\n      labels:\n        app: myapp\n    spec:\n      containers:\n      - name: myapp\n        image: myapp:v2.0.0\n        ports:\n        - containerPort: 8080\n        readinessProbe:\n          httpGet:\n            path: \u002Fready\n            port: 8080\n          initialDelaySeconds: 5\n          periodSeconds: 5\n        livenessProbe:\n          httpGet:\n            path: \u002Fhealth\n            port: 8080\n          initialDelaySeconds: 10\n          periodSeconds: 10\n```\n\n### Rolling Update Commands\n\n```bash\n# Update image\nkubectl set image deployment\u002Fmyapp myapp=myapp:v2.0.0\n\n# Watch rollout\nkubectl rollout status deployment\u002Fmyapp\n\n# Pause rollout\nkubectl rollout pause deployment\u002Fmyapp\n\n# Resume rollout\nkubectl rollout resume deployment\u002Fmyapp\n\n# Rollback\nkubectl rollout undo deployment\u002Fmyapp\n\n# Rollback to specific revision\nkubectl rollout undo deployment\u002Fmyapp --to-revision=2\n\n# View history\nkubectl rollout history deployment\u002Fmyapp\n```\n\n## Health Checks\n\n### Comprehensive Health Endpoint\n\n```python\n# Flask health endpoint\nfrom flask import Flask, jsonify\nimport psycopg2\nimport redis\nimport os\nDATABASE_URL = os.environ[\"DATABASE_URL\"]\nREDIS_URL = os.environ[\"REDIS_URL\"]\n\napp = Flask(__name__)\n\n@app.route('\u002Fhealth')\ndef health():\n    \"\"\"Liveness probe - is the app running?\"\"\"\n    return jsonify({'status': 'healthy'}), 200\n\n@app.route('\u002Fready')\ndef ready():\n    \"\"\"Readiness probe - can the app serve traffic?\"\"\"\n    checks = {}\n    \n    # Database check\n    try:\n        conn = psycopg2.connect(DATABASE_URL, connect_timeout=3)\n        conn.close()\n        checks['database'] = 'ok'\n    except Exception as e:\n        checks['database'] = 'unavailable'\n        return jsonify({'status': 'unhealthy', 'checks': checks}), 503\n    \n    # Redis check\n    try:\n        r = redis.from_url(REDIS_URL, socket_connect_timeout=3, socket_timeout=3)\n        r.ping()\n        checks['redis'] = 'ok'\n    except Exception as e:\n        checks['redis'] = 'unavailable'\n        return jsonify({'status': 'unhealthy', 'checks': checks}), 503\n    \n    return jsonify({'status': 'healthy', 'checks': checks}), 200\n```\n\n\n## Contents\n\n- [Rollback Procedures](references\u002Fdetails.md)\n- [Rollback Checklist](references\u002Fdetails.md)\n- [Common Issues](references\u002Fdetails.md)\n- [Best Practices](references\u002Fdetails.md)\n- [Related Skills](references\u002Fdetails.md)\n\n## When to Use This Skill\n\nUse this skill when:\n- Implementing zero-downtime deployments\n- Reducing deployment risk\n- Enabling instant rollbacks\n- Running canary releases\n- Performing A\u002FB testing in production\n\n## Limitations\n\n- Guidance executes against real environments: confirm target, blast radius, and rollback plan before applying anything.\n- Never deploy to production without explicit approval. Docs-only import: upstream scripts and templates not bundled.\n\n### Example\n\n```bash\ngit status && git diff --stat\nkubectl diff -f manifest.yaml\n```\n\n> Adapted from [BagelHole\u002FDevOps-Security-Agent-Skills](https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.\n",{"name":5,"risk":33,"source":51,"license":14,"category":52,"metadata":53,"date_added":56,"description":7,"source_repo":57,"source_type":37,"compatibility":58,"license_source":59},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills","devops",{"author":54,"version":55},"devops-skills","1.0","2026-09-20","BagelHole\u002FDevOps-Security-Agent-Skills","Requires the relevant platform CLIs (kubectl, helm, terraform, git, CI runners) and authorized access to the target environment. Docs-only; helper scripts and templates not bundled.","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE","7bf2279c8a65758319526a721d5c4b75683aec9c","skills\u002Fantigravity-blue-green-deploy",3,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections","https:\u002F\u002Fgithub.com\u002Fboisenoise","2026-11-14 14:18:11",{"source":8,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add boisenoise\u002Fskills-collections --skill blue-green-deploy",{"tool":72,"command":73},"bunx","bunx skills add boisenoise\u002Fskills-collections --skill blue-green-deploy",{"tool":75,"command":76},"pnpm","pnpm dlx skills add boisenoise\u002Fskills-collections --skill blue-green-deploy","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-blue-green-deploy\u002FSKILL.md",true,[80],{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fdetails.md","REFERENCE","参考文档",3123,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-blue-green-deploy\u002Freferences\u002Fdetails.md",[87,113,139,165,184,207],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":91,"licenseFileUrl":92,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":46},"01M6WNH92BHVFXHGPDZCPJ0AG0","web-access","Use Treg for public web or platform data only when existing search, browser and connected tools cannot cover the task, with explicit cost and data boundaries.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-web-access\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-web-access\u002FSKILL.md",[],[96,40,97,98,99,100,101,102,103,104,105,38,106,107,108,33,109,110,111,112,28],"web","web access","official","development","browser","search","data","Tools","read","fetch","youtube","free tools","platform","free","cover","normal","when",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":91,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":123,"publishedAt":46},"01M6WNF9XAYAB2CZDDJBAKNM93","treg","Use the Treg CLI or MCP catalog to discover, price and call authorized external tools with team-scoped credentials and a user-approved budget.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-treg\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-treg\u002FSKILL.md",[120],{"categoryNo":121,"categoryName":122,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",[115,124,125,126,98,99,127,103,128,129,130,131,132,133,134,33,135,136,137,138,28],"MCP","cli","github","license","Budget","credentials","team","catalog","use","call","discover","external tools","with","scoped","blob",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":91,"licenseFileUrl":143,"sourceHtmlUrl":144,"categories":145,"keywords":151,"publishedAt":46},"01M6WN93MEAZ4E41DYAHJRPHQT","recruit","Turn a job description into an evidence-linked candidate shortlist through Treg, with job-related ranking and optional authorized business contact enrichment.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-recruit\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-recruit\u002FSKILL.md",[146],{"categoryNo":147,"categoryName":148,"taxonomyType":149,"taxonomyTypeDesc":150},"01JBSEEDCAT000000000000038","人力资源","PROFESSION","适用职业",[141,126,98,127,152,153,154,155,156,157,33,158,159,160,136,161,162,163,164,138,115,28],"https","email","enrichment","business","evidence","phone","ranking","post","job description","for","person","candidate","reason",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":91,"licenseFileUrl":169,"sourceHtmlUrl":170,"categories":171,"keywords":172,"publishedAt":46},"01M6WN8R5RXSMHM9B4D9FAFX42","rea-growth","Analyze a company’s public growth and content through Treg, distinguish observations from hypotheses, and produce an evidence-linked playbook within an approved budget.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-rea-growth\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-rea-growth\u002FSKILL.md",[],[173,174,175,126,98,127,176,177,152,178,128,179,180,181,156,33,182,183,138,115,28],"growth","rea","rea growth","produce","content","playbook","marketing","analyze","public","observations","company",{"skillNo":185,"name":186,"nameZh":6,"description":187,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":91,"licenseFileUrl":188,"sourceHtmlUrl":189,"categories":190,"keywords":191,"publishedAt":46},"01M6WN2EVE3RQRGWAKBT4S7YT2","make-ugc","Create original AI UGC-style product videos through Treg: research hooks, approve a licensed presenter and voice, generate clips, add captions and report costs.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-make-ugc\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-make-ugc\u002FSKILL.md",[],[192,193,126,194,98,195,127,196,197,198,199,200,33,201,202,203,204,205,206,138],"make","make ugc","research","create","Video","Captions","ads","short","hooks","head","style","niche","trending","talking-head","approve",{"skillNo":208,"name":209,"nameZh":6,"description":210,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":91,"licenseFileUrl":211,"sourceHtmlUrl":212,"categories":213,"keywords":214,"publishedAt":46},"01M6WN10ARAA63Y8K1YNGXJ2RM","lead-signals","Find and qualify public buying signals through Treg, rank fitting business accounts and optionally enrich authorized business contact information.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lead-signals\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lead-signals\u002FSKILL.md",[],[215,216,217,126,98,127,218,219,155,220,221,33,222,223,224,225,226,227,228,138],"signals","lead","lead signals","how","find","ready","as","how to","qualify","people","information","enrich","changes","funding"]