liveBook · Manning

Operating system kernel

As explained in Kubernetes in Action, Second Edition

A kernel is the privileged core of an operating system that manages hardware resources and executes system-level operations.

An operating system kernel is the privileged core that executes system-level operations and manages access to hardware. Containers share the host operating system’s single kernel: their system calls reach that kernel, which executes instructions on the host CPU. Kernel-provided isolation keeps applications separated even though they use the same kernel. section 2.1.1

The kernel creates an important distinction between containers and virtual machines:

  • A virtual machine runs its own operating system and kernel; a hypervisor forwards the guest kernel’s instructions to the physical CPU. section 2.1.1
  • Containers avoid a separate guest kernel and CPU virtualization, reducing runtime overhead and allowing applications to start without booting additional system processes. section 2.1.1
  • A container image does not include the Linux kernel, so required kernel versions or modules must exist on the host. section 2.1.2

Why a container may fail on another host

A container that requires a particular kernel module can run on a computer where that module is loaded and break on another computer where it is missing. CPU architecture also matters: an application compiled for x86 cannot run on an ARM computer merely because Docker is installed. section 2.1.2

Figure 2.3 The difference between running applications on bare metal, in VMs, and in containers
figure

Compare three applications running directly on bare metal, inside virtual machines, and inside containers to see how kernel sharing and isolation differ. section 2.1.1

How Kubernetes in Action, Second Edition covers it

How deep it goes
Explains system calls, CPU execution, isolation, kernel modules, and architecture compatibility without descending into kernel implementation internals.
Examples
Uses three-application comparisons, missing kernel modules, and x86-versus-ARM deployment scenarios.
What you can do after
Evaluate container portability by checking host kernel features, loaded modules, and hardware architecture.
How it connects
Connects containers with virtual machines, hypervisors, system calls, Docker, container images, kernel modules, and CPU architecture.

Also explained in

Compare how 2 books explain operating system kernel →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes in Action, Second Edition. The section links point to the parts of the book it draws on.