We're running a kops created cluster for our dev environment. The cluster obviously does not need to be extremely performant. Unfortunately our service still require loads of memory to start up. Is it possible to ask nodes to configure swap space also on bootup?
Running swap with docker can be super problematic. Can you use spot instances instead to save $$?
To answer your question you can probably use a hook container to set swap, but u need another Ebs volume as well ;(
@chrislovecnm we're already using spot instance but 8-10 spot instances can add up quickly. This is a dev environment used maybe for 8 hours a day so spot was a no brainer.
Would you happen to have an example of how swap can be used via a hook container?
@gauravarora use cloudinit
additionalUserData:
- name: swap.txt
type: text/cloud-config
content: |
#cloud-config
swap:
filename: /swapfile
size: 8589934592
@gauravarora can we close this issue?
Yes.
I tried the response by @thuandt, but it didn't create any swap space.
swapon command is not available in master nodes Debian v8,
free command shows swap as total 0, used 0, free 0
There is no /swapfile in / directory
Am I missing something?
Most helpful comment
@gauravarora use cloudinit