Introduction to Kubernetes (k8s)

Introduction to Kubernetes (k8s)

Sai Sanjay
GSoC 2025 , Open Science Labs
Chapter Lead , Null Vijayawada
Prev Vice President Null Chapter
Cloud Native Enthusiast
Chapter Lead , Null Vijayawada
Kubernetes Unboxed
Introduction to Kubernetes (k8s)

Agenda

  • Whats the difference between Cloud and Cloud Native ?
  • Whats the difference between Virtual Machines and Containers ?
  • Whats the difference between Docker and Kubernetes ?
  • Why do we need Kubernetes ?
  • What is a container ?
  • What is a Pod ?
  • What is a Node ?
  • What is a Cluster ?
Kubernetes Unboxed
Introduction to Kubernetes (k8s)

Agenda (contd..)

  • What is a Namespace ?
  • What is a Deployment ?
  • What is a Service ?
  • What is a ConfigMap ?
  • What is a Secret ?
  • What is a Volume ?
  • What is a Persistent Volume (PV) ?
  • What is a Persistent Volume Claim (PVC) ?
  • What is a StatefulSet ?
  • And many more...
Kubernetes Unboxed
Introduction to Kubernetes (k8s)

These are know as k8s Objects

center alt text

Kubernetes Unboxed
Introduction to Kubernetes (k8s)

Are you getting overwhelmed ?

center
Kubernetes Unboxed
Introduction to Kubernetes (k8s)

Don't worry , I got you covered

center
Kubernetes Unboxed
Introduction to Kubernetes (k8s)

Prerequisites

  • Basic understanding of Linux commands
  • Basic understanding of Docker
  • Basic understanding of YAML
  • Basic understanding of Networking
  • Basic understanding of Virtualization
  • Basic understanding of Cloud Computing
Kubernetes Unboxed
Introduction to Kubernetes (k8s)

Production k8s Clusters

  • Google Kubernetes Engine (GKE)
  • Amazon Elastic Kubernetes Service (EKS)
  • Azure Kubernetes Service (AKS)
  • DigitalOcean Kubernetes
  • K3s (Lightweight k8s for IoT and Edge devices)
  • OpenShift (RedHat's k8s distribution)
  • Rancher (k8s management platform)
  • VMware Tanzu (Enterprise k8s platform)
  • IBM Cloud Kubernetes Service
Kubernetes Unboxed
Introduction to Kubernetes (k8s)

Local k8s Clusters

  • Minikube
  • MicroK8s
  • kind (Kubernetes IN Docker)
  • k3d (k3s in Docker)
  • Docker Desktop (comes with k8s support)
  • Podman (comes with k8s support)

Note: Podman is a daemonless container engine for developing, managing, and running OCI Containers on your Linux System. It is a popular alternative to Docker.

Kubernetes Unboxed
Introduction to Kubernetes (k8s)

For now we will be using kind (Kubernetes IN Docker) to set up a local k8s cluster

  • kind runs k8s clusters in Docker containers
  • kind is primarily designed for testing k8s itself, but may be used for local development and CI
  • kind is a great tool for learning and experimenting with k8s
  • kind is easy to set up and use
  • kind is open source and free to use
  • kind is maintained by the k8s community
Kubernetes Unboxed
Introduction to Kubernetes (k8s)

Setup k8s in podman desktop

alt text

Getting Started

  • Install Docker Desktop (Windows/Mac) or Docker Engine (Linux)
  • Install kubectl (Kubernetes command line tool)
# For Windows
winget install -e --id Kubernetes.kubectl 
winget install -e --id ahmetb.kubectx
winget install -e --id Helm.Helm
# For Mac & Linux
brew install kubectl kubectx helm 
  • Install kind (Kubernetes IN Docker) : link
Kubernetes Unboxed
Introduction to Kubernetes (k8s)

Setting up a local Kubernetes Cluster using kind

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4

nodes:
- role: control-plane
  image: kindest/node:v1.32.2
- role: worker
  image: kindest/node:v1.32.2
- role: worker
  image: kindest/node:v1.32.2
  extraPortMappings:
  - containerPort : 80 
    hostPort : 80
    protocol : TCP 
  - containerPort : 443
#- role: worker
#  image: kindest/node:v1.31.2
networking:
  apiServerAddress: ""   # Bind to all interfaces (including the public IP)
  apiServerPort: 45803           # External port for API server
  
Kubernetes Unboxed
Introduction to Kubernetes (k8s)

A very long title of my beamer-esque presentation


Author's name
University of XYZ
2022-26-03
(Only normal text is centered now)

Kubernetes Unboxed
Introduction to Kubernetes (k8s)

A normal slide

H1 again

H2

H3

  • bullet

quote

code

text

Kubernetes Unboxed
Introduction to Kubernetes (k8s)

Title page ad hoc fix

  • If the title of your presentation is too long and the border intersects with the text underneath, use the following
# Title
<br/>
<!-- empty line here --->
Author's name
University of XYZ
...
  • make sure to leave an empty line below the <br/> tag
Kubernetes Unboxed
Introduction to Kubernetes (k8s)

Tinytext class

  • use <!-- _class: tinytext --> to make some text tiny
  • might be useful for References
Kubernetes Unboxed