Dummy Kubernetes Manifest Generator
Generates mock Kubernetes YAML manifests for Deployments, Services, and ConfigMaps
Generated 91 words · 982 characters
See 3 examples
- Example 1
apiVersion: apps/v1 kind: Deployment metadata: name: my-app labels: app: my-app spec: replicas: 2 selector: matchLabels: app: my-app template: metadata: labels: app: my-app spec: containers: - name: my-app image: registry.example.com/my-app:v1.7.5 ports: - containerPort: 6829 env: - name: NODE_ENV value: production resources: requests: memory: "128Mi" cpu: "100m" limits: memory: "256Mi" cpu: "500m" --- apiVersion: v1 kind: Service metadata: name: my-app-svc spec: selector: app: my-app type: NodePort ports: - protocol: TCP port: 80 targetPort: 6829 nodePort: 32702 --- apiVersion: v1 kind: ConfigMap metadata: name: my-app-config data: APP_NAME: "my-app" LOG_LEVEL: "info" MAX_POOL_SIZE: "10" FEATURE_FLAG_X: "true" - Example 2
apiVersion: apps/v1 kind: Deployment metadata: name: my-app labels: app: my-app spec: replicas: 2 selector: matchLabels: app: my-app template: metadata: labels: app: my-app spec: containers: - name: my-app image: registry.example.com/my-app:v1.10.5 ports: - containerPort: 7353 env: - name: NODE_ENV value: production resources: requests: memory: "128Mi" cpu: "100m" limits: memory: "256Mi" cpu: "500m" --- apiVersion: v1 kind: Service metadata: name: my-app-svc spec: selector: app: my-app type: NodePort ports: - protocol: TCP port: 80 targetPort: 7353 nodePort: 32717 --- apiVersion: v1 kind: ConfigMap metadata: name: my-app-config data: APP_NAME: "my-app" LOG_LEVEL: "info" MAX_POOL_SIZE: "10" FEATURE_FLAG_X: "true" - Example 3
apiVersion: apps/v1 kind: Deployment metadata: name: my-app labels: app: my-app spec: replicas: 2 selector: matchLabels: app: my-app template: metadata: labels: app: my-app spec: containers: - name: my-app image: registry.example.com/my-app:v1.5.1 ports: - containerPort: 3311 env: - name: NODE_ENV value: production resources: requests: memory: "128Mi" cpu: "100m" limits: memory: "256Mi" cpu: "500m" --- apiVersion: v1 kind: Service metadata: name: my-app-svc spec: selector: app: my-app type: NodePort ports: - protocol: TCP port: 80 targetPort: 3311 nodePort: 31058 --- apiVersion: v1 kind: ConfigMap metadata: name: my-app-config data: APP_NAME: "my-app" LOG_LEVEL: "info" MAX_POOL_SIZE: "10" FEATURE_FLAG_X: "true"
About this generator
Every microservice needs a Deployment, a Service, and a ConfigMap — three YAML files with label selectors, resource limits, and environment blocks that must be internally consistent. Writing them from scratch means hunting for the correct apiVersion and getting indentation right. A Kubernetes manifest generator handles that boilerplate. Three inputs control output. App name sets metadata.name, label values, and container name throughout — sanitized to a valid lowercase DNS label. Resource kind generates a Deployment, Service, ConfigMap, or all three with --- dividers. Replicas sets spec.replicas. The Deployment includes requests (128Mi, 100m) and limits (256Mi, 500m), an env block, and a randomized port. The Service uses NodePort. The ConfigMap includes APP_NAME, LOG_LEVEL, MAX_POOL_SIZE, and FEATURE_FLAG_X. Run kubectl apply --dry-run=client to validate before adding to a CI pipeline.
How to use
- Type your application name in the App Name field to set the metadata and label values throughout the manifest.
- Select the Resource Kind you need — Deployment, Service, ConfigMap, or all three combined in one file.
- Set the Replicas count to control how many pod instances the Deployment controller will maintain.
- Click Generate to produce the complete YAML manifest with selectors, resource limits, and env var stubs filled in.
- Copy the output and paste it into a .yaml file, then update the container image field before applying to a cluster.
Use Cases
- •Generating YAML fixtures to test Kubernetes admission webhook logic in CI without touching a live cluster
- •Scaffolding a Deployment, Service, and ConfigMap together when bootstrapping a new microservice repo
- •Teaching label selector relationships between Deployments and Services in a Kubernetes workshop
- •Dry-running kubectl apply --dry-run=client commands against realistic manifests to validate pipeline logic
- •Creating placeholder ConfigMap manifests to prototype environment variable injection patterns in staging
Tips
- →Generate the 'all' kind first to understand how Deployment labels, Service selectors, and ConfigMap references connect in one file.
- →Use a real app name matching your Docker image repository path — it makes the manifest easier to adapt without hunting through the YAML.
- →Set replicas to 1 when generating fixtures for unit tests; use 2+ when testing pod disruption or rolling update scenarios.
- →Paste the output into https://kubeval.instrumenta.dev/ or run kubectl apply --dry-run=client to validate structure before adding it to a pipeline.
- →For multi-service architectures, generate each service separately with distinct app names, then combine them in one file with --- separators between documents.
- →The generated ConfigMap is a good template for externalizing environment-specific config — add your real keys there instead of hardcoding them in the Deployment env block.
FAQ
can I apply the generated manifest to a real Kubernetes cluster
Yes — the YAML is structurally valid and will pass kubectl validation. Before applying, replace the placeholder container image (registry.example.com/your-app:vX.Y.Z) with your actual registry path and adjust namespace and resource limits to match your environment. Run kubectl apply --dry-run=client -f manifest.yaml first.
what does selecting 'all' as the resource kind actually generate
Choosing 'all' outputs a single YAML file containing a Deployment, a Service, and a ConfigMap separated by --- document dividers, mirroring how most real workloads are shipped together. You can apply the combined file with kubectl apply -f or split it into separate files for Helm or Kustomize workflows.
how do label selectors in the generated manifest connect a Service to a Deployment
The generated Service uses a selector that matches the app label applied to pods in the Deployment's pod template spec. If you rename the app or edit labels in one section, update the other too — a mismatch leaves the Service with no endpoints and requests will silently drop.
what container image does the generated deployment use
The Deployment spec uses a placeholder image: registry.example.com/<your-app-name>:<random-semver-tag>. This is not a real registry path — replace it with your actual Docker image reference (e.g. docker.io/myorg/myapp:latest or a private ECR URI) before applying the manifest to any cluster.
You might also like
Popular tools from other categories that share themes with this one.