# Kubernetes resource calculator

- Human page: https://happytails.ai/en/developer-tools/kubernetes-resource-calculator/
- Markdown: https://happytails.ai/en/developer-tools/kubernetes-resource-calculator.md
- Structured JSON: https://happytails.ai/agents/en/developer-tools/kubernetes-resource-calculator/index.json
- Visibility: public

## Tool capabilities

| Property | Value |
| --- | --- |
| Tool ID | `kubernetes-resource-calculator` |
| Category | developer-tools |
| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |
| Browser execution | Use the visible action or interactive controls. |
| Browser processing | Browser; see tool notes for network behavior. |
| HTTP API | Not callable through HTTP. |
| Browser-agent interface | run_current_tool |

### Implementation notes

Adds CPU and memory requests and limits on your device with exact quantity arithmetic. Up to 1,000,000 characters and 100 YAML documents.

### Inputs and settings

Text input: Kubernetes manifests.

Example or placeholder shown in the interface (not a validated fixture):

```text
apiVersion: apps/v1
kind: Deployment
```

Paste Deployments, StatefulSets, DaemonSets, Jobs, CronJobs or Pods. Separate documents with ---. Up to 1,000,000 characters. Review the settings before running.

| Setting | Meaning | Control type | Default | Constraints |
| --- | --- | --- | --- | --- |
| `daemonSetNodes` | DaemonSet node count | number | "1" | min=0 max=5000 |

### Browser-agent workflow

1. Open the human page in a browser that supports WebMCP.
2. Discover the interface exposed by that page; use its actual schema.
3. Select files on the page first when the tool requires files.
4. Call `run_current_tool` with valid input and settings.
5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.

Calls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.

### Planning specification

Up to 1,000,000 characters, 100 YAML documents and 100,000 values, with DaemonSet node counts from 0 to 5,000. Everything runs on your device in a background worker. Downloads: a JSON report and a CSV table of workloads.

This describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.

### Complete machine-readable capability record

```json
{
  "id": "kubernetes-resource-calculator",
  "category": "developer-tools",
  "built": true,
  "requirements": "Up to 1,000,000 characters, 100 YAML documents and 100,000 values, with DaemonSet node counts from 0 to 5,000. Everything runs on your device in a background worker. Downloads: a JSON report and a CSV table of workloads.",
  "implementation": {
    "fields": [
      {
        "key": "daemonSetNodes",
        "label": "DaemonSet node count",
        "value": "1",
        "type": "number",
        "min": 0,
        "max": 5000,
        "help": "Each DaemonSet runs one pod on this many nodes. Whole number from 0 to 5,000."
      }
    ],
    "registrationFamily": "config-analysis-reference",
    "inputMaxLength": 1000000,
    "inputErrorCode": "CONFIG_ANALYSIS_REFERENCE_TOO_LONG",
    "note": "Adds CPU and memory requests and limits on your device with exact quantity arithmetic. Up to 1,000,000 characters and 100 YAML documents.",
    "experience": {
      "automatic": false,
      "single": false,
      "inputMaxLength": 1000000,
      "inputMode": "text",
      "label": "Kubernetes manifests",
      "placeholder": "apiVersion: apps/v1\nkind: Deployment",
      "help": "Paste Deployments, StatefulSets, DaemonSets, Jobs, CronJobs or Pods. Separate documents with ---. Up to 1,000,000 characters. Review the settings before running.",
      "action": null
    },
    "mode": "explicit",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}
```

## Page guide

Add up the CPU and memory requests and limits of your Kubernetes workloads, multiplied by replicas and grouped by namespace. Containers without requests or limits are listed so you can fix them.

How can we improve this tool?

Report a problem or share an idea.

Please leave out private information. Your message and the tool name go to our team via PostHog.

### How to use Kubernetes resource calculator

1. Paste one or more manifests separated by ---.
2. Enter how many nodes each DaemonSet runs on.
3. Run the calculation and review totals per namespace and per workload.
4. Download the JSON report or the CSV table.

## Useful next steps

- [YAML validator](https://happytails.ai/en/developer-tools/yaml-validator/) ([Markdown](https://happytails.ai/en/developer-tools/yaml-validator.md))

- [YAML document splitter](https://happytails.ai/en/data-tools/yaml-document-splitter/) ([Markdown](https://happytails.ai/en/data-tools/yaml-document-splitter.md))

- [YAML to JSON](https://happytails.ai/en/data-tools/yaml-to-json/) ([Markdown](https://happytails.ai/en/data-tools/yaml-to-json.md))

## How a pod is counted

For each workload Happytails.ai follows the Kubernetes rule for effective pod requests from the "Sidecar containers" page on kubernetes.io (read on 16 October 2026): the larger of the sum of app and sidecar containers, or the largest ordinary init container plus the sidecars started before it. If a container sets a limit but no request, the request equals the limit, as Kubernetes does. Pod-level resources in spec.resources (the "Assign Pod-level CPU and memory resources" page on kubernetes.io, read on 16 October 2026; on by default from Kubernetes 1.34) replace the container totals: a pod-level request or limit is used as it is, and with a pod-level limit but no pod-level request the request is the container total, or the limit when no container sets a request. Any pod overhead is then added. A container is not listed as missing a request when the pod sets a pod-level request or limit for that resource, or a limit when the pod sets a pod-level limit.

### Exact quantities

Quantities such as 250m, 0.5, 512Mi and 1e3 are parsed with the Kubernetes quantity grammar and added as exact fractions, so totals never drift from rounding. CPU is shown in cores and memory in bytes as exact decimals. A limit is unbounded when any container in the pod has no limit and the pod sets no pod-level limit.

### Assumptions

Replicas come from the manifest, defaulting to 1. Job and CronJob use parallelism, which defaults to 1, or completions when that is smaller, because a Job never runs more pods at once than the completions it still needs. DaemonSets use the node count you enter. Three mistakes that the Kubernetes API refuses are rejected with a message: a request above its limit, container requests that add up to more than the pod-level request or limit, and a container limit above the pod-level limit. HorizontalPodAutoscaler ranges, LimitRange defaults and ResourceQuota objects are not applied, and objects that are not workloads are skipped.
