K8s Outline

An overview of Kubernetes.

Kubernetes (k8s) is a complex container orchestration system that involves many core concepts and resource objects.

Below is a list of the main Kubernetes concepts, grouped by function:


1. Basic core concepts

ConceptRole
PodThe smallest deployable unit, containing one or more containers (which share the network/storage namespaces).
NodeA worker node (physical or virtual machine); the host that runs Pods.
ClusterA Kubernetes cluster made up of multiple Nodes.
NamespaceA logical unit of resource isolation (e.g. dev/prod), used for multi-tenancy or environment isolation.

2. Workloads

ConceptRole
DeploymentManages Pod replicas for stateless applications, with support for rolling updates and rollbacks.
StatefulSetManages stateful applications (e.g. databases), providing stable network identities and persistent storage.
DaemonSetEnsures that one instance of a given Pod runs on every Node (e.g. a log collector).
ReplicaSetEnsures that a specified number of Pod replicas are running (usually managed automatically by a Deployment).
JobRuns a one-off task; the Pod exits once the task completes.
CronJobA Job that runs on a schedule (similar to Linux Cron).

3. Networking and access

ConceptRole
ServiceProvides Pods with a stable IP/DNS and load balancing; its types include:
- ClusterIP (access from within the cluster)
- NodePort (exposed through a port on the node)
- LoadBalancer (a cloud provider’s load balancer)
IngressExposes services via HTTP/HTTPS routing rules (must be used together with an Ingress Controller).
Ingress ControllerThe component that implements Ingress rules (e.g. Nginx, Traefik).
EndpointRecords the list of IPs and ports of the Pods backing a Service (maintained automatically).
NetworkPolicyDefines network access rules between Pods (like a firewall).

4. Storage management

ConceptRole
VolumeA storage volume mounted in a Pod (its lifecycle is tied to the Pod).
PersistentVolume (PV)A cluster-level persistent storage resource (e.g. a cloud disk/NFS).
PersistentVolumeClaim (PVC)A user’s request for a PV (like a “storage interface”).
StorageClassDefines the storage types for dynamically provisioning PVs (e.g. standard/ssd).

5. Configuration and security

ConceptRole
ConfigMapStores non-sensitive configuration data (e.g. environment variables, config files).
SecretStores sensitive data (e.g. passwords, keys), Base64-encoded.
ServiceAccountAssigns an identity to a Pod for access control (used together with RBAC).
RBACRole-based access control (Role/ClusterRole + RoleBinding).
ResourceQuotaLimits the resource usage of a Namespace (e.g. CPU/memory/number of Pods).
LimitRangeLimits the resource range of an individual Pod/container within a Namespace.

6. Extension and operations

ConceptRole
CustomResourceDefinition (CRD)Custom resource types that extend the Kubernetes API.
OperatorAn automated operations framework built on CRDs (e.g. for managing databases or middleware).
HorizontalPodAutoscaler (HPA)Automatically scales the number of Pods based on metrics such as CPU/memory.
VerticalPodAutoscaler (VPA)Automatically adjusts a Pod’s resource requests (CPU/memory).
HelmThe Kubernetes package manager; applications are defined and deployed via Charts.

7. Monitoring and scheduling

ConceptRole
KubeletThe agent running on each Node, responsible for managing the Pod lifecycle.
kube-schedulerThe scheduler, which decides which Node a Pod runs on (based on resources, affinity, etc.).
kube-proxyMaintains the network rules on a node (e.g. load balancing for Services).
Metrics ServerCollects cluster resource metrics (used by HPA/Dashboard).
PrometheusA third-party monitoring system, commonly used for collecting Kubernetes metrics and alerting.
GrafanaVisualizes monitoring data (usually paired with Prometheus).

8. Other important concepts

ConceptRole
LabelKey-value labels used to classify and select resources (e.g. app=frontend).
SelectorFilters resources by Label (e.g. a Service selecting Pods).
AnnotationNon-identifying metadata (e.g. build info, configuration notes).
Taint/TolerationControls whether a Pod can be scheduled onto a specific Node (e.g. dedicated nodes).
Affinity/Anti-AffinityDefines Pod scheduling preferences (e.g. “prefer running in the same availability zone”).


Translated from the Chinese original.

Welcome to my other publishing channels

中文