Convert docker-compose.yml services into production-ready Kubernetes Deployments, Services, ConfigMaps, and PVCs online with breaking change analysis.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: api-data
labels:
app: api
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: api
labels:
app: api
spec:
replicas: 1
selector:
matchLabels:
app: api
template:
metadata:
labels:
app: api
spec:
containers:
- name: api
image: node:20-alpine
ports:
- containerPort: 3000
env:
- name: NODE_ENV
value: production
- name: DATABASE_URL
value: mysql://root:secret@db:3306/app
volumeMounts:
- name: api-data
mountPath: /app/data
volumes:
- name: api-data
persistentVolumeClaim:
claimName: api-data
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: api
labels:
app: api
spec:
selector:
app: api
ports:
- name: http
port: 3000
targetPort: 3000
type: ClusterIP
---
apiVersion: v1
kind: ConfigMap
metadata:
name: api-config
labels:
app: api
data:
NODE_ENV: production
DATABASE_URL: mysql://root:secret@db:3306/app
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: db-data
labels:
app: db
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: db
labels:
app: db
spec:
replicas: 1
selector:
matchLabels:
app: db
template:
metadata:
labels:
app: db
spec:
containers:
- name: db
image: mysql:8.0
ports:
- containerPort: 3306
env:
- name: MYSQL_DATABASE
value: app
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: db-secret
key: MYSQL_ROOT_PASSWORD
volumeMounts:
- name: db-data
mountPath: /var/lib/mysql
volumes:
- name: db-data
persistentVolumeClaim:
claimName: db-data
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: db
labels:
app: db
spec:
selector:
app: db
ports:
- name: http
port: 3306
targetPort: 3306
type: ClusterIP
---
apiVersion: v1
kind: ConfigMap
metadata:
name: db-config
labels:
app: db
data:
MYSQL_DATABASE: app
---
apiVersion: v1
kind: Secret
metadata:
name: db-secret
labels:
app: db
type: Opaque
stringData:
MYSQL_ROOT_PASSWORD: secretService "db" has sensitive env vars — generated Secret manifest. Replace values with actual secrets or use a secrets manager.
Host bind mounts cannot be directly mounted in cloud Kubernetes clusters without PersistentVolumes.
Paste your existing docker-compose.yml file into the editor.
The migrator scans service declarations, environment variables, ports, and volume mounts.
Review any breaking storage and networking warnings raised by Kubernetes cluster constraints.
Export the generated Kubernetes Deployments, Services, and ConfigMaps as YAML.
name: Validate Kubernetes
on: [push, pull_request]
jobs:
kube-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run kubeconform
run: |
curl -sL https://github.com/yannh/kubeconform/releases/latest/download/kubeconform-linux-amd64.tar.gz | tar -xz
./kubeconform -summary k8s/
Perform identical migration routines across entire directories or repositories in your local terminal:
devflow migrate docker-compose-to-k8s -i docker-compose.yml -o k8s/Translate GitHub Actions YAML workflows into robust .gitlab-ci.yml pipelines with stages, container images, caching, and artifacts.
Instantly migrate npm scripts, dependencies, and configurations to Bun. Optimize script execution speeds and strip obsolete transpilations.
Validate, lint, and format Kubernetes manifests against structure rules, deprecated APIs, and security best practices.
Lint, validate, format, and optimize Dockerfiles with Hadolint-compatible rules, security checks, and multi-stage analysis.
Convert between JSON and YAML with validation, formatting, and multi-document support.