kubernetes - 如何创建具有特定节点池的命名空间

标签 kubernetes kubectl azure-aks

我们正在尝试创建具有特定节点池的命名空间。如何在 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/

相关文章:

Kubernetes 工作永无止境

kubernetes - K8S : Error running load balancer syncing routine

docker - 如何检测Kubernetes的Pod中发生的异常?

kubernetes - 在 Google Kubernetes Engine 中设置服务节点端口范围

node.js - 使用 kubernetes/client-node lib

amazon-web-services - GlusterFS/Heketi中的最小卷大小

kubernetes - 如何从现有集群导出 kubeconfig 文件?

Azure kubernetes 服务负载均衡器外部 IP 无法访问

kubernetes - 在Azure Kubernetes Service(AKS)中使用Dask Kubernetes处理大数据

azure - AKS Ingress - 多个ExternalName 服务