The idea of Kubernetes Operators is simple and attractive.
But as it usually happens, the devil is in the details. I've been working on an operator for the past few weeks, and the learning curve is quite steep, actually.
Here are some projects that may help 🔽
1. kubernetes-sigs/kubebuilder
GitHub says it's an "SDK for building Kubernetes APIs using CRDs."
But you can scaffold an operator project with it.
2. operator-framework/operator-sdk
Much like kubebuilder, this project allows you to scaffold an operator real quick.
The difference is that it comes with batteries included:
- support of Ansible and Helm operators
- simplifies releasing operators (OLM)
- e2e testing
- linting
3. kubernetes-sigs/e2e-framework
An experimental e2e testing framework for Kubernetes clusters.
With the simple `go test` command you can deploy your operator, create customer resources, and validate the logic.
4. kubernetes/client-go
That's how you call the Kubernetes API. Must-have for learning.
5. kubernetes-sigs/controller-tools and kubernetes-sigs/controller-runtime
Both, Kubebuilder and the Operator SDK are based on these two lower-level projects.
Worth checking out to understand the internals.
And if you still don't understand the idea behind the Kubernetes Operator, check out this illustrated introduction
- PHP - simplest, traditional
- Python - more generic, traditional
- JavaScript - enter the async world!
- Go - learn goroutines
- Scala/Clojure - functional
2. Try different server-side frameworks
Don't try to learn all ins and outs. Instead, learn what's common for all frameworks.
- Request handling - processes, threads, coroutines
- Request routing - how to bind code to requests attrs
- Templating
- ORM integrations
3. Learn your platform
Linux basics - sockets, i/o, filesystem
Network basics - Ethernet, IP, TCP, HTTP
DNS - hostnames are only for humans
TLS, HTTPS - how X.509 certificates work
Learn SysAdmin craft - how to install packages, configure servers, troubleshoot perf issues.
I spend a lot of time in the terminal. But I never touch Enter or arrow keys. Here is what makes me productive:
Command history navigation
ctrl + p - previous command
ctrl + n - next command
ctrl + r - history search
ctrl + m - enter
Can't imagine my life without these hotkeys
Line navigation
ctrl + a - jump to the beginning
ctrl + e - jump to the end
ctrl + u - del from cursor till the beginning
ctrl + k - del from cursor till the end
Work navigation (slightly more exotic, but I got used to it already)
alt + f - jump one word forward
alt + b - jump one word backward
alt + d - del a word in front of cursor
ctrl + f - jump one char forward
ctrl + b - jump one char backward
ctrl + d - del a symbol under cursor
Long story short: I solved hundreds of LeetCode and HackerRank problems, and I do find this experience useful for my day job.
Here is why (thread)
Sometimes, a developer may stumble upon a purely algorithmic task.
In my very first company, I wrote a GUI framework for SmartTV devices. These sets were quite slow back in 2011, so I needed to make the framework really lightweight and fast because even jQuery would be too heavy
The framework had a virtual DOM tree (react wasn't a thing yet). And the element rendering and navigation were all about tree traversals.
This framework essentially saved the project from failure.