Guest Writer

How to Learn Kubernetes: Prerequisites, Paths, and Resources

Muhammed Ali
Ambassador Labs
Published in
8 min readJun 2, 2022

--

According to the Stack Overflow Developer Survey, Kubernetes is the second most loved platform and most wanted platform.

Regardless of how powerful and loved Kubernetes is, it is also known to be quite challenging to learn. If you are active on platforms like Twitter or Reddit, you must have bumped into one or two funny memes highlighting the difficulty of learning Kubernetes.

Yes, it can be challenging, but this article will show you how to learn Kubernetes; it includes the prerequisites, learning path, resources, tools, and more to make your journey easier.

Prerequisites — what you should know before learning Kubernetes

Before going ahead to learn Kubernetes, there are some prerequisite concepts that I’ll recommend for you to grasp. Of course, this doesn’t mean you can’t learn Kubernetes without understanding these concepts first, but it sure does make the entire process faster in my opinion.

Microservices

According to the official documentation, microservices also known as the microservice architecture is an architectural style that structures an application as a collection of services that are highly maintainable, loosely coupled, and independently deployable.

This architectural pattern recommends that a software application be separated to work independently as a service and communicate over a network. For instance, if an E-commerce application follows the microservice architecture, it will comprise the database service, the frontend service, and the backend service, all working together to make the E-commerce application work flawlessly.

You need to understand how microservices work because all Kubernetes applications are built following this architectural pattern. Want to learn more about microservices? I’d recommend checking out this tutorial by SmartBear.

Containerization

This is the enclosure of all resources required for a particular system to run. When you containerize your application, it runs the same way on all systems, which is an advantage when it comes to collaboration. Without containers there will be nothing for Kubernetes to orchestrate, this is why it is important to learn how to containerize or use containerized applications.

There are different software tools that can be used to build containers (container runtimes), but the ones that are supported by Kubernetes are Docker, containerd, CRI-O, and any other implementation of the Kubernetes CRI (Container Runtime Interface). For better understanding, you can learn more about containers and containerization here.

Networking

In the world of computing, networking makes it possible for different systems (e.g computers, services) to communicate and share resources. In Kubernetes, networking plays a huge role in the communication between various Kubernetes objects like the pod-to-pod communication, container-to-container communication, Pod-to-Service communication, External-to-Service communications, etc.

In my opinion, just the basic knowledge of networking is enough to get started, just to be aware of how the different parts of your application communicate, and you are good to go.

YAML

This is a human-friendly data serialization language for all programming languages. Initially, the word “YAML” meant “Yet Another Markup Language” but it was eventually changed to “YAML Ain’t Markup Language”.

When creating a Kubernetes object (e.g. pods, secrets, etc), you’ll be required to use either the imperative or declarative approach. Using the declarative approach requires understanding how to write in YAML hence the need to understand how it works. Here’s a fantastic article on the YAML basics you should know to kickstart your Kubernetes journey.

Basic Terminal Commands

While working with Kubernetes, you will be spending most of your time on a terminal creating files or directories, running kubectl commands, managing your Kubernetes cluster, and so much more. So, it is important to know most of the basic terminal commands before you start learning Kubernetes.

You may also want to learn how to use one of the available terminal-based text editors like Vim and Nano in case you want to quickly edit a file, you won’t need to always go back to the system text editor.

Learning Path: How to learn Kubernetes

After understanding the prerequisites, you are ready to start learning Kubernetes. One of the struggles newbies face when learning a new technology is figuring out what to learn next after understanding the meaning of the tool. You’ll hear them say, “okay, I know what Kubernetes means now but what’s the next thing to learn? Should I learn about pods and services or go straight into learning about persistent volumes”.

Since you are reading this article, you are not going to struggle with that because this section will guide you through the learning path and help you know what you should do after you understand the meaning of Kubernetes.

  1. The first thing you should go through is Kubernetes definitions and use cases. If you don’t know what Kubernetes is, you can’t determine if it is useful in your project or use case.
  2. If Kubernetes is right for you, you can now go into learning Kubernetes architecture and terminologies. For you to understand how Kubernetes work and not get lost, you need to learn about the architecture of Kubernetes. While learning architecture, you will indirectly be learning terminologies specific to Kubernetes.
  3. The next thing you need to learn is the usefulness and application of some of the API resources provided by Kubernetes. The most used ones are Deployment, Pod, Service, Secret, Volume, ConfigMap, and Namespace.
  4. Now that you are confident in your knowledge, you can now go further and learn how to set up Kubernetes locally and start orchestrating. Here you can start by trying to use public images or your own Docker image in Kubernetes and see how you can implement some of the API resources you have learned. You should also learn about scaling, Ingress, and availability (liveness, readiness, and startup probes for containers).
  5. Next, learn about Kubernetes Observability and Monitoring. As you go further and start working with multiple clusters and pods, you need to learn how to view the health of those clusters. You can use tools like Prometheus and Grafana, so it will be helpful to learn any of them.
  6. Learning about Kubernetes security and networking will elevate you from the beginner-intermediate stages. Here, you can learn how IP addresses are allocated and how IPv4 and IPv6 work in Kubernetes. Regarding security, you should learn about Role Based Access Control (RBAC) for restricting network access to unauthorized users and best practices for security in Kubernetes.
  7. Finally, it would be helpful to learn about Service Mesh for better security, routing control, observability, etc., and Gateway API.

Resources for Learning Kubernetes

This section will take you through some learning resources that will help you learn Kubernetes in the best way possible. These resources all include explanations of the learning paths I shared earlier with you.

  1. Kubernetes Learning Center: You can use this resource to learn Kubernetes practically and also complete hands-on challenges as you go. You can learn at your own pace while having access to request help from expert mentors and a community of users.
  2. Kubernetes Comic: This resource explains Kubernetes in the form of a comic. This resource doesn’t go into technical concepts, but it gives you a general idea of Kubernetes, its use, and how it works.
  3. Learn Kubernetes using Interactive Browser-Based Scenarios: This resource is unique and helpful because you work with browser-based hands-on labs to solve real-world problems and improve your Kubernetes knowledge without downloading or configuring anything.
  4. The Kubernetes Handbook: This is a free course provided by FreeCodeCamp. This is a Beginner to Intermediate course that will give you a good understanding of Kubernetes fundamentals, how to work on multi-container applications, how to configure Ingress, and many more.
  5. Introduction to Kubernetes (LFS158x): This course is provided by the Linux Foundation. It will teach you about the origin, architecture, primary components, and building blocks of Kubernetes. According to the course description, the course covers how to set up and access a Kubernetes cluster using Minikube, ways to run applications in the deployed Kubernetes environment, access the deployed applications, etc. It basically covers everything you need to know as a beginner to intermediate engineer in Kubernetes.
  6. Kubernetes Security Essentials (LFS260) + CKS Exam Bundle: After going through the Beginner and intermediate courses, learning about security will be a step further. This course addresses security concerns for cloud production environments and covers topics related to the security container supply chain and more!

Tools for Spinning up Kubernetes Cluster

While learning Kubernetes, you will need a cluster to test out the things you are learning. In this section, you will learn about some available ways in which you can use to spin up Kubernetes clusters. This is by no means an extensive list, so if you would like to learn more about other options you can do so.

  • Minikube: This is a tool used to create Kubernetes clusters locally. Using Minikube is free, but the downside is that you can only have one node cluster, and that node will be the worker node and control plane. Minikube can’t be used for actual deployment purposes, but it’s a good option for development purposes.
  • Google Kubernetes Engine: This is a platform provided by Google to help you spin up Kubernetes clusters, manage, scale and deploy them. By using Google Kubernetes Engine, you can quickly start clusters and easily scale up to 15000 nodes, with auto-scaling and security by default.
  • Amazon Elastic Kubernetes Service (EKS): This is a service provided by Amazon to run, manage and scale Kubernetes applications in the cloud. With this service, Amazon promises reduced costs of service with efficient computing resources and automatic Kubernetes application scaling. You’ll be rest assured that your Kubernetes environment is secure.
  • Kind: Just like Minikube, Kind is used for running Kubernetes clusters locally. Kind also gives you the option to integrate it into various continuous integration workflows with ease.

Conclusion

As I mentioned earlier, the learning path described in this article isn’t one-size-fits-all. Indeed learning can be done in different ways, but I know that this path will work since it worked for me too while I was learning about Kubernetes.

Thank you for reading this article up to this point. I hope my thoughts on this article will be able to direct you on the right path to learning Kubernetes.

Telepresence: Rapid development & testing of Kubernetes services

Building and testing your microservice-based application becomes complex when you can no longer run everything locally due to resource requirements. Moving to the cloud for testing is a no-brainer, but how do you synchronize your local changes against your remote Kubernetes environment? By using Telepresence!

Telepresence redirects network traffic from a service in the cloud to a service or container on your local machine, merging the benefits of cloud and local test environments. This means you can run integration tests locally instead of waiting on a remote deployment.

Try Telepresence today or learn more about Telepresence.

--

--

Technical Writer with experience in building awesome stuff with Django, Python, JavaScript, React, Kubernetes, etc. || Cloud-Native enthusiast.