- Home
-
Kubernetes Components
Kubernetes Components Cheatsheet
Comprehensive reference for Kubernetes components covering Control Plane (API Server, etcd, Scheduler, Controllers), Worker Nodes (Kubelet, Kube-Proxy, Pods), Kubernetes Extensions, and kubectl command reference.
Free account required
What is Kubernetes?
Kubernetes (K8s) is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications. It groups containers into logical units for easy management and discovery. When choosing a VPS provider for Kubernetes, consider performance benchmarks to ensure optimal cluster performance.
Table of Contents
Kubernetes Architecture
Kubernetes follows a master-worker architecture with three main layers: Kubernetes Extensions at the top, Control Plane in the middle, and Worker Nodes at the bottom. This layered architecture enables efficient container orchestration at scale. For production deployments, you can compare different VPS providers to find the best infrastructure for your Kubernetes clusters.
Architecture Layers
Control Plane Components
The Control Plane makes global decisions about the cluster (scheduling, detecting and responding to cluster events). Control Plane components can run on any machine in the cluster, but typically run on dedicated master nodes.
Kube-API Server
Central management interface for the entire cluster
The API server is the front end for the Kubernetes control plane. It exposes the Kubernetes API and is the primary interface for cluster management. All operations go through the API server.
- • Processes and validates REST requests
- • Updates corresponding objects in etcd
- • Acts as gateway for cluster operations
- • Handles authentication and authorization
etcd
Distributed key-value store for all cluster data
Consistent and highly-available key-value store used as Kubernetes' backing store for all cluster data. Stores configuration data, state, and metadata.
- • Stores cluster state and configuration
- • Provides distributed consensus (Raft algorithm)
- • Ensures data consistency across cluster
- • Supports snapshot and restore capabilities
Kube-Scheduler
Assigns newly created pods to nodes
Watches for newly created pods with no assigned node and selects a node for them to run on. Scheduling decisions consider resource requirements, constraints, affinity/anti-affinity, data locality, and workload interference.
- • Resource requirements (CPU, memory)
- • Node selectors and affinity rules
- • Taints and tolerations
- • Pod priority and QoS classes
Kube-Controller-Manager
Runs controller processes
Runs controller processes that watch the shared state of the cluster through the API server and make changes to move the current state towards the desired state.
Cloud-Controller-Manager
Links cluster to cloud provider's API
Embeds cloud-specific control logic. Lets you link your cluster into your cloud provider's API and separates components that interact with the cloud platform from components that only interact with your cluster.
- • Node Controller: Checks cloud provider for node status
- • Route Controller: Sets up routes in cloud infrastructure
- • Service Controller: Creates/deletes cloud load balancers
Worker Node Components
Worker Nodes maintain running pods and provide the Kubernetes runtime environment. Each node runs the necessary services to run pods and is managed by the Control Plane.
Pods
Smallest deployable units in Kubernetes
A Pod represents a set of running containers on your cluster. Pods are the basic execution unit of a Kubernetes application and can contain one or more containers that share storage and network resources.
- • Single IP address shared by all containers
- • Shared storage volumes
- • Shared network namespace
- • Ephemeral by design (can be replaced)
Container Runtime
Software responsible for running containers
The container runtime is responsible for pulling container images, unpacking the container, and running the application. Kubernetes supports several container runtimes through the Container Runtime Interface (CRI).
Kubelet
Primary node agent running on each node
Kubelet is the primary "node agent" that runs on each node. It works in terms of a PodSpec (a YAML or JSON object that describes a pod) and ensures containers described in PodSpecs are running and healthy.
- • Registers node with API server
- • Monitors pod specifications from API server
- • Ensures containers are running and healthy
- • Reports node and pod status back to API server
- • Mounts volumes and manages secrets
Kube-Proxy
Network proxy running on each node
Kube-proxy is a network proxy that runs on each node. It maintains network rules on nodes that allow network communication to Pods from network sessions inside or outside the cluster.
- • Implements Kubernetes Service concept
- • Maintains network rules (iptables/IPVS)
- • Performs connection forwarding
- • Enables Service IP-based load balancing
Kubernetes Extensions
Kubernetes can be extended with additional components that enhance its functionality, providing better observability, management, and user experience.
Web Admin UI (Dashboard)
Web-based management interface
General-purpose web UI for Kubernetes clusters that allows users to manage applications running in the cluster and troubleshoot them, as well as manage the cluster itself.
DNS (CoreDNS)
Cluster DNS server
Provides service discovery within the cluster. Kubernetes DNS schedules a DNS Pod and Service on the cluster and configures kubelets to use the DNS Service's IP to resolve DNS names.
CLI (kubectl)
Command-line interface
Command-line tool for communicating with the Kubernetes API server. kubectl is used for deploying applications, inspecting and managing cluster resources, and viewing logs.
Container Resource Monitoring
Metrics and monitoring
Provides monitoring capabilities for cluster resources. Tools like Metrics Server, Prometheus, and Grafana collect and visualize container metrics, performance data, and cluster health.
Essential kubectl Commands
kubectl is the primary CLI tool for interacting with Kubernetes clusters. Here are the most commonly used commands for managing your Kubernetes resources.
Cluster Information
Display cluster information
$ kubectl cluster-info
Get cluster nodes
$ kubectl get nodes
Get kubectl version
$ kubectl version
Pod Management
List all pods in current namespace
$ kubectl get pods
List all pods in all namespaces
$ kubectl get pods --all-namespaces
Get detailed information about a pod
$ kubectl describe pod <pod-name>
Delete a pod
$ kubectl delete pod <pod-name>
Get pod logs
$ kubectl logs <pod-name>
Execute command in a pod
$ kubectl exec -it <pod-name> -- /bin/bash
Deployment Management
List deployments
$ kubectl get deployments
Create deployment
$ kubectl create deployment <name> --image=<image>
Scale deployment
$ kubectl scale deployment <name> --replicas=3
Update deployment image
$ kubectl set image deployment/<name> <container>=<new-image>
Rollback deployment
$ kubectl rollout undo deployment/<name>
Check rollout status
$ kubectl rollout status deployment/<name>
Service Management
List services
$ kubectl get services
Expose deployment as service
$ kubectl expose deployment <name> --port=80 --type=LoadBalancer
Delete service
$ kubectl delete service <service-name>
Configuration & Resources
Apply configuration from file
$ kubectl apply -f <file.yaml>
Delete resources from file
$ kubectl delete -f <file.yaml>
Get all resources
$ kubectl get all
View resource YAML
$ kubectl get <resource> <name> -o yaml
Namespace Management
List namespaces
$ kubectl get namespaces
Create namespace
$ kubectl create namespace <name>
Set default namespace
$ kubectl config set-context --current --namespace=<name>
Kubernetes Resource Types
Kubernetes uses various resource types to manage applications and infrastructure. Understanding these resources is essential for effective cluster management.
Deployment
Manages replicated applications and provides declarative updates for Pods and ReplicaSets.
Service
Exposes applications running on a set of Pods as a network service.
ConfigMap
Stores non-confidential configuration data in key-value pairs.
Secret
Stores sensitive information like passwords, OAuth tokens, and SSH keys.
Ingress
Manages external access to services, typically HTTP/HTTPS routing.
PersistentVolume
Storage resource in the cluster that persists beyond pod lifecycle.
Namespace
Provides logical isolation for resources within a cluster.
StatefulSet
Manages stateful applications with stable network identities and persistent storage.
DaemonSet
Ensures all (or some) nodes run a copy of a Pod.
Job
Creates one or more Pods and ensures that a specified number complete successfully.
CronJob
Creates Jobs on a repeating schedule.
HorizontalPodAutoscaler
Automatically scales the number of Pods based on observed CPU utilization or custom metrics.
Related Cheatsheets
Expand your knowledge with these related cheatsheets that complement your Kubernetes expertise.
Deploy Kubernetes on High-Performance VPS
Looking for the best VPS to run your Kubernetes clusters? Check out our comprehensive benchmarks to find the perfect hosting provider for your container workloads.