What is YAML to Kubernetes Config Generator?
Kubernetes is the leading container orchestration platform, and its resources are defined in YAML manifests. However, writing these manifests from scratch requires knowledge of the Kubernetes API schema — apiVersion, kind, metadata, spec, labels, selectors, and container specifications. This tool simplifies the process by generating standard Kubernetes manifests (Deployment, Service, and ConfigMap) from a simplified YAML configuration. You provide basic information like the application name, container image, port, and replica count, and the tool produces properly structured YAML with correct apiVersion fields, label selectors, port mappings, and resource specifications that follow Kubernetes best practices.
How to Use
- Select which K8s resources to generate from the dropdown (All, Deployment only, Service only, or ConfigMap only)
- Enter your simplified YAML configuration with app name, container image, replica count, ports, and optional environment variables
- Click "Generate K8s Config" to produce properly structured Kubernetes manifests
- Review the output — each resource has correct apiVersion, kind, metadata, and spec with matching labels and selectors
- Save the output as a YAML file and apply it to your cluster with kubectl apply -f manifest.yaml
Why Use This Tool?
Tips & Best Practices
- Use the "Load Sample" button as a starting template for your configuration
- Always include resource requests and limits for production workloads to ensure proper scheduling
- The app name is used as the label selector throughout all generated resources for consistency
- Environment variables can be added to both the Deployment container spec and a separate ConfigMap
- After generating, add an Ingress resource if you need external HTTP access to your Service
Frequently Asked Questions
What fields are required in the input?
At minimum, you need "app" (application name) and "image" (container image with tag). Other fields like replicas, ports, env, and resources are optional and will use sensible defaults if omitted.
When should I NOT use this generator?
If you need advanced Kubernetes features like StatefulSets, DaemonSets, PersistentVolumeClaims, or custom operators, this tool covers only the basic Deployment/Service/ConfigMap pattern. You will need to add those resources manually or use a tool like Helm for more complex deployments.
How are environment variables handled?
Environment variables defined in the "env" section are added to the Deployment container spec as name/value pairs. You can also generate a ConfigMap to externalize configuration, which is the recommended approach for non-sensitive values.
Is my data sent to a server?
No. All processing happens entirely in your browser. Your configuration never leaves your device, making this safe for internal deployment specifications.
Can I customize the generated manifests?
Yes. The generated YAML is standard Kubernetes manifest that you can edit directly. Use it as a starting point and add features like health checks, volume mounts, affinity rules, or tolerations as needed.
What Kubernetes versions are supported?
The generated manifests use apps/v1 for Deployments and v1 for Services and ConfigMaps, which are stable APIs supported by Kubernetes 1.9+. They work with all modern Kubernetes distributions including EKS, GKE, AKS, and minikube.
Real-world Examples
Web application Deployment and Service
Generating a complete Kubernetes configuration for a web application with a Deployment (3 replicas) and a ClusterIP Service exposing port 80.
app: web-frontend image: myregistry/frontend:v2.1 replicas: 3 ports: - 80:3000 env: API_URL: https://api.example.com NODE_ENV: production
apiVersion: apps/v1
kind: Deployment
metadata:
name: web-frontend
spec:
replicas: 3
selector:
matchLabels:
app: web-frontend
template:
metadata:
labels:
app: web-frontend
spec:
containers:
- name: web-frontend
image: myregistry/frontend:v2.1
ports:
- containerPort: 3000
env:
- name: API_URL
value: https://api.example.com
- name: NODE_ENV
value: production
---
apiVersion: v1
kind: Service
metadata:
name: web-frontend
spec:
selector:
app: web-frontend
ports:
- port: 80
targetPort: 3000
type: ClusterIPAPI service with ConfigMap
Generating a Kubernetes Deployment with externalized configuration in a ConfigMap, allowing config changes without redeploying the pod.
app: api-server image: company/api:v1.5 replicas: 2 ports: - 8080:8080 env: LOG_LEVEL: info MAX_CONNECTIONS: "100"
# ConfigMap with externalized configuration
apiVersion: v1
kind: ConfigMap
metadata:
name: api-server-config
data:
LOG_LEVEL: info
MAX_CONNECTIONS: "100"
---
# Deployment referencing the ConfigMap
apiVersion: apps/v1
kind: Deployment
...
envFrom:
- configMapRef:
name: api-server-config