home / skills / openclaw / skills / k8s-config-gen
This skill translates docker-compose into Kubernetes manifests, generating deployments, services, and configs with minimal setup and reliable results.
npx playbooks add skill openclaw/skills --skill k8s-config-genReview the files below or copy the command above to add this skill to your agents.
---
name: k8s-gen
description: Generate Kubernetes manifests from docker-compose or descriptions. Use when deploying to K8s.
---
# K8s Generator
Translating docker-compose to Kubernetes manifests is tedious YAML shuffling. Feed in your compose file and get proper K8s manifests back.
**One command. Zero config. Just works.**
## Quick Start
```bash
npx ai-k8s docker-compose.yml
```
## What It Does
- Converts docker-compose to Kubernetes manifests
- Generates from plain English descriptions
- Creates Deployments, Services, ConfigMaps
- Handles secrets and persistent volumes
## Usage Examples
```bash
# From docker-compose
npx ai-k8s docker-compose.yml --namespace production
# From description
npx ai-k8s "3 replicas of a node app with redis and postgres"
# Save output
npx ai-k8s docker-compose.yml -o k8s-manifests.yml
```
## Best Practices
- **Use namespaces** - organize your resources
- **Set resource limits** - prevent runaway pods
- **Add health checks** - liveness and readiness probes
- **Use secrets properly** - don't hardcode credentials
## When to Use This
- Migrating from docker-compose to Kubernetes
- Setting up new K8s deployments
- Learning Kubernetes manifest structure
- Quick prototyping before fine-tuning
## Part of the LXGIC Dev Toolkit
This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.
**Find more:**
- GitHub: https://github.com/LXGIC-Studios
- Twitter: https://x.com/lxgicstudios
- Substack: https://lxgicstudios.substack.com
- Website: https://lxgicstudios.com
## Requirements
No install needed. Just run with npx. Node.js 18+ recommended. Needs OPENAI_API_KEY environment variable.
```bash
npx ai-k8s --help
```
## How It Works
Parses your docker-compose.yml or description, understands the services and their relationships, then generates equivalent Kubernetes resources with proper configuration.
## License
MIT. Free forever. Use it however you want.
This skill generates Kubernetes manifests from docker-compose files or plain-English descriptions to speed up K8s deployments. It produces Deployments, Services, ConfigMaps, Secrets, and PersistentVolumeClaims with minimal input and no heavyweight configuration. Use it to migrate, prototype, or learn Kubernetes manifest structures quickly.
The tool parses a docker-compose.yml or a short textual description to identify services, ports, volumes, environment variables, and inter-service relationships. It then maps those concepts to Kubernetes objects (Deployment, Service, ConfigMap, Secret, PersistentVolumeClaim) and emits ready-to-apply YAML. Optional flags let you set namespace, output file, and replica counts without manual YAML editing.
Do I need to install anything?
No installation is required; run via npx with Node.js 18+. It uses an environment OPENAI_API_KEY for description-based generation.
Will the generated manifests be production-ready?
They provide a practical baseline but should be reviewed: add resource limits, refine probes, and integrate with your secret management and RBAC policies before production.