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 从公开仓库中收录这些内容。

举报或申请下架