AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

aks-cost-optimization

Analyze advanced AKS cost efficiency. WHEN: "AKS NAP readiness", "AKS bin packing", "AKS node scaling bottleneck", "AKS blocked scale-down", "AKS storage cost". DO NOT USE AS DIRECT ENTRY FOR: overall AKS cost assessments or rightsizing/VPA/CAS/Spot (azure-kubernetes); spend/anomalies/commitments (cost-analysis/cost-optimization); incidents (aks-troubleshooting).

Original source
microsoft
License
MIT
Pinned revision
3f5b461b2314e01c400564051e92469114c5b68f

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

Ask your assistant

Use Agentic Memory skills to read microsoft--aks-cost-optimization at revision 3f5b461b2314e01c400564051e92469114c5b68f, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 14

references/aks-savings-plans-reservations.md

AKS Commitment-Demand Handoff

Prepare stable, post-optimization AKS compute demand for cost-optimization, which owns Reservation and Savings Plan analysis. Direct commitment requests start there. Use this workflow only when AKS optimization could materially change steady node demand; do not calculate economics or purchase commitments.

Preconditions

Complete applicable rightsizing, autoscaler, NAP, and bin-packing analysis. Confirm the cluster, representative lookback, planned compute changes, and retained Capacity Reservation Group (CRG) requirements.

Collect AKS Demand

  1. Use Azure MCP AKS or an approved az aks show fallback for node resource group, region, provisioning mode, and regular pool metadata.
  2. For manual provisioning, collect each pool's VM size, current/min/max count, autoscaling, priority, CRG association, and upgrade surge. Map it to exact VMSS or VM resource IDs from pool metadata, not names alone.
  3. For NAP, map each observed node or NodeClaim through providerID to exact Azure compute IDs; do not infer demand from the AKS pool list. Retain time-aligned SKU, region, zone, architecture, OS, and karpenter.sh/capacity-type; report unmapped resources as an evidence gap.
  4. Exclude Spot capacity from stable commitment demand. Group non-Spot observations by compatible compute characteristics.
  5. Reuse representative history; otherwise range-query managed Prometheus kube_node_info hourly over the requested 30-60 days, joining node and provider_id to the time-aligned mapping. Fall back to Container Insights only when Prometheus history is unsuitable. Report the requested/observed periods, observed hours, min/p05/p50/p95/max counts, and candidate-baseline hours and coverage. Retention limits the lookback. If neither source provides representative history, stable demand is unknown and no baseline may be produced.
  6. Query associated CRGs through Resource Graph. Keep SKU, region, zone, reserved, associated, unused, and retained quantities separate. Unused CRG capacity remains billable.
  7. Account for approved rightsizing, consolidation, NAP, migration, and reliability changes. Record seasonal, temporary, surge, outage, and planned demand that makes the lookback unrepresentative.

Handoff

Provide cost-optimization with:

| Field | Content | |---|---| | AKS scope | Cluster ID, node resource group, region | | Compute mapping | Provisioning mode, compatible compute group, exact VMSS/VM resource IDs, SKU, region/zone, architecture, OS, capacity type | | Continuous baseline | Candidate non-Spot counts by compatible compute group, hours covered, coverage percentage, p05/p50/p95, lookback | | Variability | Peak, seasonal, temporary, surge, outage, and planned-demand exceptions | | Planned changes | Rightsizing, consolidation, NAP, migration, SKU/region changes | | Capacity reservations | CRG reserved, associated, unused, and retained quantities | | Evidence gaps | Missing history, inaccessible pools, or unresolved owner intent |

Ask cost-optimization to evaluate utilization, coverage, scope, expiry, and renewal; retrieve Azure recommendations; correlate them with exact AKS mappings and approved changes; disclose broader-scope benefits; and return term, scope, coverage, expected utilization, reported savings/currency, assumptions, risks, and next review date.

This workflow does not query benefit APIs, recommend quantities, or claim expiry/renewal actions. If cost-optimization is unavailable, return the demand evidence and mark commitment analysis unavailable.