Optimized for: Gemini / ChatGPT / Claude
Advanced AI Prompt for Kubernetes StatefulSet with Persistent Volume Claims
Use this engineered prompt to drastically optimize your workflow and output.
Required Variables
- ✦
[DB_NAME] - ✦
[STORAGE_CLASS] - ✦
[STORAGE_SIZE] - ✦
[PORT] - ✦
[REPLICAS]
k8s-statefulset-pvc-storage-configuration.txt
As a Cloud Architect, generate a Kubernetes StatefulSet manifest for a distributed database named '[DB_NAME]'. Configure '[REPLICAS]' replicas. Include a volumeClaimTemplates section using the '[STORAGE_CLASS]' storage class with a size of '[STORAGE_SIZE]'. Ensure the service is exposed via a Headless Service on port '[PORT]'. Define podAntiAffinity to ensure pods are scheduled on different nodes for high availability.
Example Output
"The AI will produce a StatefulSet manifest and a corresponding Headless Service, ensuring stable network identifiers and persistent storage for each replica."