Posted in

Kubernetes 1.31:将控制组 v1 支持移至维护模式_AI阅读总结 — 包阅AI

包阅导读总结

1.

“`

Kubernetes、cgroup v1、Maintenance Mode、cgroup v2、Resource Management

“`

2.

Kubernetes 1.31 版本将 cgroup v1 支持移至维护模式,以适应行业向 cgroup v2 的转变。cgroup 用于资源管理,v2 有更多优势。维护模式意味着不再添加新功能,但提供关键安全修复和尽力修复重大 bug,鼓励用户向 cgroup v2 过渡。

3.

– Kubernetes 发展

– 1.31 版本将 cgroup v1 支持移至维护模式

– cgroup 介绍

– 是 Linux 内核用于系统资源管理的功能

– 有 v1 和 v2 两个版本,v2 接口更统一、资源控制更好

– cgroup 在 Kubernetes 中的作用

– 用于管理和隔离容器资源

– 包括资源分配、隔离和监控

– 向 cgroup v2 过渡

– 行业趋势,v2 有诸多优势

– Kubernetes 为更好支持 v2 而调整 cgroup v1 模式

– 对管理员的影响

– 鼓励向 cgroup v2 过渡

– 涉及升级系统和测试工作负载

思维导图:

文章地址:https://kubernetes.io/blog/2024/08/14/kubernetes-1-31-moving-cgroup-v1-support-maintenance-mode/

文章来源:kubernetes.io

作者:Kubernetes Blog

发布时间:2024/8/14 0:00

语言:英文

总字数:575字

预计阅读时间:3分钟

评分:88分

标签:Kubernetes,控制组 v1,控制组 v2,容器编排,资源管理


以下为原文内容

本内容来源于用户推荐转载,旨在分享知识与观点,如有侵权请联系删除 联系邮箱 media@ilingban.com

Kubernetes 1.31: Moving cgroup v1 Support into Maintenance Mode

By Harshal Patil |

As Kubernetes continues to evolve and adapt to the changing landscape ofcontainer orchestration, the community has decided to move cgroup v1 supportinto maintenance mode in v1.31.This shift aligns with the broader industry’s move towards cgroup v2, offeringimproved functionalities: including scalability and a more consistent interface.Before we dive into the consequences for Kubernetes, let’s take a step back tounderstand what cgroups are and their significance in Linux.

Understanding cgroups

Control groups, orcgroups, are a Linux kernel feature that allows the allocation, prioritization,denial, and management of system resources (such as CPU, memory, disk I/O,and network bandwidth) among processes. This functionality is crucial formaintaining system performance and ensuring that no single process canmonopolize system resources, which is especially important in multi-tenantenvironments.

There are two versions of cgroups:v1 andv2. While cgroup v1provided sufficient capabilities for resource management, it had limitationsthat led to the development of cgroup v2. Cgroup v2 offers a more unified andconsistent interface, on top of better resource control features.

Cgroups in Kubernetes

For Linux nodes, Kubernetes relies heavily on cgroups to manage and isolate theresources consumed by containers running in pods. Each container in Kubernetesis placed in its own cgroup, which allows Kubernetes to enforce resource limits,monitor usage, and ensure fair resource distribution among all containers.

How Kubernetes uses cgroups

Resource Allocation
Ensures that containers do not exceed their allocated CPU and memory limits.
Isolation
Isolates containers from each other to prevent resource contention.
Monitoring
Tracks resource usage for each container to provide insights and metrics.

Transitioning to Cgroup v2

The Linux community has been focusing on cgroup v2 for new features andimprovements. Major Linux distributions and projects likesystemd aretransitioning towards cgroup v2.Using cgroup v2 provides several benefits over cgroupv1, such as Unified Hierarchy,Improved Interface, Better Resource Control,cgroup aware OOM killer,rootless support etc.

Given these advantages, Kubernetes is also making the move to embrace cgroupv2 more fully. However, this transition needs to be handled carefully to avoiddisrupting existing workloads and to provide a smooth migration path for users.

Moving cgroup v1 support into maintenance mode

What does maintenance mode mean?

When cgroup v1 is placed into maintenance mode in Kubernetes, it means that:

  1. Feature Freeze: No new features will be added to cgroup v1 support.
  2. Security Fixes: Critical security fixes will still be provided.
  3. Best-Effort Bug Fixes: Major bugs may be fixed if feasible, but someissues might remain unresolved.

Why move to maintenance mode?

The move to maintenance mode is driven by the need to stay in line with thebroader ecosystem and to encourage the adoption of cgroup v2, which offersbetter performance, security, and usability. By transitioning cgroup v1 tomaintenance mode, Kubernetes can focus on enhancing support for cgroup v2and ensure it meets the needs of modern workloads. It’s important to notethat maintenance mode does not mean deprecation; cgroup v1 will continue toreceive critical security fixes and major bug fixes as needed.

What this means for cluster administrators

Users currently relying on cgroup v1 are highly encouraged to plan for thetransition to cgroup v2. This transition involves:

  1. Upgrading Systems: Ensuring that the underlying operating systems andcontainer runtimes support cgroup v2.
  2. Testing Workloads: Verifying that workloads and applications functioncorrectly with cgroup v2.

Further reading