К основному содержанию
команда

setup-kubernetes-deployment — команда для Claude Code: установка

Разворачивает инфраструктуру Kubernetes в проекте: от аудита Dockerfile до генерации манифестов, настройки Ingress и автоскейлинга. Пригодится при переносе сервиса в кластер.

Установить в Claude Code · Через claude-code-templates Все способы и платформы ↓
npx claude-code-templates@latest --command deployment/setup-kubernetes-deployment
Открыть на GitHub

Что делает setup-kubernetes-deployment

Команда анализирует проект перед созданием конфигураций. Через инструменты Read, Write, Edit и Bash она проверяет @package.json или @Dockerfile для оценки контейнеризации, ищет существующие манифесты и опрашивает кластер с помощью kubectl cluster-info. Также проверяются реестр образов в docker-compose.yml и потребности сервиса в ресурсах.

После аудита генерируются манифесты Deployment, Service, ConfigMap, PersistentVolumeClaim и NetworkPolicy. Сценарий охватывает маршрутизацию Ingress с TLS-сертификатами, масштабирование через HPA или VPA, пробы liveness и readiness, а также правила безопасности на базе RBAC. Поддерживаются целевые флаги: --microservices, --monolith, --stateful, --full-stack и --production-ready.

Без настроенного kubectl или доступа к кластеру команда всё равно сформирует манифесты, но сделает это вслепую, опираясь только на локальные файлы.

Какие задачи решает

  • сформировать манифесты Deployment, Service и Ingress под проект
  • настроить горизонтальное и вертикальное автоскейлирование через HPA и VPA
  • добавить проверки доступности liveness, readiness и startup probes
  • сконфигурировать сетевые политики NetworkPolicy и правила RBAC

Примеры запросов агенту

  • /setup-kubernetes-deployment --production-ready
  • /setup-kubernetes-deployment --microservices
  • /setup-kubernetes-deployment подготовь манифесты для монолита с PersistentVolumeClaim

Как установить setup-kubernetes-deployment

1Через claude-code-templates

npx claude-code-templates@latest --command deployment/setup-kubernetes-deployment

2Вручную: положить файлы

.claude/commands/setup-kubernetes-deployment.md

Вызов — /setup-kubernetes-deployment. Для всех проектов — ~/.claude/commands/

Вопросы о setup-kubernetes-deployment

Как установить setup-kubernetes-deployment в Claude Code?

Выполните команду npx claude-code-templates@latest --command deployment/setup-kubernetes-deployment. Шаблон сохранится в файл .claude/commands/setup-kubernetes-deployment.md.

Что делает команда setup-kubernetes-deployment?

Она исследует контейнеризацию проекта, проверяет статус кластера через kubectl и создаёт готовую конфигурацию Kubernetes с учётом сетевых политик, ресурсов и балансировки.

Какие флаги развёртывания поддерживает команда?

В аргументах можно передать --microservices, --monolith, --stateful, --full-stack или --production-ready, чтобы агент сразу выбрал нужную архитектуру манифестов.

Исходный текст

setup-kubernetes-deployment.md · MIT
---
allowed-tools: Read, Write, Edit, Bash
argument-hint: "[deployment-type] | --microservices | --monolith | --stateful | --full-stack | --production-ready"
description: Configure comprehensive Kubernetes deployment with manifests, security, scaling, and production best practices
---

# Kubernetes Deployment Configuration

Configure Kubernetes deployment: $ARGUMENTS

## Current Environment Analysis

- Application type: @package.json or @Dockerfile (detect containerization readiness)
- Existing K8s config: !`find . -name "*.yaml" -o -name "*.yml" | grep -E "(k8s|kubernetes|deployment|service)" | head -3`
- Cluster access: !`kubectl cluster-info 2>/dev/null | head -2 || echo "No cluster access"`
- Container registry: @docker-compose.yml or check for registry configuration
- Resource requirements: Analysis needed based on application type

## Task

Implement production-ready Kubernetes deployment:

1. **Kubernetes Architecture Planning**
   - Analyze application architecture and deployment requirements
   - Define resource requirements (CPU, memory, storage, network)
   - Plan namespace organization and multi-tenancy strategy
   - Assess high availability and disaster recovery requirements
   - Define scaling strategies and performance requirements

2. **Cluster Setup and Configuration**
   - Set up Kubernetes cluster (managed or self-hosted)
   - Configure cluster networking and CNI plugin
   - Set up cluster storage classes and persistent volumes
   - Configure cluster security policies and RBAC
   - Set up cluster monitoring and logging infrastructure

3. **Application Containerization**
   - Ensure application is properly containerized
   - Optimize container images for Kubernetes deployment
   - Configure multi-stage builds and security scanning
   - Set up container registry and image management
   - Configure image pull policies and secrets

4. **Kubernetes Manifest Creation**
   - Create Deployment manifests with proper resource limits
   - Set up Service manifests for internal and external communication
   - Configure ConfigMaps and Secrets for configuration management
   - Create PersistentVolumeClaims for data storage
   - Set up NetworkPolicies for security and isolation

5. **Load Balancing and Ingress**
   - Configure Ingress controllers and routing rules
   - Set up SSL/TLS termination and certificate management
   - Configure load balancing strategies and session affinity
   - Set up external DNS and domain management
   - Configure traffic management and canary deployments

6. **Auto-scaling Configuration**
   - Set up Horizontal Pod Autoscaler (HPA) based on metrics
   - Configure Vertical Pod Autoscaler (VPA) for resource optimization
   - Set up Cluster Autoscaler for node scaling
   - Configure custom metrics and scaling policies
   - Set up resource quotas and limits

7. **Health Checks and Monitoring**
   - Configure liveness and readiness probes
   - Set up startup probes for slow-starting applications
   - Configure health check endpoints and monitoring
   - Set up application metrics collection
   - Configure alerting and notification systems

8. **Security and Compliance**
   - Configure Pod Security Standards and policies
   - Set up network segmentation and security policies
   - Configure service accounts and RBAC permissions
   - Set up secret management and rotation
   - Configure security scanning and compliance monitoring

9. **CI/CD Integration**
   - Set up automated Kubernetes deployment pipelines
   - Configure GitOps workflows with ArgoCD or Flux
   - Set up automated testing in Kubernetes environments
   - Configure blue-green and canary deployment strategies
   - Set up rollback and disaster recovery procedures

10. **Operations and Maintenance**
    - Set up cluster maintenance and update procedures
    - Configure backup and disaster recovery strategies
    - Set up cost optimization and resource management
    - Create operational runbooks and troubleshooting guides
    - Train team on Kubernetes operations and best practices
    - Set up cluster lifecycle management and governance

© davila7 · MIT · davila7/claude-code-templates

Похожие слэш-команды

Все слэш-команды по теме «DevOps и инфраструктура» →

Из того же набора740

Весь набор →
branch-cleanup Слэш-команда для Claude, которая находит слитые и устаревшие ветки, проверяет их перед удалением и наводит порядок в локальном и удалённом репозитории. 342установок pentest-checklist Скилл проводит через планирование пентеста: цели, границы, подготовка среды, выбор исполнителей и мониторинг. Пригодится перед проверкой на проникновение. 336установок milestone-tracker Команда собирает отчёт о ходе этапов проекта: показывает прогресс, риски и прогноз сроков. Можно задать период или выбрать спринт и квартал. 335установок nextjs-scaffold Разворачивает каркас приложения Next.js с готовой структурой папок, App Router, правилами ESLint и базовой защитой. 334установок research-engineer Превращает Claude Code в академического исследователя. Агент отбрасывает вежливость и сразу критикует некорректные технические предпосылки. 333установок create-database-migrations Слэш-команда для Claude, которая создаёт файлы миграций базы данных с версионированием и методами отката. Пригодится, когда меняете схему и не хотите писать up/down вручную. 329установок nia-oracle Субагент для Claude, который ищет репозитории и документацию через инструменты Nia, индексирует найденное и достаёт оттуда ответы. 329установок accessibility Скилл помогает проверять веб-интерфейсы на доступность по WCAG 2.1 и предлагать правки. Запросите аудит, поддержку клавиатуры или улучшения для скринридеров. 325установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой