Promt k8s for AI (tested with GPT-4o-mini )
NAME | PROMPT | DESCRIPTION | EXAMPLE |
---|---|---|---|
app | Create manifest k8s for an application Demo gcr.io/k8s-k3s/demo:v1.0.0 |
The deployment app "Demo" from image gcr.io/k8s-k3s/demo:v1.0.0 | app.yaml |
app-livenessProbe | Create an http livenessProbe for port 8080 and show it to me this like the k8s manifest |
The deployment add liveness probe | app-livenessProbe.yaml |
app-readinessProbe | Create a Kubernetes Deployment manifest for an application using the image `gcr.io/k8s-k3s/demo:v1.0.0`. The deployment should: Expose port 8080. Include an HTTP readiness probe that checks the `/ready` endpoint after an initial delay of 20 seconds, with a check interval of 5 seconds and a failure threshold of 3. |
The deployment add readiness probe | app-readinessProbe.yaml |
app-volumeMounts | Create a Kubernetes Deployment manifest for an application using the image `gcr.io/k8s-k3s/demo:v1.0.0`. The deployment should: volume mounts Mydata |
The volume mounts Mydata | app-volumeMounts.yaml |
app-cronjob | Create task in cronjob when run ever y 7 minute clean.sh like the k8s manifest |
Every 7 minutes run clean.sh | app-cronjob.yaml |
app-job | Create a job as manifest k8s |
A job run "your-command" with arg1 and arg2 | app-job.yaml |
app-multicontainer | Create a Kubernetes Deployment manifest for an application that includes multiple containers. The deployment should: - Use the NGINX image ("nginx:latest") as the main application container, exposing port 80. - Include a liveness probe that checks the root path ("/") on port 80 after an initial delay of 30 seconds, with a check interval of 10 seconds and a failure threshold of 3. - Add a second container using the BusyBox image that tails a log file located at "/var/log/app.log". - Use a shared "emptyDir" volume to store logs, mounted at "/var/log" in the logging container. - Set the number of replicas to 3. |
Run 2 containers | app-multicontainer.yaml |
app-resources | Create a Kubernetes Deployment manifest for an application using the image gcr.io/k8s-k3s/demo:v1.0.0. The deployment should: Specify resource limits of 256Mi for memory and 100m for CPU, and requests of 128Mi for memory and 100m for CPU. |
The resource sets limit: 100m for CPU and 256Mi for memory and requests of 128Mi for memory and 100m for CPU | app-resources.yaml |
app-secret-env | Create a Kubernetes Deployment manifest for an application that will be provided with a secret: specifically, env SECRET_USERNAME from the secret named mysecret1 with the key username, and SECRET_PASSWORD from the secret named mysecret1 with the key password. |
Use mysecret1 export SECRET_USERNAME=username; export SECRET_PASSWORD=password |
app-secret-env.yaml |