IvanHunters 079ec7c1f5 fix(kubernetes): add kubelet reserved resources and cgroup enforcement
Configure kubelet with proper resource reservations and cgroup enforcement
to prevent OOM kills when memory pressure occurs.

Configuration:
- systemReserved: 100m CPU, 512Mi memory (OS daemons)
- kubeReserved: 100m CPU, 512Mi memory (kubelet, containerd)
- evictionHard: 512Mi threshold (immediate eviction)
- evictionSoft: 1Gi threshold with 90s grace period
- evictionMinimumReclaim: 256Mi (guaranteed reclaim after eviction)
- enforce-node-allocatable: creates hard cgroup limits for reservations
- cgroups-per-qos: enables QoS-based resource isolation
- cgroup-driver: systemd (matches containerd configuration)
- kernel-memcg-notification: faster memory pressure detection

Allocatable calculation for 16Gi VM:
  VM capacity:           16.00 Gi
  - systemReserved:      -0.50 Gi (enforced via cgroup)
  - kubeReserved:        -0.50 Gi (enforced via cgroup)
  - evictionHard buffer: -0.50 Gi
  - kernel/page cache:   -0.25 Gi (implicit)
  ----------------------------------------
  Allocatable (safe):    14.25 Gi

Key improvement: enforce-node-allocatable creates hard cgroup limits,
preventing system/kubelet processes from exceeding reservations and
killing kubelet via OOM.

Related issue: tenant VMs experiencing kubelet crashes after 15-30min
due to insufficient reserved memory (100Mi vs required 1.75Gi total)
and lack of cgroup enforcement.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2026-04-23 17:02:51 +03:00
2025-10-08 09:43:34 +05:00
2025-04-01 18:48:14 +02:00
2024-02-08 12:04:32 +01:00
2026-04-16 14:30:51 +05:00
2026-03-17 02:57:52 +05:00

Cozystack Cozystack

Open Source Apache-2.0 License Support Active GitHub Release GitHub Commit OpenSSF Best Practices

Cozystack

Cozystack is a free platform and framework for building clouds.

Cozystack is a CNCF Sandbox Level Project that was originally built and sponsored by Ænix.

With Cozystack, you can transform a bunch of servers into an intelligent system with a simple REST API for spawning Kubernetes clusters, Database-as-a-Service, virtual machines, load balancers, HTTP caching services, and other services with ease.

Use Cozystack to build your own cloud or provide a cost-effective development environment.

Cozystack user interface

Use-Cases

Documentation

The documentation is located on the cozystack.io website.

Read the Getting Started section for a quick start.

If you encounter any difficulties, start with the troubleshooting guide and work your way through the process that we've outlined.

Versioning

Versioning adheres to the Semantic Versioning principles.
A full list of the available releases is available in the GitHub repository's Release section.

Contributions

Contributions are highly appreciated and very welcomed!

In case of bugs, please check if the issue has already been opened by checking the GitHub Issues section. If it isn't, you can open a new one. A detailed report will help us replicate it, assess it, and work on a fix.

You can express your intention to on the fix on your own. Commits are used to generate the changelog, and their author will be referenced in it.

If you have Feature Requests please use the Discussion's Feature Request section.

Community

You are welcome to join our Telegram group and come to our weekly community meetings. Add them to your Google Calendar or iCal for convenience.

License

Cozystack is licensed under Apache 2.0.
The code is provided as-is with no warranties.

Commercial Support

A list of companies providing commercial support for this project can be found on official site.

Languages
Go 48%
Shell 37%
TypeScript 6.9%
Go Template 5.3%
Makefile 1.4%
Other 1.2%