自定义节点配置在 AKS 中使用 Terraform

huangapple go评论63阅读模式
英文:

Custom Node Configuration in AKS using Terraform

问题

我想在AKS中创建带有启用交换内存的noodpool,我已经阅读了Terraform文档,那里我可以看到swap_file_size_mbvm_swappiness是与swap相关的唯一内容。我的问题是:

  1. 是否有办法将此标志--fail-swap-on设置为false(或者当我们设置swap_file_size_mb时它会自动设置为false)?
  2. 是否有办法将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

  1. is there any way to use this flag --fail-swap-on
    to false(or it will automatically set to false when we set swap_file_size_mb)
  2. 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

  1. 在 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

  2. MemorySwap - 我不认为有,至少我在文档中没有看到: https://learn.microsoft.com/en-us/azure/aks/custom-node-configuration#virtual-memory

英文:
  1. 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

  1. 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

huangapple
  • 本文由 发表于 2023年2月10日 15:18:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/75407998.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定