TechyPilots Info
TechyPilots.INFO
Home/Tutorials/Kubernetes/Kubernetes for Beginners
Kubernetes Tutorial

Kubernetes for Beginners

Learn Kubernetes step by step and understand how modern containerized applications are deployed, managed, scaled, and operated across a Kubernetes cluster.

Level: Beginner
Topics: 6 Core Areas

Kubernetes Learning Path

Core Kubernetes Skills

Kubernetes Architecture

Nodes & Clusters

Pods

Deployments

Services

Namespaces & kubectl

Introduction

What is Kubernetes?

Kubernetes is a container orchestration platform used to deploy, manage, scale, and operate containerized applications across a group of machines called a cluster.

Instead of manually managing individual containers, Kubernetes uses resources and controllers to maintain the desired state of your applications.

Kubernetes workloads run inside Pods, while higher-level resources such as Deployments help manage replicas, updates, and application availability.

Core Concepts

Kubernetes fundamentals

Start with the core building blocks that help Kubernetes manage containerized applications.

01

Kubernetes Architecture

Understand how a Kubernetes cluster is organized, including the control plane and worker nodes.

Key Topics

  • Kubernetes cluster
  • Control plane
  • Worker nodes
  • Cluster management
02

Nodes

Learn how Kubernetes nodes provide the compute resources used to run containerized workloads.

Key Topics

  • Worker nodes
  • Kubelet
  • Container runtime
  • Cluster resources
03

Pods

Understand Pods, the smallest deployable units in Kubernetes, and how they run one or more containers.

Key Topics

  • Pod lifecycle
  • Containers
  • Pod networking
  • Pod storage
04

Deployments

Learn how Deployments manage application workloads and help maintain the desired number of running Pods.

Key Topics

  • Replica management
  • Scaling
  • Rolling updates
  • Desired state
05

Services

Learn how Kubernetes Services provide stable network access to applications running across changing Pods.

Key Topics

  • ClusterIP
  • NodePort
  • LoadBalancer
  • Service discovery
06

Namespaces

Understand how Namespaces provide scopes for organizing and isolating Kubernetes resources within a cluster.

Key Topics

  • Resource organization
  • Environment separation
  • Resource isolation
  • Access control

Architecture

Understanding a Kubernetes cluster

A Kubernetes environment is organized as a cluster containing a control plane and one or more worker nodes.

The control plane manages the overall state of the cluster, while worker nodes provide the resources required to run application workloads.

Kubernetes Cluster

┌───────────────────────────────┐
│         CONTROL PLANE         │
│                               │
│  API Server                   │
│  Scheduler                    │
│  Controllers                  │
│                               │
└───────────────┬───────────────┘
                │
        ┌───────┴────────┐
        │                │
        ▼                ▼
┌──────────────┐  ┌──────────────┐
│ Worker Node  │  │ Worker Node  │
│              │  │              │
│   Pods       │  │   Pods       │
└──────────────┘  └──────────────┘

Kubernetes Resources

Important Kubernetes objects

Kubernetes uses API objects to describe applications, infrastructure resources, and the desired state of the cluster.

Pod

A Pod represents one or more containers running together with shared networking and storage resources.

kubectl get pods

Deployment

A Deployment manages application Pods and helps maintain the desired state of a workload.

kubectl get deployments

Service

A Service provides a stable way to access a group of Pods inside or outside a Kubernetes cluster.

kubectl get services

Namespace

A Namespace provides a scope for organizing resources and separating workloads within a Kubernetes cluster.

kubectl get namespaces

Pods

The smallest deployable unit

A Pod is the smallest deployable unit that Kubernetes creates and manages. A Pod can contain one or more containers that share networking and storage resources.

In many applications, Pods are managed through higher-level workload resources rather than being created individually.

Simple Pod Example

apiVersion: v1
kind: Pod

metadata:
  name: nginx-pod

spec:
  containers:
    - name: nginx
      image: nginx

Deployments

Manage application workloads

Deployments are commonly used to manage stateless application workloads and maintain the desired number of running Pods.

Kubernetes controllers continuously work to move the actual state of the application toward the desired state defined in the Deployment configuration.

Deployment Example

apiVersion: apps/v1
kind: Deployment

metadata:
  name: nginx-deployment

spec:
  replicas: 3

  selector:
    matchLabels:
      app: nginx

  template:
    metadata:
      labels:
        app: nginx

    spec:
      containers:
        - name: nginx
          image: nginx

Services

Connect applications together

Kubernetes Services provide a stable network endpoint for accessing a group of Pods.

Because Pods can be created, removed, and replaced, Services help provide a consistent way for applications to communicate without depending on individual Pod addresses.

Service Example

apiVersion: v1
kind: Service

metadata:
  name: nginx-service

spec:
  selector:
    app: nginx

  ports:
    - port: 80
      targetPort: 80

  type: ClusterIP

kubectl

Essential Kubernetes commands

kubectl is the command-line tool commonly used to interact with Kubernetes clusters and manage Kubernetes resources.

kubectl get pods

Display Pods in the current namespace.

kubectl get nodes

Display nodes in the Kubernetes cluster.

kubectl get deployments

Display Deployments in the current namespace.

kubectl get services

Display Services in the current namespace.

kubectl apply -f app.yaml

Create or update Kubernetes resources from a YAML manifest.

kubectl describe pod pod-name

Display detailed information about a Pod.

YAML Manifests

Define Kubernetes resources as code

Kubernetes resources are commonly described using YAML manifest files. These files define the desired configuration of objects such as Pods, Deployments, Services, and ConfigMaps.

The configuration can then be applied to a Kubernetes cluster using kubectl.

# Apply a Kubernetes manifest

kubectl apply -f app.yaml

# View Pods

kubectl get pods

# View Deployments

kubectl get deployments

# View Services

kubectl get services

Learning Roadmap

How to learn Kubernetes

Follow this practical learning path to build a strong Kubernetes foundation.

Step 1

Understand Containers

Learn Docker and container fundamentals before moving into Kubernetes orchestration.

Step 2

Learn Kubernetes Architecture

Understand clusters, control plane components, worker nodes, and how Kubernetes manages workloads.

Step 3

Work with Pods

Learn how Pods run containers and how Kubernetes schedules workloads across nodes.

Step 4

Use Deployments

Practice creating Deployments, scaling applications, and updating workloads.

Step 5

Understand Services

Learn how applications communicate using Kubernetes Services and service discovery.

Step 6

Practice with kubectl

Use kubectl commands and YAML manifests to create, inspect, update, and manage Kubernetes resources.

Best Practices

Kubernetes beginner best practices

Use Deployments for Applications

Use workload resources such as Deployments to manage application Pods instead of manually managing individual Pods.

Use Namespaces for Organization

Organize workloads using appropriate Namespaces when multiple projects, teams, or environments share a cluster.

Use Labels Consistently

Use meaningful labels to organize, select, and manage related Kubernetes resources.

Define Resources with YAML

Store Kubernetes resource definitions as code so application infrastructure can be versioned and managed consistently.

Inspect Resources with kubectl

Regularly inspect Pods, Deployments, Services, events, and logs when learning or troubleshooting Kubernetes.

Learn Incrementally

Start with Pods, Deployments, and Services before moving into advanced topics such as storage, ingress, security, and autoscaling.

Next Step

Start building with Kubernetes

Practice creating Pods, Deployments, and Services, then gradually move into networking, storage, security, monitoring, and advanced Kubernetes operations.