This is ~17k lines of shell scripting and claims to be "simple". Kuberentes is probably ~1m lines of Go. I'm not entirely convinced that this is less complex (simpler) than Kubernetes.

There are many factors in complexity, but a big one for me is what I have to hold in my head – global state. From any given point, what do I need to understand to know what's actually going on.

For Go, this is actually comparatively little. Between a fairly straightforward language, static binaries, and the focus on ease of distribution, there's not a whole lot outside of a codebase itself to think about.

However for a shell like Bash there's a relatively large amount to consider. You're very exposed to the underlying OS, to libraries and system packages, to various tools, to configurations users may have specified, to things being redefined underneath you. There's a lot of global state to consider for a Bash script.

I suspect it is simpler than Kubernetes, but I don't think it's a clear cut case.

To be fair Kubernetes itself probably has 17k lines of bash, and it is a good thing. It is the first go-to project that I use as a reference for bash scripting best practices.

edit: wc reports 47023 lines in *.sh[1], out of which 23836 are unique[2].

[1]: find . -name '*.sh' | xargs cat | wc -l

[2]: find . -name '*.sh' | xargs cat | sort | uniq | wc -l

You might enjoy having a look at https://github.com/AlDanial/cloc

It can distinguish between actual lines of code, comments and empty lines for a lot of different languages.

You might want to look at https://github.com/boyter/scc

It's the same as cloc, but ludicrously fast.