英文:
Custom Node Configuration in AKS using Terraform
问题
我想在AKS中创建带有启用交换内存的noodpool,我已经阅读了Terraform文档,那里我可以看到swap_file_size_mb
和vm_swappiness
是与swap相关的唯一内容。我的问题是:
- 是否有办法将此标志--fail-swap-on设置为false(或者当我们设置
swap_file_size_mb
时它会自动设置为false)? - 是否有办法将MemorySwap.SwapBehavior更改为"UnlimitedSwap"?
在AKS中是否可能实现这些功能,还是我遗漏了什么?我想要一个能够使用交换内存的工作节点,并且应通过terraform用于工作负载。感谢任何建议。
英文:
I wanted to create noodpool with swap memory enabled in AKS, I have gone through
Terraform documentation there I can see swap_file_size_mb
and vm_swappiness
are the only thing related to swap. My question is
- is there any way to use this flag --fail-swap-on
to false(or it will automatically set to false when we setswap_file_size_mb
) - And is there any way to change MemorySwap.SwapBehavior to "UnlimitedSwap"
Are these things are possible in AKS, or Am I missing something, I want a working node
that has swap memory and should use for workload through terraform. Any suggestion appreciated. Thanks.
答案1
得分: 0
-
在 AKS 模式中存在一个 kubelet_config 块,允许设置 failSwapOn: https://learn.microsoft.com/en-us/azure/aks/custom-node-configuration#virtual-memory,但在 Terraform 中没有暴露出来,但我认为它硬编码为 false: https://github.com/hashicorp/terraform-provider-azurerm/blob/ddd6a9e2ef99f2e859b567badbed1aa829261caa/internal/services/containers/kubernetes_cluster_node_pool_resource.go#L1020。
-
MemorySwap - 我不认为有,至少我在文档中没有看到: https://learn.microsoft.com/en-us/azure/aks/custom-node-configuration#virtual-memory。
英文:
- there is a kubelet_config block in AKS schema that allows settings failSwapOn: https://learn.microsoft.com/en-us/azure/aks/custom-node-configuration#virtual-memory
but that one is not exposed in terraform, but i think its hardcoded to false: https://github.com/hashicorp/terraform-provider-azurerm/blob/ddd6a9e2ef99f2e859b567badbed1aa829261caa/internal/services/containers/kubernetes_cluster_node_pool_resource.go#L1020
- MemorySwap - i dont think so, at least I dont see it in the docs: https://learn.microsoft.com/en-us/azure/aks/custom-node-configuration#virtual-memory
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论