Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计异常

creating-kubernetes-deploymentscreating Kubernetes deployments 部署

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

682

周安装

29

GitHub Stars

2,135

下载量

239
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:creating-kubernetes-deployments(creating Kubernetes deployments 部署)
来源仓库:https://github.com/jeremylongshore/claude-code-plugins-plus-skills
仓库路径:skills/creating-kubernetes-deployments
安装命令:
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill creating-kubernetes-deployments
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill creating-kubernetes-deployments

简介

用于辅助云资源、部署、容器、基础设施和运维自动化任务。

  • 适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。
  • 使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作。
  • 涉及删除资源、重启服务、修改网络或权限配置时应先确认影响范围。
  • creating-kubernetes-deployments 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Creating Kubernetes Deployments

Generate production-ready Kubernetes manifests with health checks, resource limits, and security best practices.

Quick Start

Basic Deployment + Service

# deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-api
  labels:
    app: my-api
spec:
  replicas: 3
  selector:
    matchLabels:
      app: my-api
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
  template:
    metadata:
      labels:
        app: my-api
    spec:
      containers:
      - name: my-api
        image: my-registry/my-api:v1.0.0
        ports:
        - containerPort: 8080  # 8080: HTTP proxy port
        resources:
          requests:
            cpu: 100m
            memory: 256Mi
          limits:
            cpu: 500m
            memory: 512Mi
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8080  # HTTP proxy port
          initialDelaySeconds: 30
          periodSeconds: 10
        readinessProbe:
          httpGet:
            path: /readyz
            port: 8080  # HTTP proxy port
          initialDelaySeconds: 5
          periodSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
  name: my-api
spec:
  type: ClusterIP
  selector:
    app: my-api
  ports:
  - port: 80
    targetPort: 8080  # HTTP proxy port

Deployment Strategies

StrategyUse CaseConfiguration
RollingUpdateZero-downtime updatesmaxSurge: 25%, maxUnavailable: 25%
RecreateStateful apps, incompatible versionstype: Recreate
Blue-GreenInstant rollbackTwo deployments, switch Service selector
CanaryGradual rolloutMultiple deployments with weighted traffic

Blue-Green Deployment

# Blue deployment (current production)
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-api-blue
  labels:
    app: my-api
    version: blue
spec:
  replicas: 3
  selector:
    matchLabels:
      app: my-api
      version: blue
  template:
    metadata:
      labels:
        app: my-api
        version: blue
    spec:
      containers:
      - name: my-api
        image: my-registry/my-api:v1.0.0
---
# Service points to blue
apiVersion: v1
kind: Service
metadata:
  name: my-api
spec:
  selector:
    app: my-api
    version: blue  # Switch to 'green' for deployment
  ports:
  - port: 80
    targetPort: 8080  # 8080: HTTP proxy port

Service Types

TypeUse CaseAccess
ClusterIPInternal servicesmy-api.namespace.svc.cluster.local
NodePortDevelopment, debugging<NodeIP>:<NodePort>
LoadBalancerExternal traffic (cloud)Cloud provider LB IP
ExternalNameExternal service proxyDNS CNAME

Ingress with TLS

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: my-api-ingress
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
  ingressClassName: nginx
  tls:
  - hosts:
    - api.example.com
    secretName: api-tls-secret
  rules:
  - host: api.example.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: my-api
            port:
              number: 80

Resource Limits

Always set resource requests and limits:

resources:
  requests:    # Guaranteed resources
    cpu: 100m  # 0.1 CPU core
    memory: 256Mi
  limits:      # Maximum allowed
    cpu: 500m  # 0.5 CPU core
    memory: 512Mi
Workload TypeCPU RequestMemory RequestCPU LimitMemory Limit
Web API100m-500m256Mi-512Mi500m-1000m512Mi-1Gi
Worker250m-1000m512Mi-1Gi1000m-2000m1Gi-2Gi
Database500m-2000m1Gi-4Gi2000m-4000m4Gi-8Gi

Health Checks

Liveness Probe (Is container running?)

livenessProbe:
  httpGet:
    path: /healthz
    port: 8080  # 8080: HTTP proxy port
  initialDelaySeconds: 30  # Wait for app startup
  periodSeconds: 10         # Check every 10s
  timeoutSeconds: 5         # Timeout per check
  failureThreshold: 3       # Restart after 3 failures

Readiness Probe (Ready for traffic?)

readinessProbe:
  httpGet:
    path: /readyz
    port: 8080  # 8080: HTTP proxy port
  initialDelaySeconds: 5    # Quick check after start
  periodSeconds: 5          # Check every 5s
  successThreshold: 1       # 1 success = ready
  failureThreshold: 3       # Remove from LB after 3 failures

Startup Probe (Slow-starting apps)

startupProbe:
  httpGet:
    path: /healthz
    port: 8080  # 8080: HTTP proxy port
  initialDelaySeconds: 0
  periodSeconds: 10
  failureThreshold: 30      # Allow 5 minutes to start (30 * 10s)

Horizontal Pod Autoscaler

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: my-api-hpa
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: my-api
  minReplicas: 2
  maxReplicas: 10
  metrics:
  - type: Resource
    resource:
      name: cpu
      target:
        type: Utilization
        averageUtilization: 70
  - type: Resource
    resource:
      name: memory
      target:
        type: Utilization
        averageUtilization: 80
  behavior:
    scaleDown:
      stabilizationWindowSeconds: 300  # 300: Wait 5min before scale down

ConfigMaps and Secrets

ConfigMap (Non-sensitive config)

apiVersion: v1
kind: ConfigMap
metadata:
  name: my-api-config
data:
  LOG_LEVEL: "info"
  API_ENDPOINT: "https://api.example.com"
  config.yaml: |
    server:
      port: 8080  # 8080: HTTP proxy port
    features:
      enabled: true

Secret (Sensitive data - base64 encoded)

apiVersion: v1
kind: Secret
metadata:
  name: my-api-secrets
type: Opaque
data:
  API_KEY: YXBpLWtleS1oZXJl          # echo -n "api-key-here" | base64
  DATABASE_URL: cG9zdGdyZXM6Ly8uLi4=  # echo -n "postgres://..." | base64

Using in Deployment

spec:
  containers:
  - name: my-api
    envFrom:
    - configMapRef:
        name: my-api-config
    - secretRef:
        name: my-api-secrets
    volumeMounts:
    - name: config-volume
      mountPath: /app/config
  volumes:
  - name: config-volume
    configMap:
      name: my-api-config

Instructions

  1. Gather Requirements

- Application name, container image, port - Replica count and resource requirements - Health check endpoints - External access requirements (Ingress/LoadBalancer)

  1. Generate Base Manifests

- Create Deployment with resource limits and probes - Create Service (ClusterIP for internal, LoadBalancer for external) - Add ConfigMap for configuration - Add Secret for sensitive data

  1. Add Production Features

- Configure Ingress with TLS if external access needed - Add HPA for auto-scaling - Add NetworkPolicy for security - Add PodDisruptionBudget for availability

  1. Validate and Apply # Validate manifests kubectl apply -f manifests/ --dry-run=server # Apply to cluster kubectl apply -f manifests/ # Watch rollout kubectl rollout status deployment/my-api

Error Handling

See ${CLAUDE_SKILL_DIR}/references/errors.md for comprehensive troubleshooting.

ErrorQuick Fix
ImagePullBackOffCheck image name, tag, registry credentials
CrashLoopBackOffCheck logs: kubectl logs <pod>
OOMKilledIncrease memory limits
PendingCheck resources: kubectl describe pod <pod>

Examples

See ${CLAUDE_SKILL_DIR}/references/examples.md for detailed walkthroughs.

Resources

Overview

Deploy applications to Kubernetes with production-ready manifests.

Prerequisites

  • Access to the Kubernetes environment or API
  • Required CLI tools installed and authenticated
  • Familiarity with Kubernetes concepts and terminology

Output

  • Configuration files or code changes applied to the project
  • Validation report confirming correct implementation
  • Summary of changes made and their rationale

See Kubernetes implementation details for output format specifications.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.74%
按下载量换算90

Claude

29.29%
按下载量换算70

Cursor

19.12%
按下载量换算46

Gemini CLI

8.9%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills