Original image by Myriam Zilles from Pixabay

Are you trying to figure out whether or not you should learn Kubernetes? If so, you might have questions like "Is Kubernetes the next big thing?" or "Is Kubernetes overkill?" or "Is Kubernetes hard to learn?". My hope is to clear up any confusion and help you to decide whether Kubernetes is right for you.

In this first article, we are going to look into things like:

In the second article, I'm going to give you a high-level tour of the primary Kubernetes components like pods, services, and controllers. This way you can get a good idea of the tools that Kubernetes provides you, and how you could use them to solve your (software) problems.

Disclaimer

Kubernetes resides at the intersection of software development, DevOps, and system administration. I am a software developer. So--for better or for worse--I view Kubernetes through a developer's eyes.

You should know that I created a full video course to learn Kubernetes. I liked the technology that much. (After all, there's no true believer like a convert.)

That said, my goal is to remain objective. So I'm going to cover the good and bad parts so that you can decide if Kubernetes is right for you.

What is Kubernetes?

In a nutshell, Kubernetes helps you to manage applications made up of one or more containers. It's essentially a toolbox that helps you to construct very robust applications made up of multiple Docker containers. (For more details, go here.)

What are the main benefits of Kubernetes?

  • Self healing - Kubernetes automatically restarts containers that crash. It will also automatically reschedule containers that were running on a node that crashed or lost power.
  • Load balancing - It's trivial to create a load balancer in Kubernetes. This can be done for traffic that is internal to the cluster or external to the cluster.
  • Automatic container scheduling - Kubernetes automatically decides where to deploy your containers. This is really handy when you have many containers running on many nodes.
  • Horizontal scaling - It's easy to scale up the number of container copies when the demand on them increases. This can be done manually with a single command or automatically.
  • Rolling upgrades - You can swap out new containers for old ones without any interruptions to service. This can also be done with a single command.
  • Zero-downtime reversion - If you find a bug in some of your containers, you can revert back to an older version of those containers without any interruptions. (This gives you plenty of time to rebase git and cover your tracks.)
  • Secret data management - You can store sensitive information--like API keys and DB passwords--in your Kubernetes cluster. This is a much safer alternative to saving them in source files under version control.
  • Abstracts away the hardware - Neither developers nor containers need to know anything about the underlying cluster hardware. This makes it easy to migrate from one cloud provider to another.

How hard is it to learn Kubernetes?

Image by congerdesign from Pixabay

Some people complain that Kubernetes is difficult to learn. I think there is some truth to that, but not as much as one might fear. Let's briefly examine this complaint.

  • Is it hard to find good Kubernetes documentation? - The official documentation has gone from truly horrendous to quite decent in the last few years. But it's still a bit disjointed and spread out. This makes it a little difficult to determine the order in which you should learn various concepts. Thus, I think that the documentation is better as a reference than as a step-by-step guide.
  • Is Kubernetes complex? - I don't think Kubernetes is more complex than any of the popular programming languages used today. In fact, I think that Kubernetes is easier to grasp--especially if you are already familiar with containers.
  • Does Kubernetes have many prerequisites? - Not really. But you should know what Docker containers are and the basics of how they work. It's also helpful to know YAML, which takes 5 to 10 minutes to learn. And you need a basic familiarity with the *nix command line. Yes, even Windows users because you will probably be teleporting into Linux-based containers from time to time as part of the dev/debug process.
  • Is there a lot of material to learn? - There are quite a few concepts to learn, but there's a reason for this. Kubernetes is capable of solving many different types of problems thanks to its many features. However, you can bypass the more advanced features until you actually need them. Many problems only need a small subset of Kubernetes features. Use what you need and ignore the rest.

Is Kubernetes overkill?

While Kubernetes has a lot of features, you don't have to learn them all. You can get pretty far just by learning the core features--such as pods, services, controllers, volumes, secrets, and so forth. Then you can pick up the more-specialized capabilities when you actually need them.

I think that part of this "overkill" reputation actually stems from how teams choose to install and maintain Kubernetes. You see, Kubernetes does not have a simple installation process in production. (Note that development clusters are not hard to create.) But if you use a hosted solution--like DigitalOcean Kubernetes or Google Kubernetes Engine--installation, security, and upgrades are all taken care of for you. Best of all, hosted solutions are cheap!

In the end, keep these two thoughts in mind:

  1. Use what you need and ignore the rest.
  2. Every big project started out small!

Is Kubernetes' popularity increasing or decreasing?

Nobody wants to board a sinking ship. Nor does anyone want to learn a fading technology. The good news is that Kubernetes is in no danger of disappearing into oblivion. Lots of major players--like Pinterest, Spotify, and Squarespace--depend on Kubernetes. In fact, Kubernetes has become so popular that it has become the de facto standard container orchestration system.

Is Kubernetes fun to work with?

By Ryan McGuire from Pixabay

I really like working with Kubernetes. But I didn't start out feeling that way.

When I was first learning Kubernetes a number of years back, I wasn’t a fan for two reasons: (1) it had truly terrible documentation and (2) you had to deal with a lot of config files.

The good news is that the Kubernetes maintainers have vastly improved the documentation. That alone made the Kubernetes much more enjoyable to work with.

That said, working with Kubernetes means that you still have to work with many config files. But now I actually enjoy working with them. I attribute this complete change of heart to three things.

  1. First, Kubernetes resides in an area with interesting problems. It is, after all, a toolbox for solving the infrastructure-level problems of containerized systems. Therefore, you use Kubernetes to deal with things like distributed systems, microservices, system reliability, networking, and security. Admit it. That’s fun!
  2. Second, Kubernetes is a very powerful system with lots of capabilities. And you know what they say, “With great power comes great responsibility fun”. That’s why my life's goal is to be reincarnated as an electric eel. So far, so good.
  3. Third, Kubernetes components are fun in the same way that Lego blocks are fun. Their flexibility and composability empower you to solve a wide range of problems. This is kind of similar to programming because in both cases you are solving problems with a combination of creativity, ingenuity, and best practices. What’s not to like?

Admittedly, Kubernetes isn't all sunshine and rainbows. So, let’s go over a couple of the proverbial clouds that could rain on your parade.

  1. First off, Kubernetes config files aren’t intuitive to read in the beginning. Simply put, it takes time for your brain to get used to picking out the snippets that are important from the ones that are not. But don't worry. It’s not very hard. If I can get it, you can too.
  2. Second, you need to get comfortable debugging in Kubernetes. (It's not as if you can throw in a bunch of print statements or run some sort of non-existent Kubernetes debugger.) Until you become familiar with a handful of useful kubectl commands, you might feel a bit lost from time to time.

Summary

First and foremost, neither Docker nor Kubernetes is a fad. Containers and container orchestration will continue to permiate the industry--and for good reason. While containers eliminate a whole class of deployment problems, Kubernetes provides a robust and versatile system to manage container clusters of any size.

That said, there are two scenarios where Kubernetes may not be your best choice.

  1. First, if (a) you’re not already using containers, (b) you're not planning on using them, and (c) you already have deployment and cluster management systems that work, then don’t switch! It sounds like your project is already in a pretty good place.
  2. Second, are you on a small team that's determined to install and manage its own container orchestration system? If so, consider using something like Docker Swarm which may not be as fully featured as Kubernetes, but is easier to install.

If you are still interested in Kubernetes, check out "Is Kubernetes Worth Learning? Part 2: Key Components". There I will give you a high-level overview of the core Kubernetes components and what they can do for you!