DevOps Peach

Docker & Kubernetes · Module 08

Kubernetes – API Objects, Namespaces and Pods

Read and write manifests, split a cluster with namespaces, create and debug pods, select objects with labels, set requests/limits and use init containers.

Practice interactively →

What you will learn

Lessons

  1. The Kubernetes API and object model

    Everything in Kubernetes is an API object; a manifest declares desired state with apiVersion, kind, metadata and spec.

  2. Namespaces

    Namespaces split one cluster into logical areas to separate environments, set quotas and assign permissions.

  3. Pods — spec, probes and debugging

    A pod is the smallest unit; declare containers and probes, then debug with describe, logs, exec and port-forward.

  4. Labels and selectors

    Labels are key=value pairs that group objects; selectors use labels to pick objects, from kubectl to Services and Deployments.

  5. Resource requests/limits and init containers

    A request is the guaranteed share used for scheduling; a limit is the ceiling; init containers finish before the main containers start.