Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

K8s

ASecurity

Generates and validates production-ready Pulumi K8s TypeScript resources following deploy.ts patterns, and diagnoses runtime cluster issues. Use when creating Deployments, Services, Ingress, Gateway API, HPA, ConfigMaps, Secrets, PVCs, DaemonSets, NetworkPolicies, PDBs, ValidatingAdmissionPolicies, ComponentResources, validating existing infra code, or debugging deployed K8s/EKS workloads.

2 stars
0 votes
0 copies
0 views
Added 9/19/2026
devopstypescriptnodedockerkubernetesawsdebuggingapibackendsecurity

Works with

api

Security Analysis

A100/100

Scanned 9/19/2026

Install to Claude Code

$npx -y skills add bsamiee/Parametric_Portal --skill k8s --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of K8s?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for K8s
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bsamiee-k8s/badge)](https://www.skillsdirectory.com/skills/bsamiee-k8s)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: k8s
description: >-
  Generates and validates production-ready Pulumi K8s TypeScript resources following deploy.ts
  patterns, and diagnoses runtime cluster issues. Use when creating Deployments, Services,
  Ingress, Gateway API, HPA, ConfigMaps, Secrets, PVCs, DaemonSets, NetworkPolicies, PDBs,
  ValidatingAdmissionPolicies, ComponentResources, validating existing infra code, or
  debugging deployed K8s/EKS workloads.
---

# [H1][K8S]
>**Dictum:** *Infrastructure code follows deploy.ts canonical patterns; validation and debugging are integral.*

<br>

Generate, validate, and debug Pulumi K8s resources in TypeScript: `_CONFIG` + `_Ops` + dispatch table.

**Provider:** current stable `@pulumi/kubernetes` (Server-Side Apply default) | **K8s:** 1.32-1.35 | **Canonical:** `infrastructure/src/deploy.ts` (207 LOC)

**Tasks:**
1. Gather requirements (table below)
2. Lookup API docs via `context7-tools` for `@pulumi/kubernetes` target kind; fallback: WebSearch `"@pulumi/kubernetes" "<kind>" TypeScript API 2025`
3. Read `references/pulumi_k8s_patterns.md` -- naming, labels, security, mode dispatch
4. Read `references/resource_templates.md` -- templates, factories, ComponentResource, advanced patterns
5. Read `infrastructure/src/deploy.ts` -- canonical implementation
6. Generate resources per architecture and standards below
7. Validate against `references/validation.md` -- security, reliability, cross-resource checks
8. For runtime issues, read `references/debug.md` -- decision tree, kubectl workflows, EKS diagnostics
9. Deliver summary table with `pulumi preview` / `pulumi up` next steps

---
## [1][REQUIREMENTS]
>**Dictum:** *Gather all inputs before generation.*

<br>

| Field              | Required | Default                                         | deploy.ts Reference            |
| ------------------ | -------- | ----------------------------------------------- | ------------------------------ |
| Deployment mode    | YES      | --                                              | `_Ops.mode()` (line 64)        |
| Resource kind(s)   | YES      | --                                              | --                             |
| Container image    | YES      | --                                              | `input.api.image` (line 163)   |
| Port               | YES      | `4000`                                          | `_CONFIG.ports.api` (line 22)  |
| Health paths       | YES      | `/api/health/liveness`, `/api/health/readiness` | `_CONFIG.k8s.probes` (line 19) |
| CPU/memory         | NO       | `small` preset                                  | `input.api.cpu` (line 168)     |
| HPA min/max/target | NO       | env-driven                                      | `input.hpa.*` (line 174)       |
| PVC size           | NO       | `10Gi`                                          | `_k8sObserve` (line 120)       |
| Namespace          | NO       | `parametric`                                    | `_CONFIG.k8s.namespace`        |

Mode: `cloud` (K8s+AWS) or `selfhosted` (Docker). Kind: Deployment, Service, Ingress, Gateway, HTTPRoute, GRPCRoute, HPA, ConfigMap, Secret, PVC, DaemonSet, NetworkPolicy, PDB, ValidatingAdmissionPolicy, ComponentResource.

---
## [2][ARCHITECTURE]
>**Dictum:** *deploy.ts layers structure all generated code.*

<br>

| Layer         | Purpose                                                      | Lines   |
| ------------- | ------------------------------------------------------------ | ------- |
| `_CONFIG`     | Immutable `as const` -- ports, labels, probes, images        | 11-24   |
| `_Ops`        | Pure factories -- `meta()`, `k8sUrl()`, `secret()`, `fail()` | 28-119  |
| `_k8sObserve` | Array-driven factory: PVC+ConfigMap+Deployment+Service       | 120-126 |
| `_DEPLOY`     | Dispatch table `{ cloud, selfhosted } as const`              | 130-195 |
| `deploy`      | Entry point: resolves mode, delegates to dispatch            | 199-202 |

**Guidance:**
- `Mode dispatch` - Cloud uses ClusterIP + nginx ingress. Selfhosted uses `@pulumi/docker` exclusively.
- `Output tracking` - Use `namespace.metadata.name` (Output) for implicit dependency ordering.
- `Secrets` - `pulumi.secret()` wraps sensitive values; `pulumi.interpolate` for `Output<T>` strings.
- `Factories` - Array-driven `_k8sObserve` pattern for repetitive resource groups.

**Best-Practices:**
- Resources require `requests` + `limits` (env-driven, deploy.ts:168). Guaranteed QoS when `limits == requests`.
- All workloads require liveness + readiness + startup probes (deploy.ts:19).
- New workloads require `_SECURITY` pod/container contexts (see resource_templates.md).
- `terminationGracePeriodSeconds: 30` on all pod specs (deploy.ts:171).
- `as const satisfies` for config objects; `pulumi.interpolate` only when mixing `Output<T>`.
- PodDisruptionBudget required for `replicas >= 2`. NetworkPolicy required for production namespaces.
- `topologySpreadConstraints` for zone distribution; pod anti-affinity for node distribution.

---
## [3][MODE_RULES]
>**Dictum:** *Mode dispatch prevents cross-concern resource creation.*

<br>

| Concern | `cloud` (K8s + AWS)                       | `selfhosted` (Docker)                |
| ------- | ----------------------------------------- | ------------------------------------ |
| Compute | Deployment + Service (ClusterIP)          | `docker.Container` + Traefik labels  |
| Ingress | Ingress (nginx class) or Gateway API      | Traefik reverse proxy                |
| Scaling | HPA (CPU + memory targets)                | None                                 |
| Config  | ConfigMap + Secret                        | `docker.Container.envs`              |
| Data    | AWS RDS + ElastiCache + S3                | Docker containers (pg, redis, minio) |
| TLS     | Ingress TLS + ssl-redirect annotation     | Let's Encrypt via Traefik            |
| Observe | DaemonSet (Alloy) + `_k8sObserve` factory | Docker containers with uploads       |

[CRITICAL] Cloud: ClusterIP + nginx ingress (NOT LoadBalancer + ALB). Selfhosted: `@pulumi/docker` only (NOT Kubernetes).

---
## [4][TROUBLESHOOTING]
>**Dictum:** *Common failures have deterministic fixes.*

<br>

| Issue                        | Cause                             | Fix                                                           |
| ---------------------------- | --------------------------------- | ------------------------------------------------------------- |
| Type errors on k8s resources | API shape changed in provider     | Verify against current stable API via context7                |
| Preview fails on namespace   | Namespace not yet created         | Use `namespace.metadata.name` Output for implicit dep         |
| Cross-stack reference errors | Wrong format or different backend | Format: `<org>/<project>/<stack>`, same backend required      |
| Selfhosted creating k8s      | Mode violation                    | Selfhosted uses `@pulumi/docker` only                         |
| `already exists` in preview  | Resource in cluster not in state  | `pulumi import <type> <name> <id>`                            |
| Replace instead of update    | Immutable field changed           | See `references/validation.md` immutable fields table         |
| Server-Side Apply conflicts  | Field manager ownership conflict  | `pulumi refresh` or set field manager explicitly              |
| Gateway API not found        | CRDs not installed                | Install gateway controller before Gateway/HTTPRoute/GRPCRoute |
| Sidecar not recognized       | K8s <1.33 or feature gate off     | Verify cluster 1.33+; check `SidecarContainers` gate          |
| In-place resize rejected     | K8s <1.35 or feature gate off     | Verify cluster 1.35+; check `InPlacePodVerticalScaling` gate  |
| DRA ResourceClaim not bound  | DRA driver not installed          | Verify ResourceClass and device plugin running                |
| Topology routing not working | Missing annotation                | Add `service.kubernetes.io/topology-mode: auto`               |

Attribution

bsamieebsamiee
View sourceMore from bsamiee →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Terraform Module Library

Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.

393431 votes

sematext-otel

Wire a service's OpenTelemetry output to Sematext Cloud. Walks through region, App-type, instrumentation flow (managed OTLP endpoint vs Sematext Agent), and signal selection (traces/metrics/logs), then produces the exact env-var block and points at a runnable reference example in this repo. Invoke when instrumenting a new app for Sematext.

01 votes

Deployment Patterns

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications. Use when setting up deployment infrastructure or planning releases.

2459130 votes

Babysit

Watch a pull request or review cycle until it is ready to merge. Use when asked to babysit, monitor, or keep checking PR comments, reviews, and CI until all actionable issues are resolved.

929660 votes

V7 Roster

Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.

798220 votes
View all in devops →