azure - 如何更改命名空间 kube-system 的 CPU 限制

标签 azure kubernetes resources cpu limit

如何更改 Azure Kubernetes 中命名空间 kube-system 的 CPU 限制?由于命名空间 kube-system 中的某些 pod 使用大量资源,我的 pod 无法成功部署。

enter image description here

最佳答案

将其发布为社区 wiki 并发表评论,请随意编辑和扩展


简而言之,不可能更改 coreDNS 和位于 kube-system 命名空间内的其他关键资源的限制。 (从技术上讲,可以设置自定义值,但它们很快就会被覆盖,初始状态将恢复到预定义的值,下面是微软的回答,它到底是如何工作的)。


微软问题平台上有一个与之非常相似的问题,这就是答案:

The deployment coredns runs system critical workload using the CoreDNS project for cluster DNS management and resolution with all 1.12.x and higher clusters. [Reference].

If you do a kubectl describe deployment -n kube-system coredns, you will find a very interesting label addonmanager.kubernetes.io/mode=Reconcile

Now, addons with label addonmanager.kubernetes.io/mode=Reconcile will be periodically reconciled. Direct manipulation to these addons through apiserver is discouraged because addon-manager will bring them back to the original state. In particular:

  • Addon will be re-created if it is deleted.

  • Addon will be reconfigured to the state given by the supplied fields in the template file periodically.

  • Addon will be deleted when its manifest file is deleted from the $ADDON_PATH.

The $ADDON_PATH by default is set to /etc/kubernetes/addons/ on the control plane node(s).

For more information please check this document.

Since AKS is a managed Kubernetes Service you will not be able to access $ADDON_PATH. We strongly recommend against forcing changes to kube-system resources as these are critical for the proper functioning of the cluster.

OP 的评论也证实了这一点:

just contacted MS support that we cannot change the limits form kube-system namespace.

关于azure - 如何更改命名空间 kube-system 的 CPU 限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69217134/

相关文章:

c++ - 学习 C++ 网络的资源

azure - 如何通过 Azure Data Lake Store gen1 中的新文件触发 Azure Data Factory v2 或 Azure Databricks Notebook 中的管道

具有多个动态标记筛选器的 Azure 资源管理器查询

docker - 如何在 docker-compose.yml 中像 'depends_on' 一样在 kubernetes 中添加 pod 依赖项

C# - 在运行时将文件作为资源添加到我的 Exe

ruby-on-rails - Rails Route Helper中的插值

caching - 更新我的 Windows Azure 存储上的图片(刷新)

azure - 如何修复azure cli中的ApplicationGatewayFirewallEnabledOverrideStateCannotBeConfiguredForApiVersion错误?

Kubernetes - 如何读取容器 livenessProbe 中的响应体?

nginx - 在普罗米修斯中看不到 nginx 入口指标