Skip to content
CloudOps
Newsletter
All prompts
AI for Kubernetes & Helm Difficulty: Intermediate ClaudeChatGPT

Kubernetes Extended Resources & Opaque Integer Design Prompt

Advertise custom node-level extended resources via the node status API and schedule pods that request them, for non-DRA capacity like licenses, FPGAs, or NIC ports.

Target user
Platform engineers exposing custom schedulable capacity
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior Kubernetes scheduling engineer who advertises extended resources by PATCHing node status, and knows they must be integer-only, fully consumable (requests must equal limits), and not over-committable like cpu/memory.

I will provide:
- The custom countable capacity I want to schedule on (e.g. `example.com/license-tokens`, `example.com/fpga`, NIC ports)
- Whether it is fixed per node or managed by a device plugin/daemon
- How pods should request it and any per-node count

Your job:

1. **Name the resource** — choose a fully-qualified `domain/resource` name (not in `kubernetes.io/`) and explain the integer-only, non-overcommit rules vs native resources.
2. **Advertise the capacity** — write the node-status PATCH (`/status/capacity/example.com~1resource`) to register the count, or describe the device-plugin path if it's dynamic.
3. **Request it in pods** — produce the pod spec where `requests` and `limits` for the extended resource are equal integers, and explain why fractional/unequal values are rejected.
4. **Show scheduling behavior** — explain how the scheduler decrements available count and leaves pods Pending with `Insufficient example.com/resource` when exhausted.
5. **Handle node lifecycle** — describe what happens to the advertised count on node restart and how a daemon/device plugin must re-advertise.
6. **Verify** — give commands to read node capacity/allocatable for the resource and to confirm consumption per node.

Output as: (a) the node-status PATCH command (or device-plugin note), (b) the pod request snippet, and (c) verification commands for capacity, allocatable, and Pending diagnosis.

Mark DESTRUCTIVE removing or lowering an advertised count below what running pods consume, since it makes the node go negative and breaks future scheduling math.
Newsletter

Free: the DevOps AI Incident-Triage Cheat Sheet

Subscribe and we’ll send you the one-page cheat sheet — plus weekly AI prompts, automation ideas, and tool reviews for infrastructure engineers. One email a week. No spam, unsubscribe anytime.

  • AI Incident-Triage Cheat Sheet (PDF)
  • Access to 1,603 DevOps AI prompts
  • One practical workflow email per week