If you are planning to use this repo for reference, please hit the star. Thanks!
The Kubernetes Learning Roadmap is constantly updated with new content, so you can be sure that you're getting the latest and most up-to-date information available.
- 🚀 CKA, CKAD, CKS, or KCNA exam aspirants can save 40% today using code SCARYTECHIES at https://kube.promo/devops. It is a limited-time offer from the Linux Foundation.
- For the best savings, opt for the CKA + CKS bundle ($355 Savings). Use code SCARYTECHIES at https://kube.promo/bundle
Note: You have one year of validity to appear for the certification exam after registration
- Kubernetes Learning Roadmap
- Kubernetes Certification Coupon
- Kubernetes Learning Prerequisites
- Learn Kubernetes Architecture
- $1000+ Free Cloud Credits to Launch Clusters
- Learn Kubernetes Cluster Setup & Administration
- Understand KubeConfig File
- Understand Kubernetes Objects And Resources
- Learn About the Object YAML Structure
- Learn About Pod & Associated Resources
- Learn About Pod Dependent Objects
- Deploy End to End Application on Kubernetes
- Learn About Securing Kubernetes Cluster
- Learn About Kubernetes Operator Pattern
- Learn Important Kubernetes Configurations
- Learn Kubernetes Best Practices
- Learn Kubernetes Logging & Monitoring
- Learn Kubernetes Production Best Practices
- Real-World Kubernetes Case Studies
- Kubernetes Failures/Learnings
- Learn Kubernetes Templating Tools
- Kubernetes Deployment Tools (GitOps Based)
If you want to learn Kubernetes, it's important to start with the basics. That means brushing up on your IT fundamentals first because Kubernetes builds on those. Once you have a good grasp of the basics, learning Kubernetes can be fun and easy. So don't skip the fundamentals – take some time to study them before diving into Kubernetes!
- Learn Container conceptsComplete Guide
- Learn Container Management Tool - Docker Complete Guide
- Understand Distributed system Blog
- Understand Authentication & Authorization Blog
- Learn Basics of Key Value StoreBlog
- Learn the basics of REST APIBlog
- Learn YAMLBlog
- Understand Service Discovery Blog
- Learn Networking Basics
- L4 & L7 Layers (OSI Layers)Blog
- SSL/TLSBlog
- Network Proxy BasicsBlog
- DNSBlog
- IPTablesVideo
- Software Defined Networking (SDN)Blog
The following image shows the high-level kubernetes architecture and how external services connect to the cluster.
Refer to the following documents to learn the Kubernetes Architecture.
Launching large clusters in the cloud can be costly. So utilize the available cloud credits to practice deploying clusters as if you work on a real project. All cloud platforms offer managed Kubernetes services.
- GKE -Google Cloud $300 free creditsCloud Platform
- EKS - AWS $300 free POC creditsCloud Platform
- DO Kubernetes - Digital Ocean – $200 free creditsCloud Platform
- Linode Kubernetes Engine - Linode Cloud – $100 Free creditsCloud Platform
- Vultr Kubernetes Engine - Vultr Cloud - $250 Free CreditsCloud Platform
- AKS - Azure Cloud Hosting - $200 Free CreditsCloud Platform
As DevOps engineers, gaining a thorough understanding of each component and cluster configuration is crucial to work in production environments. Though there are various methods for deploying a Kubernetes cluster, it is advisable to learn how to set up multi-node clusters from scratch. This allows you to gain knowledge on concepts such as High Availability, Scaling, and Networking and simulates a real-world project.
Additionally, mastering the configuration of multi-node clusters can be beneficial for interviews and building confidence in your abilities. The following are recommended ways to establish a Kubernetes cluster.
- Kubernetes the Hard WayGithub
- Kubeadm Cluster SetupBlog
- Minikube Development Cluster Blog
- Kind Development ClusterOfficial Documentation
- Vagrant Automated ClusterGithub
Following are some of the important cluster administrative tasks
- Deploy Kubernetes DashboardOfficial Doc
- Important Kubernetes Cluster ConfigurationsBlog
- Kubeadm Cluster UpgradeBlog
- etcd backup using etcdctlBlog
- Run CIS benchmarks using kube-benchBlog
As a DevOps engineer, it is important to become familiar with the Kubeconfig file. It is crucial for tasks such as setting up cluster authentication for CI/CD systems, providing cluster access to developers, and more.
A Kubeconfig file is a YAML file that stores information and credentials for connecting to a Kubernetes cluster. It is used by command-line tools such as kubectl and other client libraries to authenticate with the cluster and interact with its resources.
The Kubeconfig file can be used to store information for multiple clusters and users, allowing users to switch between different clusters and contexts easily. It is an important tool for managing access to and interacting with Kubernetes clusters.
Refer to the following document to learn about the Kubeconfig File in detail.
In Kubernetes, an object is a persisted entity in the cluster that represents a desired state of the system. It is created and managed by the Kubernetes API server and is stored in the etcd key-value store. Examples of Kubernetes objects include pods, services, and deployments.
Here is an example of a Pod Object
apiVersion: v1 kind: Pod metadata: name: nginx spec: containers: - name: nginx image: nginx:1.14.2 ports: - containerPort: 80
A resource is a representation of a Kubernetes object that is exposed by the Kubernetes API. It is a way for clients to interact with and manipulate objects in the cluster.
A resource refers to a specific API URL used to access an object. Resources are typically accessed through the Kubernetes API using HTTP verbs such as GET, POST, and DELETE. For instance, the /api/v1/pods
resource can be used to retrieve a list of v1 Pod objects. Additionally, an individual v1 Pod object can be obtained from the /api/v1/namespaces/namespace-name/pods/pod-name
resource.
Detailed Blog: Kubernetes Objects & Resources Explained
Every object in Kubernetes is represented/created using a YAML file. Kubernetes has many native objects (20+), however, every object YAML follows a hierarchical structure as shown below.
apiVersion: <API version>
kind: <Kind of object>
metadata:
name: <Name of the object>
spec:
<Specification of the object>>
Here is what each section means.
- apiVersion: Specifies the Kubernetes API version used for the object.
- kind: Defines the type of Kubernetes object being created or modified.
- metadata: Contains information about the object.
- spec: Defines the desired state of the object, including its configuration and behavior. Under spec, there could be many subfields depending on the object type.
The structure remains the same for all native Kubernetes objects. While learning about each object, you can check the hierarchy, and you will be able to relate.
All the essential concepts in Kubernetes center around the Pod. Understanding Pods in detail, along with their supported features, is crucial for anyone working with Kubernetes because many other objects in Kubernetes are built around them. Below are comprehensive guides that delve into various aspects of the Pod with real-world practical examples.
- Kubernetes Pod Explained Blog
- multi-container podsBlog
- Init Containers Explained Blog
- Pod Lifecycle PhasesBlog
- Pod Priority, PriorityClass, and PreemptionBlog
- Pod Quality or Service - QoSBlog
- Troubleshoot PodBlog
- Container Lifecyle HooksOfficial Doc
- Pod Disruption BudgetBlog
- Pod Affinity/Anti-AffinityBlog
- Pod Labels & SelectorsBlog
In the topics above, we've covered all the core concepts of Pods that are used in production-level implementations. You should practice these concepts hands-on. Once you have a solid practical understanding of Pods, you can move on to learning about objects that depend on Pods.
Running applications on a single pod can be a single point of failure. That's why Kubernetes provides various objects that use pods to make applications highly available.
Makes sure a specific number of pod replicas are running at all times. If a pod crashes, the ReplicaSet starts a new one.
Use Case: Good for stateless applications where you need multiple identical pods.
Detailed Blog: Replicaset Guide
Manages ReplicaSets and allows for easy updates and rollbacks. It also scales the number of pod replicas.
Use Case: Useful for stateless applications and when you need to update or rollback easily.
Detailed Blog: Deployment Explained
Like a Deployment, but for stateful applications. It gives each pod a unique identity.
Use Case: Good for databases and other stateful applications.
Detailed Blog: Statefulset Explained
Ensures that each node in the cluster runs a copy of a pod.
Use Case: Useful for node monitoring or logging agents.
Detailed Blog: Daemonset Explained
Creates one or more pods and ensures that a specified number of them are completed successfully.
Use Case: Good for batch processing tasks.
Detailed Blog: Kubernetes Jobs Practical Guide
Like a Job, but runs at specific times or intervals.
Use Case: Useful for scheduled tasks like backups.
Detailed Blog: Kubernetes CronJobs Practical Guide
Applications deployed on Pods using deployments may need to be accessed either internally within the cluster by other services or externally from outside the cluster. The feature that facilitates this access to Pods is known as Services in Kubernetes. Services provide a stable IP address and DNS name, enabling seamless communication and load balancing among Pods, regardless of their lifecycle changes. This ensures that the network connectivity to applications remains consistent and reliable.
-
StatefulSets: These are used for workloads that need stable network IDs and storage, like databases.
-
DaemonSets: These ensure that each node in the cluster runs a copy of a Pod, useful for node-level tasks like monitoring.
-
Jobs: These are used for one-off tasks that run to completion.
-
CronJobs: These are like Jobs but run on a schedule, like a cron task in Linux.
-
Services: These don't manage Pods but are closely related. They provide a stable network endpoint for Pods.
-
Ingress Controllers: While not directly dependent, they work closely with Pods to manage external access to services.
<--In Progress-->
<--In Progress-->
<--In Progress-->
<--In Progress-->
<--In Progress-->
<--In Progress-->
Helm and Kustomize are both tools that are used to manage Kubernetes manifests. They are similar in many ways but have some key differences.
Helm is a package manager for Kubernetes that allows users to easily install, manage, and upgrade applications on a Kubernetes cluster. It uses a concept called "charts" which are pre-configured sets of Kubernetes resources that can be easily deployed, upgraded, and rolled back.
Kustomize, on the other hand, is a tool that allows users to customize and configure existing Kubernetes manifests. It uses a concept called "patches" which can be applied to existing manifests to customize them for different environments and use cases. Unlike Helm, Kustomize does not include built-in support for versioning and rollback, and does not have a concept of "packages" or "repositories".
- Learn to Create Helm Chart From ScratchHands-On Blog
- Getting started with KuztomizeHands-On Blog
GitOps is a technical practice that uses Git as a single source of truth for declarative infrastructure and application code.
- Guide to GitOpsOfficial Doc
Some popular GitOps-based tools for deploying applications to Kubernetes clusters are:
- Argo CDOfficial Doc
- Argo RolloutsOfficial Doc
- FluxCDOfficial Doc
- JenkinsXOfficial Doc
- Production Readiness ChecklistBlog
- Learn About 12 Factor Apps Official Guide
- Scheduling 300,000 Kubernetes Pods in Production Daily Video
- Recycling Kubernetes Nodes - YelpBlog
If you do not have real-world Kubernetes experience, it is better to read case studies of other companies using kubernetes.