Preface¶
Deploying applications onto Kubernetes often involves far more than just writing a Deployment manifest. Services, Ingress, ConfigMaps, Secrets, health checks, resource quotas, and autoscaling all have nuanced details that are easy to get wrong: forgetting to specify resources, using the :latest tag in production, committing Secrets to Git in plaintext, or only configuring liveness probes without readiness probes. As the number of manifest files grows, it becomes easy to miss best practices even when manually reviewing them against guidelines.
Agent Skill is a set of reusable SKILL.md instruction files designed to teach AI coding assistants to complete specific types of tasks following a fixed workflow. The kubernetes-deploying skill is one such tool tailored for K8s deployments: it packages common resource templates, frequently used kubectl commands, deployment strategies, and important considerations into a standardized skill, giving AI agents a reliable reference when generating or modifying YAML manifests.
This article is organized based on the official SKILL.md and repository documentation for this skill, introducing what it is, what capabilities it covers, how to install and enable it, and typical usage scenarios.
What It Is¶
The kubernetes-deploying skill comes from the GitHub repository spencerpauly/awesome-cursor-skills and is categorized under Infrastructure & DevOps. Its official description is:
Deploy applications to Kubernetes — Deployments, Services, Ingress, ConfigMaps, Secrets, health checks, and scaling.
It is a standard Agent Skills formatted SKILL.md file (with name set to kubernetes-deploying in the frontmatter and user-invocable: true declared). It does not replace your Kubernetes cluster or the kubectl tool, but instead guides AI agents to generate manifests according to templates, include health checks and resource limits, and reminds developers of best practices around Secrets and image tags.
According to Cursor’s official documentation, Agent Skills is an open standard compatible with any AI coding tool that supports the specification. Cursor will automatically discover skills in the skill directory, or you can manually invoke them by name using / in an Agent chat. Tools like Claude Code and Codex CLI can similarly load similar SKILL.md files from their respective directories.
Core Features and Highlights¶
Based on the official SKILL.md, this skill primarily covers the following content.
1. Core Resource Templates¶
The skill provides ready-to-reference YAML examples including:
- Deployment: Replica count, label selectors, container images, ports, resources requests/limits, liveness/readiness probes, and environment variables injected from Secrets.
- Service: For example, a ClusterIP Service that maps Service ports to container ports.
- Ingress: Host-based routing, TLS configuration, and common cert-manager annotation examples.
- ConfigMap & Secret: Separate declarations for non-sensitive and sensitive configuration data.
This helps AI agents generate manifests that include fully functional and relatively standardized fields from the first attempt, rather than just a bare-bones Deployment with minimal required settings.
2. Common Operational Commands¶
The skill compiles commonly used kubectl commands for deployment and troubleshooting:
# Apply manifests
kubectl apply -f k8s/
# Check deployment status
kubectl rollout status deployment/my-app
# View pods
kubectl get pods -l app=my-app
# View logs
kubectl logs -f deployment/my-app
# Execute into a pod
kubectl exec -it <pod-name> -- /bin/sh
# Scale deployment
kubectl scale deployment/my-app --replicas=5
# Rollback deployment
kubectl rollout undo deployment/my-app
# Port forward for local debugging
kubectl port-forward svc/my-app 3000:80
After generating the manifests, you can use this consistent set of commands to deploy the application, monitor rolling updates, view logs, or perform rollbacks.
3. Deployment Strategies¶
The skill uses a table to explain several common deployment strategies and their applicable scenarios:
| Strategy | How It Works | When To Use |
|---|---|---|
| Rolling update (default) | Replace Pods one by one | Most standard production deployments |
| Recreate | Terminate all old Pods before starting new ones | Applications that cannot run two versions simultaneously |
| Blue/green | Maintain two identical environments, switch traffic between them | Scenarios requiring fast rollbacks |
| Canary | Route a small percentage of traffic to the new version | High-risk configuration or feature changes |
It also provides configuration examples for RollingUpdate, such as maxSurge: 1 and maxUnavailable: 0.
4. Health Checks and Autoscaling¶
The skill explicitly requires configuring both:
- livenessProbe: Checks if the main application process is healthy; failed probes will trigger Pod restarts.
- readinessProbe: Checks if the Pod is ready to receive traffic; failed probes will remove the Pod from Service endpoints.
Supported probe types include httpGet, exec, and tcpSocket.
Additionally, it provides an example HorizontalPodAutoscaler manifest using autoscaling/v2, such as scaling between 2 to 10 replicas based on 70% CPU utilization.
5. Tips (Best Practice Reminders)¶
At the end of the skill, several easily overlooked points are emphasized:
- Always set resource requests and limits
- Use Namespaces to isolate environments (e.g. dev / staging / prod)
- Never commit plaintext Secrets to Git; use Sealed Secrets, SOPS, or external key management services instead
- Use specific version tags for production images, never use :latest
- For highly available workloads, consider setting up PodDisruptionBudget
Installation and Enablement¶
According to the official repository documentation, you can copy the pre-written SKILL.md file into Cursor’s skill directory, and the agent will automatically discover it. Common directories listed in Cursor’s documentation include:
| Path | Scope |
|---|---|
.cursor/skills/ or .agents/skills/ |
Project-level |
~/.cursor/skills/ or ~/.agents/skills/ |
User-level (global) |
To maintain compatibility with other tools, Cursor also loads skills from .claude/skills/, .codex/skills/, and their corresponding user-level directories.
Method 1: Manually Place into Project¶
- Fetch the skill directory from the repository:
https://github.com/spencerpauly/awesome-cursor-skills/tree/main/resources/kubernetes-deploying - Place it into your project, for example:
.cursor/skills/kubernetes-deploying/SKILL.md
The directory name must match the name field in the frontmatter (kubernetes-deploying).
Method 2: Install with npx skills¶
The repository’s Tools section recommends the vercel-labs/skills CLI. You can install skills by name, adjusting the --agent flag to match your actual tooling:
# Example for Claude Code: install to the current project's .claude/skills/ directory
npx skills add spencerpauly/awesome-cursor-skills --skill kubernetes-deploying --agent claude-code
# Example for Cursor (agent name is cursor)
npx skills add spencerpauly/awesome-cursor-skills --skill kubernetes-deploying --agent cursor
Add the -g / --global flag to install to your user directory. The exact installation path will depend on the Project Path / Global Path specifications for each agent in the current npx skills documentation.
After installation, you can manually invoke the skill by typing / in a Cursor Agent chat and searching for kubernetes-deploying; the agent may also automatically select this skill when you describe a Kubernetes deployment task.
Typical Usage Examples¶
The following examples are taken from the official SKILL.md and can be used directly as a reference or when prompting the AI agent.
1. Ask the Agent to Generate a Full Manifest Set According to the Skill¶
In a chat session where the skill has been enabled, you can submit a request like this (adjust the image and domain name to match your application):
Please generate a complete set of Kubernetes manifests in the k8s/ directory following the kubernetes-deploying skill standards:
- Deployment: Use image my-registry/my-app:v1.2.3, container port 3000, 3 replicas
- Configure resources, livenessProbe (/healthz) and readinessProbe (/ready)
- Service (ClusterIP) and Ingress (host app.example.com, TLS enabled)
- Separate ConfigMap and Secret; inject database connection strings from the Secret
The agent will generate the manifest based on the deployment structure in the skill, for example, the resources and probes section will look similar to:
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
livenessProbe:
httpGet:
path: /healthz
port: 3000
initialDelaySeconds: 10
periodSeconds: 30
readinessProbe:
httpGet:
path: /ready
port: 3000
initialDelaySeconds: 5
periodSeconds: 10
2. Service and Ingress¶
The Service example in the skill maps port 80 to container port 3000; the Ingress example includes TLS configuration and cert-manager annotations. After generating the manifests, you can deploy them using:
kubectl apply -f k8s/
kubectl rollout status deployment/my-app
3. Rolling Updates and Autoscaling¶
When you need to add a rolling update strategy, you can ask the agent to add it according to the skill’s specification:
spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
When you need autoscaling based on CPU usage, you can reference the HPA example in the skill (minReplicas: 2, maxReplicas: 10, averageUtilization: 70). For temporary manual scaling, use:
kubectl scale deployment/my-app --replicas=5
To roll back a problematic deployment:
kubectl rollout undo deployment/my-app
Applicable Scenarios and Notes¶
Situations where this skill is suitable include:
- Completing a deployable set of K8s manifests for an existing container image
- Ensuring AI agents consistently include probes, resource limits, and separate ConfigMap/Secret configurations
- Using the deployment strategy guide, common kubectl commands, and HPA templates as a scaffold or code review reminder
When using this skill, please note:
1. The skill is a guide, not a source of truth for your cluster. Cluster versions, CNI plugins, Ingress controllers, and whether cert-manager is installed will all require you to adjust annotations and API fields to match your real environment.
2. The Secret example is only for format reference. The stringData example in the skill should never be committed directly to Git; production environments should use encrypted Secret solutions or external key management, which is explicitly mentioned in the skill’s Tips section.
3. Probe paths and ports must match your application. The template’s /healthz, /ready, and port 3000 need to be changed to match the actual health check endpoints provided by your service.
4. This skill primarily covers manifests and common commands. Complex workflows like GitOps, multi-cluster management, or service mesh are outside the scope of this SKILL.md; do not expect it to handle your entire delivery pipeline on its own.
Summary¶
The kubernetes-deploying skill consolidates the most commonly overlooked templates and best practices for Kubernetes deployments — including Deployments, Services, Ingress, ConfigMaps, Secrets, health checks, deployment strategies, HPA, and security reminders — into a single file that can be loaded by AI agents. It is ideal for cloud-native developers using tools like Cursor, Claude Code, or Codex that support the Agent Skills standard.
Official repository address:
https://github.com/spencerpauly/awesome-cursor-skills/tree/main/resources/kubernetes-deploying
Original SKILL file:
https://github.com/spencerpauly/awesome-cursor-skills/blob/main/resources/kubernetes-deploying/SKILL.md