Introduction to Kubernetes

1/12/2025

Introduction to Kubernetes

Kubernetes (K8s) is an open-source container orchestration platform for automating deployment, scaling, and management.

What is Kubernetes?

Kubernetes automates the deployment, scaling, and operations of application containers across clusters of hosts.

Key Concepts

  • Pod: Smallest deployable unit (one or more containers)
  • Node: A worker machine in the cluster
  • Cluster: A set of nodes managed by Kubernetes
  • Service: An abstraction to expose pods
  • Deployment: Manages pods and replicas

Installation

bash
# Install kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"

# For local development, use minikube
minikube start

Basic Commands

bash
# Get cluster info
kubectl cluster-info

# List nodes
kubectl get nodes

# List pods
kubectl get pods

# List services
kubectl get services

# List all resources
kubectl get all