Kubernetes Deployment
Skill Profile
(Select at least one profile to enable specific modules)
Overview
Kubernetes is a container orchestration platform that automates deployment, scaling, and management of containerized applications. This skill covers K8s concepts, resources, and best practices for deploying applications in production environments.
Why This Matters
Kubernetes has become the de facto standard for container orchestration, enabling organizations to:
- Scale applications automatically based on resource usage
- Achieve high availability through self-healing and replication
- Implement zero-downtime deployments with rolling updates
- Manage complex multi-service architectures efficiently
- Standardize deployment patterns across teams
- Reduce infrastructure costs through efficient resource utilization
Core Concepts & Rules
1. Core Principles
- Follow established patterns and conventions
- Maintain consistency across codebase
- Document decisions and trade-offs
2. Implementation Guidelines
- Start with the simplest viable solution
- Iterate based on feedback and requirements
- Test thoroughly before deployment
Inputs / Outputs / Contracts
Skill Composition
- Depends on: git-workflow
- Compatible with: None
- Conflicts with: None
- Related Skills: docker, kubernetes
Quick Start / Implementation Example
- Review requirements and constraints
- Set up development environment
- Implement core functionality following patterns
- Write tests for critical paths
- Run tests and fix issues
- Document any deviations or decisions
# Example implementation following best practices
def example_function():
# Your implementation here
pass
Assumptions
- Kubernetes cluster is already provisioned and accessible
kubectl CLI is installed and configured
- Container images are available in a registry
- Application exposes health check endpoints
- Storage class is available if persistent storage is needed
Compatibility & Prerequisites
- Supported Versions:
- Python 3.8+
- Node.js 16+
- Modern browsers (Chrome, Firefox, Safari, Edge)
- Required AI Tools:
- Code editor (VS Code recommended)
- Testing framework appropriate for language
- Version control (Git)
- Dependencies:
- Language-specific package manager
- Build tools
- Testing libraries
- Environment Setup:
.env.example keys: API_KEY, DATABASE_URL (no values)
Test Scenario Matrix (QA Strategy)
| Type |
Focus Area |
Required Scenarios / Mocks |
| Unit |
Core Logic |
Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |
| Integration |
DB / API |
All external API calls or database connections must be mocked during unit tests |
| E2E |
User Journey |
Critical user flows to test |
| Performance |
Latency / Load |
Benchmark requirements |
| Security |
Vuln / Auth |
SAST/DAST or dependency audit |
| Frontend |
UX / A11y |
Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |
Technical Guardrails & Security Threat Model
1. Security & Privacy (Threat Model)
- Top Threats: Injection attacks, authentication bypass, data exposure
2. Performance & Resources
3. Architecture & Scalability
4. Observability & Reliability
Agent Directives
When deploying to Kubernetes:
- Always validate resources before applying
- Check resource availability before scaling
- Monitor rollout status after deployment
- Verify health checks are passing
- Review logs if pods fail to start
- Use dry-run for testing changes
Definition of Done (DoD) Checklist
Anti-patterns
- Running as root: Avoid running containers as root user
- Hardcoded values: Don't hardcode environment-specific values
- Ignoring limits: Never deploy without resource limits
- Latest tag: Avoid using
:latest image tag
- Monolithic pods: Don't run multiple processes in one container
- Ignoring health checks: Always implement health checks
Reference Links & Examples
- Internal documentation and examples
- Official documentation and best practices
- Community resources and discussions
Versioning & Changelog
- Version: 1.0.0
- Changelog:
- 2026-02-22: Initial version with complete template structure
Source: AmnadTaowsoam/CerebraSkills — distributed by TomeVault.
1---2name: kubernetes-deployment-93description: Kubernetes is a container orchestration platform that automates deployment, Use when this capability is needed.4---56# Kubernetes Deployment78## Skill Profile9*(Select at least one profile to enable specific modules)*10- [ ] **DevOps**11- [x] **Backend**12- [ ] **Frontend**13- [ ] **AI-RAG**14- [ ] **Security Critical**1516## Overview17Kubernetes is a container orchestration platform that automates deployment, scaling, and management of containerized applications. This skill covers K8s concepts, resources, and best practices for deploying applications in production environments.1819## Why This Matters20Kubernetes has become the de facto standard for container orchestration, enabling organizations to:2122- **Scale applications automatically** based on resource usage23- **Achieve high availability** through self-healing and replication24- **Implement zero-downtime deployments** with rolling updates25- **Manage complex multi-service architectures** efficiently26- **Standardize deployment patterns** across teams27- **Reduce infrastructure costs** through efficient resource utilization2829---3031## Core Concepts & Rules3233### 1. Core Principles34- Follow established patterns and conventions35- Maintain consistency across codebase36- Document decisions and trade-offs3738### 2. Implementation Guidelines39- Start with the simplest viable solution40- Iterate based on feedback and requirements41- Test thoroughly before deployment424344## Inputs / Outputs / Contracts45#4647## Skill Composition48* **Depends on**: [git-workflow](..\..\01-foundations\git-workflow/SKILL.md)49* **Compatible with**: None50* **Conflicts with**: None51* **Related Skills**: [docker](..\docker-compose/SKILL.md), [kubernetes](./SKILL.md)5253## Quick Start / Implementation Example54551. Review requirements and constraints562. Set up development environment573. Implement core functionality following patterns584. Write tests for critical paths595. Run tests and fix issues606. Document any deviations or decisions6162```python63# Example implementation following best practices64def example_function():65 # Your implementation here66 pass67```686970## Assumptions71- Kubernetes cluster is already provisioned and accessible72- `kubectl` CLI is installed and configured73- Container images are available in a registry74- Application exposes health check endpoints75- Storage class is available if persistent storage is needed7677## Compatibility & Prerequisites7879* **Supported Versions**:80 - Python 3.8+81 - Node.js 16+82 - Modern browsers (Chrome, Firefox, Safari, Edge)83* **Required AI Tools**:84 - Code editor (VS Code recommended)85 - Testing framework appropriate for language86 - Version control (Git)87* **Dependencies**:88 - Language-specific package manager89 - Build tools90 - Testing libraries91* **Environment Setup**:92 - `.env.example` keys: `API_KEY`, `DATABASE_URL` (no values)939495## Test Scenario Matrix (QA Strategy)9697| Type | Focus Area | Required Scenarios / Mocks |98| :--- | :--- | :--- |99| **Unit** | Core Logic | Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |100| **Integration** | DB / API | All external API calls or database connections must be mocked during unit tests |101| **E2E** | User Journey | Critical user flows to test |102| **Performance** | Latency / Load | Benchmark requirements |103| **Security** | Vuln / Auth | SAST/DAST or dependency audit |104| **Frontend** | UX / A11y | Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |105106107## Technical Guardrails & Security Threat Model108109### 1. Security & Privacy (Threat Model)110* **Top Threats**: Injection attacks, authentication bypass, data exposure111- [ ] **Data Handling**: Sanitize all user inputs to prevent Injection attacks. Never log raw PII112- [ ] **Secrets Management**: No hardcoded API keys. Use Env Vars/Secrets Manager113- [ ] **Authorization**: Validate user permissions before state changes114115### 2. Performance & Resources116- [ ] **Execution Efficiency**: Consider time complexity for algorithms117- [ ] **Memory Management**: Use streams/pagination for large data118- [ ] **Resource Cleanup**: Close DB connections/file handlers in finally blocks119120### 3. Architecture & Scalability121- [ ] **Design Pattern**: Follow SOLID principles, use Dependency Injection122- [ ] **Modularity**: Decouple logic from UI/Frameworks123124### 4. Observability & Reliability125- [ ] **Logging Standards**: Structured JSON, include trace IDs `request_id`126- [ ] **Metrics**: Track `error_rate`, `latency`, `queue_depth`127- [ ] **Error Handling**: Standardized error codes, no bare except128- [ ] **Observability Artifacts**:129 - **Log Fields**: timestamp, level, message, request_id130 - **Metrics**: request_count, error_count, response_time131 - **Dashboards/Alerts**: High Error Rate > 5%132133134## Agent Directives135When deploying to Kubernetes:1361371. **Always validate** resources before applying1382. **Check resource availability** before scaling1393. **Monitor rollout status** after deployment1404. **Verify health checks** are passing1415. **Review logs** if pods fail to start1426. **Use dry-run** for testing changes143144## Definition of Done (DoD) Checklist145146- [ ] Tests passed + coverage met147- [ ] Lint/Typecheck passed148- [ ] Logging/Metrics/Trace implemented149- [ ] Security checks passed150- [ ] Documentation/Changelog updated151- [ ] Accessibility/Performance requirements met (if frontend)152153154## Anti-patterns1551. **Running as root**: Avoid running containers as root user1562. **Hardcoded values**: Don't hardcode environment-specific values1573. **Ignoring limits**: Never deploy without resource limits1584. **Latest tag**: Avoid using `:latest` image tag1595. **Monolithic pods**: Don't run multiple processes in one container1606. **Ignoring health checks**: Always implement health checks161162## Reference Links & Examples163164* Internal documentation and examples165* Official documentation and best practices166* Community resources and discussions167168169## Versioning & Changelog170171* **Version**: 1.0.0172* **Changelog**:173 - 2026-02-22: Initial version with complete template structure174175---176> Source: [AmnadTaowsoam/CerebraSkills](https://github.com/AmnadTaowsoam/CerebraSkills) — distributed by [TomeVault](https://tomevault.io).177<!-- tomevault:4.0:skill_md:2026-06-16 -->