Course: Cloud Computing Technologies
Authors: Fulvio Risso, Stefano Galantino, Politecnico di Torino
Source: Kubernetes, 87 PDF pages (printed slides 1–98; printed numbers 2, 22, 25, 29, 34, 40, 52–53, 81, and 89–90 are absent).
Lecture numbering: 11 records its position in the course notes. The source was supplied in the study session and remains outside the published resources.
Learning route
The deck builds Kubernetes in three parts. Part I (Fundamentals) introduces Kubernetes’s declarative, state-oriented control loop and uniform object structure, then covers Namespaces, Pods (with sidecars, Linux namespace sharing, init containers, and privileged pods), workload controllers (ReplicaSet, Deployment, DaemonSet, StatefulSet), configuration (ConfigMap/Secret), networking (Service types, Ingress, proxies), and multi-tenancy/autoscaling (NetworkPolicy, ResourceQuota, LimitRange, HPA). Part II (Deep Dive) opens the cluster into Control Plane (kube-apiserver, etcd, kube-scheduler, kube-controller-manager, cloud-controller-manager) and Worker Node (kubelet, kube-proxy, runtime) components, tracing a full Deployment scheduling sequence. Part III (Extensions) explains how Kubernetes stays minimal while supporting CRDs, Operators, APIService, Admission Webhooks, Custom Schedulers, and CRI/CSI/CNI drivers.
Exam priorities
Focus on: imperative vs. declarative control loops (spec vs. status); which Linux namespaces containers share inside a Pod; distinguishing Deployment, DaemonSet, and StatefulSet; comparing ConfigMap and Secret (including why base64 is encoding, not encryption); classifying all five Service types plus Ingress; separating ResourceQuota from LimitRange; tracing the 7-step hub-and-spoke Deployment scheduling flow through kube-apiserver; and contrasting CRDs/Operators, APIService, Mutating/Validating Webhooks, and CRI/CSI/CNI. Local flavors (k3s, kind, k3d), OperatorSDK/Kubebuilder, and introductory video links are supporting context.
Part I: Fundamentals, Pods, Services, and Quotas
Kubernetes decouples APIs from cloud-specific implementations and relies on declarative YAML specifications (apiVersion, kind, metadata, spec, status) reconciled continuously by controllers. Kubernetes Principles Controllers and Resource Model
Within a cluster, Namespace creates logical partitions (with RBAC, though no default pod firewalling), and Pod serves as the scheduling atom running one or more tightly coupled containers on a single node. Multi-container sidecar Pods share net, ipc, and uts namespaces (making localhost work between main and helper containers) while keeping separate mnt root filesystems unless Volumes are mounted. Workload controllers (ReplicaSet, Deployment, DaemonSet, StatefulSet) automate the cattle model, while ConfigMap and Secret inject configuration. Kubernetes Pods Sidecars and Workload Controllers
Because Pods are ephemeral, Service objects provide stable ClusterIPs and DNS names (ClusterIP, NodePort, LoadBalancer, outbound ExternalName, and non-proxied Headless), while Ingress acts as an HTTP/HTTPS reverse proxy multiplexing multiple hosts/paths behind one IP. Multi-tenancy combines RBAC, NetworkPolicy, namespace-wide ResourceQuota, and per-Pod/Container LimitRange, while HPA scales replicas dynamically from metrics. Kubernetes Services Ingress and Reverse Proxy, Kubernetes Multi-Tenancy Quotas and Autoscaling
Part II: Control Plane, Worker Nodes, and Scheduling Flow
A cluster separates the Control Plane (kube-apiserver, Raft-backed etcd, kube-scheduler, kube-controller-manager, and cloud-controller-manager) from Worker Nodes (kubelet, kube-proxy via iptables, and an OCI container runtime), plus kube-system addons such as Cluster DNS. Crucially, components never call each other directly: kubectl, controllers, the scheduler, and kubelet all communicate solely by watching and updating objects on kube-apiserver. Kubernetes Architecture Control Plane and Scheduling Flow
Part III: Extensibility and Driver Interfaces
Rather than bundling every cloud feature into core releases like OpenStack’s “big tent”, Kubernetes keeps its core minimal and delegates extensions to CRDs + Operators (Student, Database), the API Aggregation Layer (APIService for custom verbs such as KubeVirt consoles), API Lifecycle Hooks (external LDAP/OIDC auth, Mutating/Validating Admission Webhooks in the critical path, Finalizers, Audit Webhooks), Custom Schedulers, and standardized CRI (gRPC kubelet → CRI shim → runtime, separating Sandbox from Container), CSI, and CNI interfaces. Kubernetes Extensibility CRDs Operators Webhooks and Drivers
Source map
| PDF pages | Printed slides | Topic |
|---|---|---|
| 1–3 | 1, 3–4 | Title (Risso, Galantino), Borg/Omega origins, pronunciation, intro video |
| 4–10 | 5–11 | Part I: Principles, Imperative vs. Declarative, Control loop, Resource YAML |
| 11–12 | 12–13 | Basic objects schema, Namespace & RBAC / no default firewall |
| 13–19 | 14–20 | Pod, Sidecars, Linux namespaces in a Pod, Init containers, Privileged pods |
| 20–25 | 21, 23–24, 26–28 | Pets vs. Cattle, ReplicaSet, Deployment, DaemonSet, StatefulSet |
| 26–27 | 30–31 | ConfigMap vs. Secret (base64 encoding vs. encryption) |
| 28–37 | 32–33, 35–39, 41–43 | Service, 5 Service types, Headless, Basic networking, Ingress, Proxy vs. Reverse Proxy |
| 38–42 | 44–48 | Multi-tenancy, NetworkPolicy, ResourceQuota, LimitRange, HPA |
| 43–57 | 49–51, 54–65 | Part II: Architecture overview, kubectl/kubeconfig, Control Plane, Worker Nodes, Addons, Scheduling trace |
| 58–63 | 66–71 | Part III: Minimal core vs. OpenStack “big tent”, extensibility overview |
| 64–76 | 72–80, 82–85 | API Engine, CRDs, Operator pattern (examples), APIService / Aggregation Layer |
| 77–79, 84 | 86–88, 95 | API Lifecycle Hooks, Authn/Authz, Mutating/Validating Webhooks, Finalizers, Audit Webhook |
| 80–83 | 91–94 | Custom Scheduler, CRI/CSI/CNI, CRI alternatives (Kata, CRI-O, gVisor) and gRPC architecture |
| 85–87 | 96–98 | Local cluster flavors (kubeadm, k3s, kind, k3d), Online Boutique, Bibliography, Videos |
Retrieval questions
- Why do two containers inside one Pod talk via
localhostwithout a Service, yet still need a shared Volume to read each other’s files?
Containers in a Pod share thenetnamespace (same IP and loopback) but keep separatemntnamespaces (separate root filesystems). - Contrast
ExternalNameandHeadlessServices withClusterIP,NodePort, andLoadBalancer.
ClusterIP,NodePort, andLoadBalancerlayer virtual IPs and proxying from cluster-internal to public access;ExternalNamereturns a DNSCNAMEfor outbound calls to an external hostname with no proxying, whileHeadless(clusterIP: None) skipskube-proxyand returns direct Pod IPs. - What is the difference between
ResourceQuotaandLimitRange?
ResourceQuotacaps aggregate resource totals across an entire Namespace;LimitRangesetsmin,max,defaultlimit, anddefaultRequestfor each individual Pod or Container. - Trace the 7 steps from
kubectl applyon a Deployment until the container runs on a Worker Node.
kubectl→kube-apiserver(Deployment) →Deployment ControllercreatesReplicaSet→ReplicaSet Controllercreates unassignedPod→kube-schedulerwritesBinding→kubeletseesBindingand invokes Container Runtime → status propagates back viakube-apiserver. - When does Kubernetes require an
APIServiceinstead of a CRD + Operator, and what risk do Admission Webhooks introduce?
APIService(Aggregation Layer) is needed for custom API verbs or non-etcdlive backends (e.g., KubeVirt VM consoles); Admission Webhooks sit directly in thekube-apiservercritical path and can slow or block API calls.
Related
- Lecture 10 - Microservices and Containers Orchestration
- Lecture 12 - Cloud Native Applications and the 12-Factor App
- Container Orchestration and Kubernetes
- Kubernetes Principles Controllers and Resource Model
- Kubernetes Pods Sidecars and Workload Controllers
- Kubernetes Services Ingress and Reverse Proxy
- Kubernetes Multi-Tenancy Quotas and Autoscaling
- Kubernetes Architecture Control Plane and Scheduling Flow
- Kubernetes Extensibility CRDs Operators Webhooks and Drivers