Containers & Kubernetes
Packaging applications with everything they need and running them anywhere: container images, Dockerfiles, volumes, networks and Compose, how to secure and debug containers, and how Kubernetes runs them at scale, from pods and services to troubleshooting a cluster and deploying with Helm and GitOps.
19 pages 110 glossary terms KCNA CKAD Linux+
How to use this topic
This topic goes deeper than the overview pages on containers and Kubernetes in the Cloud topic. The first ten pages are about containers on a single machine: what they are, images, running containers, Dockerfiles, good images, storage, networking, Compose, security and debugging. The last nine are about Kubernetes: how a cluster works, the main objects, configuration, storage, health and scaling, security, troubleshooting, and deploying applications as code.
The Docker command output on these pages was recorded on a real Docker installation. A local Kubernetes test cluster could not start on that machine, so Kubernetes output that needs a running cluster is marked illustrative. Manifest and Compose files are checked for valid YAML, and the calculations are short programs with their exact output.
Pages are tagged with the certifications they help with: KCNA (Kubernetes and Cloud Native Associate) and CKAD (Certified Kubernetes Application Developer), both from the Cloud Native Computing Foundation and the Linux Foundation, on the Kubernetes pages and the pages about images, and CompTIA Linux+ on the Docker pages, which match its objective on running containers on a Linux server.
Learning path
- 01What Are Containers?What a container is and how it differs from a virtual machine: images and containers, Linux namespaces and cgroups, the OCI standards, and the tools around them such as Docker, Podman and containerd.
- 02Images, Layers and RegistriesWhat a container image is made of: layers, tags and digests, multi-architecture images, and pulling and pushing images to public and private registries.
- 03Running ContainersStarting and managing containers: docker run and its most important options, publishing ports, environment variables, the container lifecycle, restart policies and resource limits.
- 04Writing DockerfilesDescribing an image in a Dockerfile: FROM, RUN, COPY, WORKDIR, ENV, EXPOSE, the difference between CMD and ENTRYPOINT, and building with docker build.
- 05Building Good ImagesMaking images small, fast to build and safe to run: layer caching, .dockerignore, multi-stage builds, minimal base images, pinning versions and running as a non-root user.
- 06Volumes and Bind MountsKeeping data beyond the life of a container: named volumes, bind mounts and tmpfs, permissions, backing up volume data, and why containers themselves should stay disposable.
- 07Container NetworkingHow containers talk to each other and the outside world: bridge, host and none networks, user-defined networks with built-in DNS, publishing ports and common connection problems.
- 08Docker ComposeDescribing a multi-container application in a compose.yaml file: services, networks, volumes, environment and secrets, dependencies and health checks, and the docker compose commands.
- 09Container SecurityRunning containers safely: rootless containers and user namespaces, dropping capabilities, read-only file systems, image scanning and signing, secrets, and keeping images patched.
- 10Debugging ContainersFinding out what is wrong with a container: logs, exec and inspect, exit codes and OOMKilled, health checks, and debugging minimal images that have no shell.
- 11How a Kubernetes Cluster WorksWhat Kubernetes does and how a cluster is built: the control plane and its API server, etcd and scheduler, worker nodes with the kubelet, and the desired state that controllers keep in place.
- 12Pods, Deployments and ReplicaSetsThe basic Kubernetes workloads: pods and their containers, ReplicaSets that keep copies running, Deployments with rolling updates and rollbacks, and labels and selectors that tie them together.
- 13Services, Ingress and the Gateway APIGiving pods a stable address: Service types ClusterIP, NodePort and LoadBalancer, cluster DNS, and routing HTTP traffic into the cluster with Ingress and the Gateway API.
- 14ConfigMaps, Secrets and ConfigurationKeeping configuration out of images: ConfigMaps, Secrets and how weakly they are protected by default, environment variables and mounted files, and external secret managers.
- 15Storage in KubernetesPersistent data in a cluster: volumes in pods, PersistentVolumes and PersistentVolumeClaims, StorageClasses and dynamic provisioning, access modes, and StatefulSets for databases.
- 16Health, Resources and ScalingKeeping workloads healthy and right-sized: liveness, readiness and startup probes, CPU and memory requests and limits, quality of service, and horizontal pod autoscaling.
- 17Namespaces, RBAC and Kubernetes SecurityDividing and protecting a cluster: namespaces, role-based access control with Roles and RoleBindings, service accounts, Pod Security Standards and network policies.
- 18kubectl and TroubleshootingWorking with kubectl and finding faults: get, describe, logs and events, and the common failures CrashLoopBackOff, ImagePullBackOff, Pending and OOMKilled, with a step-by-step approach.
- 19Helm, Kustomize and GitOpsManaging Kubernetes applications as code: Helm charts and releases, Kustomize overlays for environments, and GitOps with Argo CD and Flux keeping the cluster in line with Git.
Containers & Kubernetes glossary
Short definitions of the terms used in this topic. The full glossary covers every topic.