[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FFWA84GCS4FA6E8ZEHTZXC":3,"skill-same:01M6FFWA84GCS4FA6E8ZEHTZXC":48},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":21,"linkOnly":22,"markdownContent":23,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M6FFWA84GCS4FA6E8ZEHTZXC","k8s-cost",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",66,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Frohitg00\u002Fkubectl-mcp-server\u002Fk8s-cost\u002FSKILL.md",[],[18,19,20],"cost","k8s","k8s cost","2026-11-10 10:12:30",false,"# Kubernetes Cost Optimization\n\nCost analysis and optimization using kubectl-mcp-server's cost tools.\n\n## When to Apply\n\nUse this skill when:\n- User mentions: \"cost\", \"savings\", \"optimize\", \"expensive\", \"budget\"\n- Operations: cost analysis, right-sizing, cleanup unused resources\n- Keywords: \"how much\", \"reduce\", \"efficiency\", \"waste\", \"overprovisioned\"\n\n## Priority Rules\n\n| Priority | Rule | Impact | Tools |\n|----------|------|--------|-------|\n| 1 | Find and delete unused PVCs | CRITICAL | `find_orphaned_pvcs` |\n| 2 | Right-size overprovisioned pods | HIGH | `get_resource_recommendations` |\n| 3 | Identify idle LoadBalancers | HIGH | `get_services` |\n| 4 | Scale down non-prod off-hours | MEDIUM | `scale_deployment` |\n| 5 | Consolidate small namespaces | LOW | Analysis |\n\n## Quick Reference\n\n| Task | Tool | Example |\n|------|------|---------|\n| Namespace cost | `get_namespace_cost` | `get_namespace_cost(namespace)` |\n| Cluster cost | `get_cluster_cost` | `get_cluster_cost()` |\n| Unused PVCs | `find_orphaned_pvcs` | `find_orphaned_pvcs(namespace)` |\n| Right-sizing | `get_resource_recommendations` | `get_resource_recommendations(namespace)` |\n\n## Quick Cost Analysis\n\n### Get Cost Summary\n\n```python\nget_namespace_cost(namespace)\nget_cluster_cost()\n```\n\n### Find Unused Resources\n\n```python\nfind_unused_resources(namespace)\nfind_orphaned_pvcs(namespace)\n```\n\n### Resource Right-Sizing\n\n```python\nget_resource_recommendations(namespace)\nget_pod_metrics(name, namespace)\n```\n\n## Cost Optimization Workflow\n\n### 1. Identify Overprovisioned Resources\n\n```python\nget_resource_recommendations(namespace=\"production\")\n\nget_pod_metrics(name, namespace)\nget_resource_usage(namespace)\n```\n\n### 2. Find Idle Resources\n\n```python\nfind_orphaned_pvcs(namespace)\n\nfind_unused_resources(namespace)\n```\n\n### 3. Analyze Node Utilization\n\n```python\nget_nodes()\nget_node_metrics()\n```\n\n## Right-Sizing Guidelines\n\n| Current State | Recommendation |\n|--------------|----------------|\n| CPU usage \u003C 10% of request | Reduce request by 50% |\n| CPU usage > 80% of request | Increase request by 25% |\n| Memory \u003C 50% of request | Reduce request |\n| Memory near limit | Increase limit, monitor OOM |\n\n## Cost by Resource Type\n\n### Compute (Pods\u002FDeployments)\n\n```python\nget_resource_usage(namespace)\nget_pod_metrics(name, namespace)\n```\n\n### Storage (PVCs)\n\n```python\nget_pvc(namespace)\nfind_orphaned_pvcs(namespace)\n```\n\n### Network (LoadBalancers)\n\n```python\nget_services(namespace)\n```\n\n## Multi-Cluster Cost Analysis\n\nCompare costs across clusters:\n\n```python\nget_cluster_cost(context=\"production\")\nget_cluster_cost(context=\"staging\")\nget_cluster_cost(context=\"development\")\n```\n\n## Cost Reduction Actions\n\n### Immediate Wins\n\n1. **Delete unused PVCs**: `find_orphaned_pvcs()` then delete\n2. **Right-size pods**: Apply `get_resource_recommendations()`\n3. **Scale down dev\u002Fstaging**: Off-hours scaling\n\n### Medium-term Optimizations\n\n1. **Use Spot\u002FPreemptible nodes**: For fault-tolerant workloads\n2. **Implement HPA**: Auto-scale based on demand\n3. **Use KEDA**: Scale to zero for event-driven workloads\n\n### Long-term Strategy\n\n1. **Reserved instances**: For stable production workloads\n2. **Multi-tenant clusters**: Consolidate small clusters\n3. **Right-size node pools**: Match workload requirements\n\n## Automated Analysis Script\n\nFor comprehensive cost analysis, see [scripts\u002Ffind-overprovisioned.py](scripts\u002Ffind-overprovisioned.py).\n\n## KEDA for Cost Savings\n\nScale to zero with KEDA:\n\n```python\nkeda_scaledobjects_list_tool(namespace)\nkeda_scaledobject_get_tool(name, namespace)\n```\n\nKEDA reduces costs by:\n- Scaling pods to 0 when idle\n- Event-driven scaling (queue depth, etc.)\n- Cron-based scaling for predictable patterns\n\n## Related Skills\n\n- [k8s-autoscaling](..\u002Fk8s-autoscaling\u002FSKILL.md) - HPA, VPA, KEDA\n- [k8s-troubleshoot](..\u002Fk8s-troubleshoot\u002FSKILL.md) - Resource debugging\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Frohitg00\u002Fkubectl-mcp-server\u002Fk8s-cost",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill k8s-cost",{"tool":40,"command":41},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill k8s-cost",{"tool":43,"command":44},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill k8s-cost","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Frohitg00\u002Fkubectl-mcp-server\u002Fk8s-cost\u002FSKILL.md",true,[],[49,63,73,82,88,95],{"skillNo":50,"name":51,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":59,"publishedAt":21},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[54],{"categoryNo":55,"categoryName":56,"taxonomyType":57,"taxonomyTypeDesc":58},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[60,61,62],"model","model hierarchy","model hierarchy skill",{"skillNo":64,"name":65,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":69,"publishedAt":21},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[68],{"categoryNo":55,"categoryName":56,"taxonomyType":57,"taxonomyTypeDesc":58},[70,71,72],"MCP","zoom","zoom mcp",{"skillNo":74,"name":75,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":21},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[79,80,81,71],"sdk","zoom apps sdk","apps",{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":21},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[84],{"skillNo":89,"name":90,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":94,"publishedAt":21},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[93],{"categoryNo":55,"categoryName":56,"taxonomyType":57,"taxonomyTypeDesc":58},[90],{"skillNo":96,"name":97,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":21},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[97]]