K8s Manifest Generator

K8s Manifest Generator

Guides an AI agent to write production-ready Kubernetes manifests for Deployments, Services, ConfigMaps, Secrets and volumes, with limits, health checks and security contexts.

Skill files7 files

assets/

references/

SKILL.md78 lines
1
---
2
name: k8s-manifest-generator
3
description: Create production-ready Kubernetes manifests for Deployments, Services, ConfigMaps, and Secrets following best practices and security standards. Use when generating Kubernetes YAML manifests, creating K8s resources, or implementing production-grade Kubernetes configurations.
4
---
5
6
# Kubernetes Manifest Generator
7
8
Step-by-step guidance for creating production-ready Kubernetes manifests including Deployments, Services, ConfigMaps, Secrets, and PersistentVolumeClaims.
9
10
## Purpose
11
12
This skill provides comprehensive guidance for generating well-structured, secure, and production-ready Kubernetes manifests following cloud-native best practices and Kubernetes conventions.
13
14
## When to Use This Skill
15
16
Use this skill when you need to:
17
18
- Create new Kubernetes Deployment manifests
19
- Define Service resources for network connectivity
20
- Generate ConfigMap and Secret resources for configuration management
21
- Create PersistentVolumeClaim manifests for stateful workloads
22
- Follow Kubernetes best practices and naming conventions
23
- Implement resource limits, health checks, and security contexts
24
- Design manifests for multi-environment deployments
25
26
## Detailed patterns and worked examples
27
28
Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.
29
30
## Best Practices Summary
31
32
1. **Always set resource requests and limits** - Prevents resource starvation
33
2. **Implement health checks** - Ensures Kubernetes can manage your application
34
3. **Use specific image tags** - Avoid unpredictable deployments
35
4. **Apply security contexts** - Run as non-root, drop capabilities
36
5. **Use ConfigMaps and Secrets** - Separate config from code
37
6. **Label everything** - Enables filtering and organization
38
7. **Follow naming conventions** - Use standard Kubernetes labels
39
8. **Validate before applying** - Use dry-run and validation tools
40
9. **Version your manifests** - Keep in Git with version control
41
10. **Document with annotations** - Add context for other developers
42
43
## Troubleshooting
44
45
**Pods not starting:**
46
47
- Check image pull errors: `kubectl describe pod <pod-name>`
48
- Verify resource availability: `kubectl get nodes`
49
- Check events: `kubectl get events --sort-by='.lastTimestamp'`
50
51
**Service not accessible:**
52
53
- Verify selector matches pod labels: `kubectl get endpoints <service-name>`
54
- Check service type and port configuration
55
- Test from within cluster: `kubectl run debug --rm -it --image=busybox -- sh`
56
57
**ConfigMap/Secret not loading:**
58
59
- Verify names match in Deployment
60
- Check namespace
61
- Ensure resources exist: `kubectl get configmap,secret`
62
63
## Next Steps
64
65
After creating manifests:
66
67
1. Store in Git repository
68
2. Set up CI/CD pipeline for deployment
69
3. Consider using Helm or Kustomize for templating
70
4. Implement GitOps with ArgoCD or Flux
71
5. Add monitoring and observability
72
73
## Related Skills
74
75
- `helm-chart-scaffolding` - For templating and packaging
76
- `gitops-workflow` - For automated deployments
77
- `k8s-security-policies` - For advanced security configurations
78

© Seth Hobson · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…