最佳答案
将其发布为社区 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/