Virtual machine scale set - setup with SWAP in Kubernetes Setup
Hello,
we have created a Kubernetes Service in Azure. It has a Virtual Machine Scal Set (VMSS) that is manged by Azure.
Now we want to update the Operating System Settings (Ubuntu) in Azure of the VMSS to have a setup with active SWAP.
We checked this article: [https://learn.microsoft.com/de-de/azure/virtual-machines/linux/cloudinit-configure-swapfile
and the sublink: [https://wiki.ubuntu.com/AzureSwapPartitions
#cloud-config
disk_setup:
ephemeral0:
table_type: mbr
layout: [[100, 82]]
overwrite: True
fs_setup:
- device: ephemeral0.1
filesystem: swap
mounts:
- ["ephemeral0.1", "none", "swap", "sw,nofail,x-systemd.requires=cloud-init.service", "0", "0"]
When we use the provided setup and paste the code to VMSS --> Operating system --> Custom data it is not working and the nodes do not have a swap after using reimage button. Also its not working when we take the code and use teraform to generate a base64 code and past this to the custom data field.
Is a swap not working in combination with VMSS and Kubernetes or is it just the wrong config?
Thank you in advanced
Johannes