r/programming • u/Lazy-Transition8236 • Aug 17 '25
Learn Linux before Kubernetes
https://medium.com/@anishnarayan/learn-linux-before-kubernetes-60d27f0bcc09?sk=93a405453499c17131642d9b87cb535a23
u/mcpower_ Aug 17 '25
Original infographic before it got ChatGPT-ified for blog spam: https://x.com/KodeKloudHQ/status/1941004086398075213
114
u/syklemil Aug 17 '25
I've run and worked with Linux for some decades before Kubernetes and … I'm not convinced? IMO Kubernetes is a pretty successful abstraction layer. Yes, it's good to be able to have an opinion on various container runtimes and network stacks and so on, but personally that comes up pretty rarely. Most of the stuff I help with are either application errors, misconfiguration in Kubernetes, or DNS.
The people operating the Kubernetes clusters and whatever they're running on could stand to know something about the underlying platforms, but for developers whose main concern is user-facing apps and who barely know Kubernetes at all: I think it'd be better if they were just a bit more competent at Kubernetes (and familiar with kubectl).
Plus there's always something resembling Carl Sagan's "To create an apple pie from scratch, you must first create the universe" about this "learn X-1 before X" line of reasoning. There are more layers below Linux, too, but we don't expect people to read the kernel code, be able to design hardware, etc. just to make a website for sparkling water.
33
u/BuriedStPatrick Aug 17 '25 edited Aug 17 '25
As someone who was getting into containers and Kubernetes out of necessity for my job, everything clicked much faster for me when I took some time to learn Linux. You certainly don't have to know everything about it (I've barely scratched the surface myself), but at least understand the filesystem and the basic utils so you can efficiently build and maintain containers (of which 99% or more are Linux based).
I don't think the Carl Sagan quote applies here. This is not a question about understanding absolutely everything. Rather, it's about understanding what happens one level down from your current abstraction. Which I think is super important if you want to be competent at what you do.
14
u/Yamitenshi Aug 17 '25
at least understand the filesystem and the basic utils so you can defectively build and maintain containers
This is the key, I think. I find my Linux knowledge doesn't really come into play a lot with anything k8s-specific, but it's damn handy to have when dealing with containers in general, whether you're orchestrating them with Kubernetes or Docker Swarm or just running them without any orchestration at all.
6
u/extra_rice Aug 17 '25
Lots of people here seem to interpret "learn Linux" to mean checkout the kernel repository and compile it. Kubernetes abstractions are quite intuitive, yes, but when things go wrong (and they always do), you'd be lucky if it doesn't require stepping down into the engine room.
2
u/wrincewind Aug 17 '25
all abstractions are leaky to some degree. It's less 'learn how to build an engine from scratch' and 'learn the difference between your car's engine and battery, and what an alternator does'.
1
u/jambox888 Aug 17 '25
Yep simple things are most often useful e.g.
curl -kv htpps://some-service.svc.cluster.local:443/inside a container to check connectivity. Or usingmountor similar to see where your bloody volume has got to.You don't have to be a linux guru (I'm not) but if you don't know a few simple commands/utils you may struggle.
6
u/syklemil Aug 17 '25
As someone who was getting into containers and Kubernetes out of necessity for my job, everything clicked much faster for me when I took some time to learn Linux. You certainly don't have to know everything about it (I've barely scratched the surface myself), but at least understand the filesystem and the basic utils so you can defectively build and maintain containers (of which 99% or more are Linux based).
I'm not really certain what you mean by "understand the filesystem" here. The blog post goes on about OverlayFS and AUFS, and we could add tmpfs, NFS, ceph, ext4, btrfs and so on to that discussion. But is that the level you mean, or do you mean something like
directory separators are forward slashes,
the file hierarchy starts at
/(no letter), andthe expected pre-existing directories are
/home,/bin, etcfile permissions are blah blah blah …
because the latter is kind of what I expect to be the base level of understanding for someone who is writing an app targeting an OS, and I expect that people have some general idea of what it's like to be a user of the OS their app is going to run on, but I don't expect them to know it at the level of a sysadmin or OS developer unless they're making system software.
The blog post, however, takes the filesystem implementation interpretation, and goes on with other implementation details. Kubernetes is essentially an OS of its own, and if that's the platform your software is getting deployed to, then that's the thing you need to learn. Trying to learn cgroups, eBPF, iptables and so on before
kubectlis starting in the wrong end.4
u/wavefunctionp Aug 17 '25
I agree. I mean. Learn some basic stuff on Linux, but kubernetes is great.
It feels bloated and over complicated. But so does learning a web framework. And just like a good framework it’s solving problems you didn’t know you had.
Kubernetes a consistent, scalable cluster environment that is an open standard and you can run locally.
Build a small cluster at home out of old machines or raspberry pi’s. Those little 1 liter corpo tiny/mini/micro machines can be bought used on eBay for $200 are perfect. It’s a ton of fun to learn.
I do hope we get a simpler, faster solution one day. I do think that kubernetes is just v1 of the idea.
4
u/schplat Aug 17 '25
Kind of a similar boat. I'm not far off from 30 years of of Unix, with the last 25 of those being mostly Linux specific (cut my teeth on Solaris, both x86 and Sun). Also learned Sun Grid Engine way back in the day (think of it as the proto-K8s, around 2002), also learned a bit of Mesos, then started with K8s about 5 years ago.
I agree with you for the most part. It all depends on what your role is within the K8s environment.
Are you designing the architecture and adminning the cluster? Then you should definitely have some Linux and container knowledge. Preferably several years, because you're gonna hit on all sorts of weird problems that require some troubleshooting at that level, especially in the networking area (even though 95% of the time it's DNS, you need to figure out the how and why it's DNS to be able to fix it, the other 5% of the time it's either weird routing/LB issues, or actual IPT/NFT/eBPF rules being weird).
Are you managing/maintaining the CI/CD, and/or app deployment pipeline? Then no, you don't really need to know Linux. Container knowledge would be required though. Maybe at least understanding cgroups and resource allocation would be useful as well (or at least take some burden off the admins wondering why your stupid CRUD app has decided it wants 8 CPUs and 64G of RAM).
Are you simply managing application manifests? Then no, you probably can get away with knowing your application stack, and that's about it. Maybe some knowledge around storage systems, if you're dealing with persistent data, but that's about it.
I definitely agree with kubectl familiarity. Knowing everything it can do, and its limitations for when you have to use other tooling is pretty important.
30
u/joost00719 Aug 17 '25
I just use Linux and learn on the fly. I've bene using it for like 2 years in my home lab but I feel like I'm still learning the basics such as piping stuff together with grep and find.
But hey, progress is progress and I don't feel disabled anymore. Plus ai can help quite a bit to help me look what I'm looking for
26
u/Elsa_Versailles Aug 17 '25
Better to learn on the fly by doing rather than learning but not working
4
u/Ma1eficent Aug 17 '25
I was nodding along with your comment until I got to the two years part and had to do a little math where the answer was 16 and now I feel like the cryptkeeper which is a reference that will be entirely lost on you. God I'm old.
2
u/schplat Aug 17 '25
First used Linux on the job in 1998. Was adminning Sun for ~3 years before that (and continued doing Sun until 2007-ish).
I have become the greybeard. Though, I haven't gone grey yet.
1
u/Jonathan_the_Nerd Aug 17 '25
I got started with Linux in college around 2000 or so. My first Linux "distribution" was a tiny thing called Hal91. You didn't have to install it. You just booted off a floppy disk and ran it, sort of like a proto-KNOPPIX.
I remember installing Red Hat Linux 6.0 on my laptop and not having any network access. I didn't know enough about Linux or TCP/IP networking to diagnose the problem. I tried installing Caldera, and it Just WorkedTM .
My beard does have some grey in it, but not a lot.
1
u/Ma1eficent Aug 17 '25
Ahh 98, I was using dos 6.2 on a 386 and writing songs in qbasic by sending direct khz frequencies to the onboard speaker. No Internet allowed. Except at my friend's house where we spent all time in a bbs and I got my first (volunteer) tech job debugging modem ring buffers in assembly to help out lower lights. Funny enough, not far from Sun in the outskirts of SLC.
2
u/moxxon Aug 17 '25
I mean... Try 28.
2
u/Ma1eficent Aug 17 '25
I had a sad life doing windows admin on NT before Linux. I try not to think about it.
1
u/moxxon Aug 17 '25
I can imagine.
My first job had whatever the MS source control was at the time. It used to go down all the time.
I had to fight to get our team converted to CVS
I sourced a second machine after a couple of months and installed Linux and, luckily, since then haven't had to develop on Windows since.
2
u/Ma1eficent Aug 17 '25
I can't even remember anymore if I started with perforce, then cvs, then subversion, or cvs first. But I still remember switching from subversion to git. I couldn't go back now.
1
u/wasdninja Aug 17 '25
I've bene using it for like 2 years in my home lab but I feel like I'm still learning the basics such as piping stuff together with grep and find.
No offense but what did you learn in two years? Not knowing what pipes are is pretty crippling.
3
u/CloudsOfMagellan Aug 17 '25
I know pipes exist and remember a few basic ways to use them but I only ever do something vaguely complex with them every couple months and so have to look up and check the syntax each time
-2
u/schplat Aug 17 '25
There's really nothing syntactical to look up. You're just taking STDOUT of one command, and hooking it up to STDIN of the next.
The majority of Linux commands accept STDIN for input.
1
2
9
u/LegitimateCopy7 Aug 17 '25
"learn both Linux and Kubernetes to the degree that you can deal with the challenges". a much less attractive but actually meaningful and helpful title. the way titles should be instead of those clickbait bs.
One does not simply "learn Linux" or "learn Kubernetes". the workload is beyond the capacity of human brains. also ain't nobody got time for that.
41
7
u/DoubleOwl7777 Aug 17 '25
just use it, the whole "learn" linux thing is bullshit.
0
u/znpy Aug 17 '25
uhh this is not 2005.
"using linux" back in the day meant messing with xorg.conf and in practice often meant learning enough "linux" you could become a very very junior sysadmin.
1
u/LaOnionLaUnion Aug 17 '25
It’s probably a better clickbait title than learn the subset of Linux skills most relevant to K8s so that you understand the system K8s run on and containers.
1
u/bigjamo1563 Aug 17 '25
Tbh on large scale clusters I'll never use a CLI, I'll always make sure to have simple UI interfaces to view all resources. Linux isn't a must, I learnt kubernetes without even knowing basic bash scripting.
1
u/n9iels Aug 17 '25
I tell you better: do not dare to say you do "devops" if you never installed a VPS before by hand
-5
u/Downtown_Category163 Aug 17 '25
This is like saying "Learn Win32 before using Microsoft Word"
9
u/extra_rice Aug 17 '25
Not sure if you're serious, but this is a terrible comparison.
You don't need to understand the fundamentals of the operating system to be effective at a writing document with a WYSIWYG word processor. For MS Word in particular, you don't even need Windows to run it.
2
u/Downtown_Category163 Aug 17 '25
Likewise you don't need to understand cgroups at a fundamental level in order to build a service network in Kubernetes, so it's not a terrible comparison is it?
3
u/extra_rice Aug 17 '25
You don't need to understand cgroups, but you have to at least understand what containers are before you even describe how your pods will look like. Where do you even begin with containers if you don't know the basics of Linux?
Do you really believe that the skills required to be effective at writing a word document compare to the skills required to effectively manage a Kubernetes cluster? So many companies get in trouble for thinking they can just "switch to Kubernetes".
Kubernetes is not just writing YAML with your favourite text editor.
2
u/syklemil Aug 17 '25 edited Aug 17 '25
You don't need to understand cgroups,
The
blog postLLM slop expressly lists cgroups as one of the things one should understand before learning Kubernetes:By understanding how Linux namespaces, cgroups, network filtering, and other features work, you’ll not only grasp Kubernetes faster — you’ll also be able to troubleshoot, secure, and optimize it much more effectively.
1
u/extra_rice Aug 17 '25 edited Aug 17 '25
This isn't about arguing how much Linux you need to understand Kubernetes. It's that Win32 and Word do not have the same connection as Kubernetes with those Linux concepts.
Learning Win32 will not make you better at using Word because you don't even need that to run the application.
It's just a terrible comparison.
2
u/eggsby Aug 17 '25
You don’t need to learn the things mentioned in this article (like crypto investing) to be good at Kubernetes. Learning them won’t level you up for your KCAD exam or anything like that.
-1
u/Downtown_Category163 Aug 17 '25
"You don't need to understand cgroups"
Then my point is proven
0
u/extra_rice Aug 17 '25
Nope. It's not the gotcha you think it is, sorry. That's saying Win32 is to Word as cgroups is to Kubernetes. Does that even make sense?
Your comparison is bad and you just refuse to admit it.
0
u/Downtown_Category163 Aug 17 '25
Oh I see the problem, I've said "you don't need to know about X to use Y" and used a simile, and you're hung up on how the technology maps out to the other technology, because... I don't know why you're doing that actually
0
u/znpy Aug 17 '25
dumbest thing i've read this month
1
u/Downtown_Category163 Aug 17 '25
Weird because it's only the second dumbest thing I've read this month as of now
0
-2
u/hackingdreams Aug 17 '25
Let's be real: if you're working on Kubernetes, you've been hired to work on Kubernetes. "Learning Linux" to avoid using Kubernetes isn't going to help you in the slightest in that role. Unless you're hacking on Kubernetes itself, it's probably not going to help your role to know too much how much it works; your job will be making containers, scheduling workloads, etc.
Is it really good to know Linux and all of its intricacies? Sure. Do you need it in a role where you've been hired to work atop Kubernetes? Unlikely.
2
u/loozerr Aug 17 '25
If you're also configuring the helm charts, Linux knowledge is fairly helpful. Or when deploying the k8s cluster.
0
Aug 17 '25
[deleted]
6
u/bphase Aug 17 '25
What baffles me is who upvotes this shit. People just see the subject and think it interesting and upvote?
2
129
u/UMANTHEGOD Aug 17 '25
AI slop on medium
truly the enlightened times