Technology / System Admin

What is the Basic Kubernetes Structure?

What is the Basic Kubernetes Structure?
Follow us
Published on November 24, 2022

Kubernetes is like a distributed Docker service. Though that’s a rough comparison, that’ll get you most of the way to understanding Kubernetes. Today we’re going to explain the structure of Kubernetes. If you are familiar with Docker, this article will also explain the high-level difference between Docker and Kubernetes.

An Overview of the Kubernetes Structure

In this video, CBT Nuggets trainer Ben Finkel explains what the structure of a Kubernetes cluster looks like. You will learn what a Kubernetes cluster, node, deployment, pod, and service is.

What is the Basic Kubernetes Structure?

Kubernetes is designed to run on clusters within a virtualized environment. Like virtual machines or Docker containers, each Kubernetes cluster has various layers. Layers isn’t an accurate word to explain a Kubernetes structure, but that word is an excellent way to visualize how Kubernetes is built. Let’s explain each layer. 

What is a Kubernetes Cluster?

First, Kubernetes runs in a cluster.  A cluster is a physical computer or virtual machine that runs the Kubernetes Compute Engine. Clusters can be distributed, or they can be one physical machine with a bunch of VMs in it. 

Clusters are typically managed by a control plane. The control plane is the orchestrator, or master, for the Kubernetes cluster. The control plane manages each node. 

What is a Kubernetes Node?

Kubernetes consists of nodes. Nodes are the individual computers or virtual machines in a Kubernetes cluster. The Kubernetes node can be either a physical computer or an individual VM running in a hypervisor. 

Each Kubernetes cluster will typically have multiple nodes. For example, a single Kubernetes cluster could have five different nodes, or computers, that belong to that cluster. 

What is a Kubernetes Pod?

A Kubernetes pod is a container or packaged application. If you are familiar with Docker, the Pod will be the container. 

Let’s rewind for a quick second. The terms pod and container are typically used interchangeably. Technically, the Kubernetes Pod isn’t a container itself. A container runs inside a pod, but it’s best practice to run one container in each Kubernetes Pod. For all intents and purposes, a Kubernetes pod is a container, and a container is a packaged app similar to a Docker container. 

Containers, or pods, are deployed too and run on top of the Kubernetes Nodes. 

What is a Kubernetes Deployment?

A deployment is used to tell Kubernetes where to fetch a container, what modifications to make to that container, and where to run it. 

Think of a deployment like an automation script. Kubernetes uses that deployment, or automation script, to locate and download a container. Containers come with stock data, though. So, for example, if your container needs to mount a specific data directory or assign a specific IP address to it, the deployment will instruct Kubernetes on how to modify a container to attach that directory to it or assign an IP address to the container. 

What is a Kubernetes Service?

A Kubernetes service exposes Kubernetes pods, or containers, to the public internet. Let’s say that you have a web server running in Kubernetes. That web server needs to be accessible to the outside world. It’s not a good idea to expose the entire Kubernetes cluster to the internet, however. A service assists Kubernetes with exposing only that web server pod to the public internet while keeping the rest of the Kubernetes pods safe and secure. 

Ready to Learn Kubernetes?

Today we learned the basic structure of Kubernetes. As you can see, it’s not much different from a Docker service. The most significant difference between Docker and Kubernetes is that Docker is focused on containerizing applications to a single node while Kubernetes spreads those nodes between clusters. 

Are you ready to learn more about Kubernetes? Because CBT Nuggets has online Kubernetes training courses available right now. If you want to learn Docker, CBT Nuggets also has online Docker training, too.


Download

By submitting this form you agree to receive marketing emails from CBT Nuggets and that you have read, understood and are able to consent to our privacy policy.


Don't miss out!Get great content
delivered to your inbox.

By submitting this form you agree to receive marketing emails from CBT Nuggets and that you have read, understood and are able to consent to our privacy policy.

Recommended Articles

Get CBT Nuggets IT training news and resources

I have read and understood the privacy policy and am able to consent to it.

© 2024 CBT Nuggets. All rights reserved.Terms | Privacy Policy | Accessibility | Sitemap | 2850 Crescent Avenue, Eugene, OR 97408 | 541-284-5522