我们正在尝试创建具有特定节点池的命名空间。如何在 Azure Kubernetes 上实现这一目标?
error: Unable to create namespace with specific node pool.
Ex: namespace for user nodepool1
最佳答案
将此作为社区 wiki 发布,请随意编辑和扩展它。
如Luca Ghersi注释中提到,可以将命名空间分配给特定节点。对于这个问题,有一个准入 Controller PodNodeSelector
(您可以在 kubernetes official documentation 上阅读它)。
简而言之:
This admission controller defaults and limits what node selectors may be used within a namespace by reading a namespace annotation and a global configuration.
基于Azure FAQ ,Azure AKS 默认启用此准入 Controller 。
AKS supports the following admission controllers:
- NamespaceLifecycle
- LimitRanger
- ServiceAccount
- DefaultStorageClass
- DefaultTolerationSeconds
- MutatingAdmissionWebhook
- ValidatingAdmissionWebhook
- ResourceQuota
- PodNodeSelector
- PodTolerationRestriction
- ExtendedResourceToleration
Currently, you can't modify the list of admission controllers in AKS.
关于kubernetes - 如何创建具有特定节点池的命名空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67601486/