reachlin.github.io

reachlin's development notes

We all know install Kubernetes is not an easy task. That’s why there are already so many ways to do it:

But what I really need is a solution that can be used on Travis or a localhost for development purpose. Because the lack of documentation of Kubernetes yaml file, I have to try many times for changes on these files. And there’s no way to find out if my service yml is valid until deployed on an actual Kubernetes. There’s not much checking I can do besides yaml syntax.

I tried to run Kargo or Minikube on Travis, but failed with all kinds of errors. Minikube is written in golang, so changing its code is not a easy task. Kargo on the other hand uses Ansible, which is organized and easy to read, but its complex logic to support multiple configurations makes me give it up eventually. Also, in some country or company’s network where it is impossible to download images from the internet. All images have to be saved locally or imported into a local registry.

For reasons mentioned above, I decide to write another installation solution for Kubernetes. It will only support a very limited env. and can be run on local machines in an isolated network. I pick Ansible as the language, because it doesn’t need compiling and people can easily read its scripts and change them ad-hoc. Besides, it’s a good practice to understand how Kubernetes works to install it from basic components instead of using Minikube or kubeadm that wrap and hide too many details.

I call this project k8s0 which means Kubernetes Zero, or a minimal Kubernetes.

2017-05-25

I am able to install kubelet, api, controller and scheduler on Travis today. So projects can verify their deployment yaml using k8s0, just checkout it and run site.yml. The travis file in k8s0 has all details needed.