hobby-kube / provisioning

Kubernetes cluster provisioning using Terraform.
https://hobby-kube.dev/guide
MIT License
312 stars 112 forks source link

Using k3s distro for kubernetes install #59

Closed jawabuu closed 4 years ago

jawabuu commented 4 years ago

Hey @pstadler Excellent work on hobby-kube!! The structuring of the terraform files itself for this project Is remarkable. My request is on using k3s as an option alongside kube-admin to install kubernetes. My reasons for this are below;

  1. Allow nodes to take advantage of more compute due to k3s smaller footprint.
  2. Move some of the configuration effort e.g. networking, encryption e.t.c to k3s installer instead of scripting it ourselves.
  3. It still maintains your vision of being cloud-provider agnostic. Again this is only suggested as an option. I would love to hear your thoughts on it.
pstadler commented 4 years ago

Thank you!

While I generally like the idea of running k3s for its resource-efficiency, I won't be creating and maintaining this myself. However, I could imagine something like hobby-k3s.

jawabuu commented 4 years ago

Thank you very much @pstadler . I'm very glad to hear this. In your opinion, would a branch of hobby-kube under your guidance as a proof of concept work? I am willing to contribute in whatever way I can but I would really like to maintain the project structure as is.

pstadler commented 4 years ago

I'd suggest you make changes in a fork of hobby-kube/provisioning. Curious how many things would change compared to using kubeadm, et. al.

jawabuu commented 4 years ago

My thoughts exactly. I'll try restricting it to changes in the kubernetes distro only. I believe some of the networking bits may need to be removed or skipped but I'll tackle these later. Thanks again.

jawabuu commented 4 years ago

Hey @pstadler . There is a variable overlay_cidr that is passed to ./kubernetes/scripts/install.sh. I haven't been able to see where this is used in the script. Could you clarify?

pstadler commented 4 years ago

Looks like a mistake. I guess you can safely ignore it.

jawabuu commented 4 years ago

Thanks @pstadler , some queries

  1. How do you get to test across the different providers? I have a working prototype but I have only tested on digitalocean.
  2. Would you prefer the k3s module to exist within this repo or would you like it in an entirely new repository?
jawabuu commented 4 years ago

Hey @pstadler . As there were quite a number of changes needed to make the modules work with k3s, I have created a repo here https://github.com/jawabuu/kloud-3s . Would you mind checking it out?

pstadler commented 4 years ago

Looks good to me! I'll definitely refer to your repository if somebody asks about k3s.