Lightweight Kubernetes
Skill Profile
(Select at least one profile to enable specific modules)
Overview
Lightweight Kubernetes provides container orchestration for resource-constrained edge and IoT devices. It uses minimal resource footprints while providing core Kubernetes functionality for edge computing scenarios.
Why This Matters
- Resource Efficiency: 60-80% reduction in resource requirements
- Edge Enablement: Enables containerized edge applications
- Cost Reduction: Lower hardware requirements for edge devices
- Operational Consistency: Same orchestration across cloud and edge
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
- Inputs:
- Edge device specifications (CPU, memory, storage)
- Container images and manifests
- Configuration parameters (resource limits, networking)
- Entry Conditions:
- Edge devices provisioned and accessible
- Network connectivity available (for initial setup)
- Sufficient resources on edge devices
- Outputs:
- Running Kubernetes cluster on edge devices
- Deployed pods and services
- Cluster status and metrics
- Artifacts Required (Deliverables):
- Lightweight K8s distribution installed
- Pod manifests and deployments
- Configuration files
- Monitoring setup
- Acceptance Evidence:
- Cluster uptime > 99.5%
- Pod success rate > 99%
- Memory footprint < 100MB per node
- Resource usage < 80% of allocated
- Success Criteria:
- Node resource usage < 80% of allocated resources
- Pod success rate > 99% of deployments
- Cluster uptime > 99.5%
- Sync success rate > 95% of sync operations
- Memory footprint < 100MB per node
Skill Composition
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 / Constraints / Non-goals
- Assumptions:
- Development environment is properly configured
- Required dependencies are available
- Team has basic understanding of domain
- Constraints:
- Must follow existing codebase conventions
- Time and resource limitations
- Compatibility requirements
- Non-goals:
- This skill does not cover edge cases outside scope
- Not a replacement for formal training
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 & Error Recovery
(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)
- Thinking Process: Analyze root cause before fixing. Do not brute-force.
- Fallback Strategy: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.
- Self-Review: Check against Guardrails & Anti-patterns before finalizing.
- Output Constraints: Output ONLY the modified code block. Do not explain unless asked.
Definition of Done (DoD) Checklist
Anti-patterns / Pitfalls
- ⛔ Don't: Log PII, catch-all exception, N+1 queries
- ⚠️ Watch out for: Common symptoms and quick fixes
- 💡 Instead: Use proper error handling, pagination, and logging
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
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: lightweight-kubernetes3description: Lightweight Kubernetes provides container orchestration for resource-constrained Use when this capability is needed.4---56# Lightweight Kubernetes78## 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## Overview17Lightweight Kubernetes provides container orchestration for resource-constrained edge and IoT devices. It uses minimal resource footprints while providing core Kubernetes functionality for edge computing scenarios.1819## Why This Matters20- **Resource Efficiency**: 60-80% reduction in resource requirements21- **Edge Enablement**: Enables containerized edge applications22- **Cost Reduction**: Lower hardware requirements for edge devices23- **Operational Consistency**: Same orchestration across cloud and edge2425---2627## Core Concepts & Rules2829### 1. Core Principles30- Follow established patterns and conventions31- Maintain consistency across codebase32- Document decisions and trade-offs3334### 2. Implementation Guidelines35- Start with the simplest viable solution36- Iterate based on feedback and requirements37- Test thoroughly before deployment383940## Inputs / Outputs / Contracts41* **Inputs**:42 - Edge device specifications (CPU, memory, storage)43 - Container images and manifests44 - Configuration parameters (resource limits, networking)45* **Entry Conditions**:46 - Edge devices provisioned and accessible47 - Network connectivity available (for initial setup)48 - Sufficient resources on edge devices49* **Outputs**:50 - Running Kubernetes cluster on edge devices51 - Deployed pods and services52 - Cluster status and metrics53* **Artifacts Required (Deliverables)**:54 - Lightweight K8s distribution installed55 - Pod manifests and deployments56 - Configuration files57 - Monitoring setup58* **Acceptance Evidence**:59 - Cluster uptime > 99.5%60 - Pod success rate > 99%61 - Memory footprint < 100MB per node62 - Resource usage < 80% of allocated63* **Success Criteria**:64 - Node resource usage < 80% of allocated resources65 - Pod success rate > 99% of deployments66 - Cluster uptime > 99.5%67 - Sync success rate > 95% of sync operations68 - Memory footprint < 100MB per node6970## Skill Composition71* **Depends on**: [Edge Cloud Sync](../75-edge-computing/edge-cloud-sync/SKILL.md)72* **Compatible with**: [Edge AI Acceleration](../75-edge-computing/edge-ai-acceleration/SKILL.md), [Edge Observability](../75-edge-computing/edge-observability/SKILL.md)73* **Conflicts with**: Standard Kubernetes (resource constraints)74* **Related Skills**: [Edge Cloud Sync](../75-edge-computing/edge-cloud-sync/SKILL.md), [Edge AI Acceleration](../75-edge-computing/edge-ai-acceleration/SKILL.md)7576---7778## Quick Start / Implementation Example79801. Review requirements and constraints812. Set up development environment823. Implement core functionality following patterns834. Write tests for critical paths845. Run tests and fix issues856. Document any deviations or decisions8687```python88# Example implementation following best practices89def example_function():90 # Your implementation here91 pass92```939495## Assumptions / Constraints / Non-goals9697* **Assumptions**:98 - Development environment is properly configured99 - Required dependencies are available100 - Team has basic understanding of domain101* **Constraints**:102 - Must follow existing codebase conventions103 - Time and resource limitations104 - Compatibility requirements105* **Non-goals**:106 - This skill does not cover edge cases outside scope107 - Not a replacement for formal training108109110## Compatibility & Prerequisites111112* **Supported Versions**:113 - Python 3.8+114 - Node.js 16+115 - Modern browsers (Chrome, Firefox, Safari, Edge)116* **Required AI Tools**:117 - Code editor (VS Code recommended)118 - Testing framework appropriate for language119 - Version control (Git)120* **Dependencies**:121 - Language-specific package manager122 - Build tools123 - Testing libraries124* **Environment Setup**:125 - `.env.example` keys: `API_KEY`, `DATABASE_URL` (no values)126127128## Test Scenario Matrix (QA Strategy)129130| Type | Focus Area | Required Scenarios / Mocks |131| :--- | :--- | :--- |132| **Unit** | Core Logic | Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |133| **Integration** | DB / API | All external API calls or database connections must be mocked during unit tests |134| **E2E** | User Journey | Critical user flows to test |135| **Performance** | Latency / Load | Benchmark requirements |136| **Security** | Vuln / Auth | SAST/DAST or dependency audit |137| **Frontend** | UX / A11y | Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |138139140## Technical Guardrails & Security Threat Model141142### 1. Security & Privacy (Threat Model)143* **Top Threats**: Injection attacks, authentication bypass, data exposure144- [ ] **Data Handling**: Sanitize all user inputs to prevent Injection attacks. Never log raw PII145- [ ] **Secrets Management**: No hardcoded API keys. Use Env Vars/Secrets Manager146- [ ] **Authorization**: Validate user permissions before state changes147148### 2. Performance & Resources149- [ ] **Execution Efficiency**: Consider time complexity for algorithms150- [ ] **Memory Management**: Use streams/pagination for large data151- [ ] **Resource Cleanup**: Close DB connections/file handlers in finally blocks152153### 3. Architecture & Scalability154- [ ] **Design Pattern**: Follow SOLID principles, use Dependency Injection155- [ ] **Modularity**: Decouple logic from UI/Frameworks156157### 4. Observability & Reliability158- [ ] **Logging Standards**: Structured JSON, include trace IDs `request_id`159- [ ] **Metrics**: Track `error_rate`, `latency`, `queue_depth`160- [ ] **Error Handling**: Standardized error codes, no bare except161- [ ] **Observability Artifacts**:162 - **Log Fields**: timestamp, level, message, request_id163 - **Metrics**: request_count, error_count, response_time164 - **Dashboards/Alerts**: High Error Rate > 5%165166167## Agent Directives & Error Recovery168*(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)*169170- **Thinking Process**: Analyze root cause before fixing. Do not brute-force.171- **Fallback Strategy**: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.172- **Self-Review**: Check against Guardrails & Anti-patterns before finalizing.173- **Output Constraints**: Output ONLY the modified code block. Do not explain unless asked.174175176## Definition of Done (DoD) Checklist177178- [ ] Tests passed + coverage met179- [ ] Lint/Typecheck passed180- [ ] Logging/Metrics/Trace implemented181- [ ] Security checks passed182- [ ] Documentation/Changelog updated183- [ ] Accessibility/Performance requirements met (if frontend)184185186## Anti-patterns / Pitfalls187188* ⛔ **Don't**: Log PII, catch-all exception, N+1 queries189* ⚠️ **Watch out for**: Common symptoms and quick fixes190* 💡 **Instead**: Use proper error handling, pagination, and logging191192193## Reference Links & Examples194195* Internal documentation and examples196* Official documentation and best practices197* Community resources and discussions198199200## Versioning & Changelog201202* **Version**: 1.0.0203* **Changelog**:204 - 2026-02-22: Initial version with complete template structure205206---207> Converted and distributed by [TomeVault](https://tomevault.io/claim/amnadtaowsoam) — claim your Tome and manage your conversions.208<!-- tomevault:4.0:skill_md:2026-04-13 -->