Part I: https://vadasambar.com/post/kubernetes/keptn/dev-setup/

This post details:

  1. Considering each option listed in Part I in more detail
  2. What I eventually ended up with. Hopefully 1 and 2 can give you some idea about what you can do for your local Keptn dev setup.

I have not included many pros and cons for each setup because most of them are covered in Part I.

Solution

1. Buy a new machine

This is a good solution if you are planning to buy a new machine or if are ready to buy a machine just for Keptn development. Although 16GB is recommended, you might want to buy something with a little extra RAM as buffer on top. And you need multicore CPU (based on the thread in slack thread in Part I). If you look at the available options which might work for development:

  1. Macbook
  2. Asus Vivobook S510 UQ (32 GB memory, 8 core CPU)
  3. Some other laptop similar to 2

I have never used Mac for Keptn development but you should be looking for 16GB or more RAM and a multicore CPU (4 or more cores).

2. Run a K8s cluster offered as a service by the above cloud providers (GKE, EKS)

Many cloud providers offer free trial run of their managed Kubernetes. You can use it to try out a bunch of Keptn things (but you have to provide your credit/debit card details). While some cloud providers like GCP don’t start deducting money from your bank account post free trial but other cloud providers might do that. Please read the finer print here.

If you are running the cluster only for a couple of hours everyday, this might be a good option.

Currently using Azure Kubernetes Services with 12vcpu and 64 GB RAM which costs 27k INR per month, but since I only use it when I am active that has just cost me 500 INR for the last month.

500INR is around ~6.72USD or ~5.92Euros per month if you run it only when you want to use it.

Managed K8s however has a caveat. If you want to run it only for a couple of hours everyday you can’t stop/pause the cluster when you don’t want to use it and then restart/resume it when you want to use it to save money i.e., if you delete the cluster to save money and you want to use the it again, you will have to create the cluster, wait until it is up, install Keptn and everything else again.

I used GKE free trial for some time before going with 3.

3. Buy a CPU tower (i.e, a big fat desktop CPU) to setup a local K8s cluster

Basically the title. You can extend RAM as you need in the future. The setup overall is cheaper than buying a high spec laptop at the cost of a little higher fan noise and everything dies if you have a powercut (might be limited to India; has happened with me multiple times; can be overcome with backup power). You can setup a local K8s cluster that you can start/stop at whim. It preserves the state (you can do this with k3d or minikube).

Note: Some services like Datadog don’t work well on k3s (k3d runs k3s) but otherwise it should suffice most of your usecases.

I went with this option in the end. I bought a custom made CPU tower with the following specs (with sensitive/non-important info removed):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
$ inxi
CPU: 6-Core Intel Core i5-10400F (-MT MCP-)
Mem: 32014.9 MiB
Storage: 931.51 GiB

$ lscpu | grep -E '^Thread|^Core|^CPU\('
CPU(s):                          12
Thread(s) per core:              2
Core(s) per socket:              6

$ inxi -G
Graphics:
  Device-1: NVIDIA GK208B [GeForce GT 730] 
  ...

Above setup cost me around 45K INR which is ~590USD or 534Euros. There was a silicon chip shortage during this time across the world and India. I did not have many options for CPU to choose from. You might get more options and for cheaper if you go buy it now.

Note: I faced graphic issues when using plain Ubuntu 20.04 LTS. Zoom/Gmeet screenshare would freeze the screen and the machine would get re-started. I think this was an Nvidia + vanilla Ubuntu 20.04 LTS problem. Switching to Xubuntu 20.04 LTS fixed all of my issues.

This option however comes with a big caveat of being non-portable. Hence, I think of this as my main machine and managed K8s cluster as a backup option.

4. Try setting up a K8s cluster in a cloud VM (spot/preemptible instance to further reduce the cost)

I did not fully try this but the idea is to run a K8s cluster inside a spot/preemptible VM (which is cheaper than a normal VM) by installing a local k8s cluster in the VM and using it like a normal cluster i.e., I just have to change the kube context and I should be able to start using the cluster.

Spot/preemptible instance come with a caveat of going doing anytime so if you can afford it, I think a reserved or a normal VM would be a better option. If you do get this running and it’s easy to use, I think this option might be better in many ways to (2) the managed K8s cluster option

Conclusion

That’s all. Thanks for reading.