K8S Memory Tune
Skill by 2233admin
Why use this skill?
Optimize your Java applications in Kubernetes. Resolve OOMKilled errors and configure JVM heap settings using our automated memory tuning skill.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/2233admin/k8s-memory-tuneWhat This Skill Does
The K8s Memory Tune skill is a diagnostic and configuration optimization utility designed to resolve persistent OOMKilled errors in Kubernetes-based Java applications. Many JVM-based applications running inside containers suffer from memory exhaustion because the JVM fails to correctly calculate its maximum heap size relative to the container's memory limits, leading to scenarios where the container is killed by the K8s OOMKiller despite the heap appearing to have room. This skill provides a structured approach to applying JVM-specific ergonomics by utilizing MaxRAMPercentage, ensuring the heap footprint dynamically scales with the container's cgroup memory boundaries.
Installation
To integrate this skill into your OpenClaw environment, execute the following command in your terminal: clawhub install openclaw/skills/skills/2233admin/k8s-memory-tune
Use Cases
- OOMKilled Troubleshooting: Automatically diagnose why specific pods are crashing during peak traffic loads.
- Production Tuning: Standardize JVM heap settings across microservices to ensure stability.
- Cloud Cost Optimization: Fine-tune resource requests and limits by aligning JVM memory consumption with actual workload behavior.
- Performance Engineering: Implement container-aware monitoring to identify memory leaks versus misconfigured heap settings.
Example Prompts
- "My Java microservice keeps getting OOMKilled on K8s, can you help me tune the JVM heap settings?"
- "Analyze the current pod memory_limit and suggest the correct -XX:MaxRAMPercentage for my container."
- "The JVM heap is not respecting container memory constraints; apply the recommended k8s memory tune configuration."
Tips & Limitations
- Safety First: Before applying these flags, ensure you have verified your baseline memory usage; setting MaxRAMPercentage too high can still trigger the OOMKiller if native memory (metaspace, code cache, stack) plus heap exceeds the limit.
- Version Check: Ensure your JVM version supports the modern container-aware memory flags; older versions of Java 8 may require specific minor versions or patches.
- Monitoring: Always accompany these changes with Prometheus or Grafana dashboards to track the actual Resident Set Size (RSS) versus the JVM heap usage to prevent 'ghost' OOMKilled events where non-heap memory is the culprit.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-2233admin-k8s-memory-tune": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: code-execution
Related Skills
Api Monitor
Skill by 2233admin
markdown-browser
Wrapper skill for OpenClaw web_fetch results. Use when you need MECE post-processing on fetched pages: policy decision from Content-Signal, privacy redaction, optional markdown normalization fallback, and stable output schema without re-implementing network fetch.
Clawapi Manager
Skill by 2233admin
evomap-node-controller
管理 EvoMap 节点的启动、配置和监控。用于在服务器上启动/停止 EvoMap evolver 循环、配置节点 ID,处理节点绑定等。使用场景:用户要求启动/停止 EvoMap 节点、查看节点状态、配置节点 ID、解决节点连接问题。⚠️ 使用前必须配置环境变量。
adaptive-review
Adaptive code review that routes to haiku/sonnet/opus based on diff complexity signals. Use instead of requesting-code-review for cost-efficient reviews.