Kubernetes Deployment

aj-geddes/useful-ai-prompts/skills/kubernetes-deployment

作者 aj-geddes3f5182cfd739無授權條款355 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫7 個月前更新

Deploy, manage, and scale containerized applications on Kubernetes clusters with best practices for production workloads, resource management, and rolling updates.

包含腳本DevOps & Cloud
AI 產生的概覽

依照正式環境最佳實務,在 Kubernetes 上部署、管理與擴充容器化應用程式。

功能
提供將容器化工作負載部署到 Kubernetes 叢集的指引與參考資料,涵蓋資源請求與限制、健康檢查、滾動更新、服務帳戶與 RBAC,以及 Pod 安全性。內含一份設定起始範本,以及一支用來檢查設定的驗證指令碼。產出為部署設定與維運指引,而非應用程式程式碼。
適用情境
適合在 Kubernetes 上部署或擴充容器化應用程式、建立多環境發佈流程,或為正式環境工作負載設定資源管理、健康檢查與存取控制時使用。
執行需求
需要 Kubernetes 叢集以及 kubectl 或等效的存取方式,並具備建立 Deployment 與相關資源的權限。附帶一支 Shell 驗證指令碼與一份 YAML 設定範本。

Kubernetes Deployment

Table of Contents

Overview

Master Kubernetes deployments for managing containerized applications at scale, including multi-container services, resource allocation, health checks, and rolling deployment strategies.

When to Use

  • Container orchestration and management
  • Multi-environment deployments (dev, staging, prod)
  • Auto-scaling microservices
  • Rolling updates and blue-green deployments
  • Service discovery and load balancing
  • Resource quota and limit management
  • Pod networking and security policies

Quick Start

Minimal working example:

yaml
# kubernetes-deployment.yamlapiVersion: apps/v1kind: Deploymentmetadata:  name: api-service  namespace: production  labels:    app: api-service    version: v1spec:  replicas: 3  strategy:    type: RollingUpdate    rollingUpdate:      maxSurge: 1      maxUnavailable: 0  selector:    matchLabels:      app: api-service  template:    metadata:      labels:        app: api-service        version: v1      annotations:// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Complete Deployment with Resource Management [blocked]Complete Deployment with Resource Management
Deployment Script [blocked]Deployment Script
Service Account and RBAC [blocked]Service Account and RBAC

Best Practices

✅ DO

  • Use resource requests and limits
  • Implement health checks (liveness, readiness)
  • Use ConfigMaps for configuration
  • Apply security context restrictions
  • Use service accounts and RBAC
  • Implement pod anti-affinity
  • Use namespaces for isolation
  • Enable pod security policies

❌ DON'T

  • Use latest image tags in production
  • Run containers as root
  • Set unlimited resource usage
  • Skip readiness probes
  • Deploy without resource limits
  • Mix configurations in container images
  • Use default service accounts

來源與署名

來源:aj-geddes/useful-ai-prompts位於skills/kubernetes-deployment提交3f5182c

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架