SSourabh ShrivastavPlatform Fieldnotes Knowledge check
← Field Notes
VKS Learning LoopModule 02 · Reviewed draft

Kubernetes Foundations Through a Shopping Mall Mental Model

A beginner-friendly way to connect Kubernetes architecture, control plane, worker nodes, namespaces, Pods, Deployments, Services, storage, networking, and resource limits into one memorable story.

Simplified smart shopping mall mental model showing Kubernetes control plane, worker nodes, Namespaces, Pods and Services.
A simplified visual overview of the core Kubernetes building blocks used throughout this article.

01 · Why this mental model

There are many Kubernetes tutorials. This one is about memory.

There are already many excellent articles, videos and training materials on Kubernetes. This article is not trying to say something completely new. Instead, it explains Kubernetes in a way that is easier to remember.

When I learn something complex, I like to create a mental map. A mental map helps me connect concepts together instead of memorizing them as separate definitions. Kubernetes has many terms: control plane, worker node, Namespace, Pod, Deployment, Service, Ingress, StorageClass, PVC, PV, NetworkPolicy, requests and limits.

Each term is manageable by itself. The challenge is connecting them. So for this article, let us use one simple mental model: Kubernetes is like a smart shopping mall.

The shopping mall mental model connects those objects into one operating story. The cluster is the mall ecosystem. The control plane is the management office. Worker nodes are floors or wings. Namespaces are logical brand, team or application scopes. Pods are individual store instances. Containers are packaged application processes running inside those Pods.

Detailed shopping mall mental model mapping the Kubernetes control plane, worker nodes, Namespaces, Pods, containers, Services, Ingress or Gateway, storage and NetworkPolicy.
Important boundary

A Kubernetes Namespace does not inherently prove business ownership or provide strong tenant isolation. Organisations commonly align Namespaces with teams, applications, environments or tenants, then apply RBAC, quotas, NetworkPolicy and security controls around them.

Kubernetes conceptMall memory hookTechnically precise interpretation
ClusterEntire mall ecosystemThe control plane and worker nodes that together run and manage workloads.
Control planeManagement officeAccepts desired state, stores API data, schedules Pods and runs reconciliation loops.
Worker nodeFloor or wingThe compute location where Pods actually run.
NamespaceBrand, team or application scopeA logical scope for grouping and naming namespaced resources.
PodIndividual store instanceThe smallest deployable unit; it contains one or more tightly coupled containers.
ContainerPackaged application process inside the storeAn isolated runtime for application code and its dependencies inside a Pod.

02 · Kubernetes architecture

The cluster is the mall ecosystem. The control plane operates it.

A Kubernetes cluster consists of a control plane and worker nodes. Users and automation submit desired state through the Kubernetes API. The control plane records that state, selects suitable nodes for unscheduled Pods and runs controllers that continuously reconcile actual state toward desired state.

  • API server = management reception desk: all Kubernetes API requests and administrative instructions enter through it. Application traffic does not.
  • etcd = official records: the consistent key-value store used for Kubernetes API data.
  • Scheduler = space-allocation team: assigns unscheduled Pods to suitable worker nodes.
  • Controller manager = operations supervisors: runs control loops that reconcile observed and desired state.

The control plane does not invent business intent. The desired number of replicas, Pod template and policy are declared by users or higher-level automation; Kubernetes works to realise that declaration.

03 · Worker node vs Namespace

Worker node is where it runs. Namespace is the logical scope in which it is organised.

Diagram explaining that worker nodes are runtime locations while Namespaces are logical scopes that can span multiple nodes.
A Namespace can span multiple worker nodes, and a worker node can host Pods from multiple Namespaces.

Suppose a company has Payments, Risk and Reporting teams. Their resources may be grouped into separate Namespaces. The Pods from each Namespace can run on many nodes, and a single node can host Pods from several Namespaces.

Memory hook: worker node equals runtime location; Namespace equals logical resource scope. Ownership, access and isolation come from the way the platform applies RBAC, quotas, policies and security controls.

04 · Deployments, ReplicaSets, Pods and containers

The operating plan creates and maintains the stores where the application runs.

In the mall, the business team does not manually create and watch every store instance. It defines an operating plan: how many stores should be open, what setup each store should use, and how changes should be introduced. In Kubernetes, that operating plan is the Deployment.

A Deployment declares the desired state and rollout strategy for a set of application Pods.

The Deployment manages ReplicaSets. A ReplicaSet is like the mall operations team that continuously works to maintain the requested number of store instances.

If a Deployment specifies replicas: 3, the desired state is three Pod replicas. That does not guarantee that exactly three are ready at every instant: startup, failure and rolling-update conditions can temporarily produce different desired, current, ready and available counts.

A Pod is the smallest deployable unit that Kubernetes can create and manage. In the mall analogy, each Pod is an individual store instance. Most application Pods contain one main container, but a Pod can contain multiple tightly coupled containers that share networking and storage context.

A container is the packaged application process running inside the Pod, together with its runtime dependencies.

Read the workload story
  1. Deployment = store operating plan.
  2. ReplicaSet = mall operations team maintaining the required store count.
  3. Pod = individual store instance.
  4. Container = packaged application process running inside the store.

05 · Services, Ingress and Gateway

Use a stable directory entry, not a temporary Pod address.

Pods can be replaced and their IP addresses can change. A Service provides a stable network identity for a logical set of backends, commonly selected Pods.

Mall analogy showing application traffic flowing from a visitor through a load balancer and routing system to a Service directory, Pod store and containerised application.
The load balancer receives the request, routing rules select the Service, and the Service directs traffic to an available Pod.

A request typically reaches a load balancer, then an Ingress controller or Gateway implementation. Routing configuration selects a Service, and the Service directs traffic toward one of its current backend Pods. The application process inside the selected Pod handles the request.

Ingress in simple terms

Ingress contains the routing rules. An Ingress controller reads those rules and handles the traffic. Gateway API is the newer, more flexible approach for many external traffic-routing use cases.

06 · Storage fundamentals

The store requests storage; the mall fulfils it using an agreed storage class.

A mall tenant may need storage space for stock, equipment or records. The mall first defines the available storage categories and fulfilment rules. The tenant submits a request, and the mall allocates a suitable storage space. Kubernetes follows a similar pattern.

Remember the storage story
  1. StorageClass = storage fulfilment catalogue and provisioning rules.
  2. PersistentVolumeClaim (PVC) = the store's storage request.
  3. PersistentVolume (PV) = the Kubernetes object representing the allocated storage.
  4. Backing volume = the actual storage asset supplied by the storage system.
Storage Made Simple infographic explaining StorageClass, PersistentVolumeClaim and PersistentVolume through a shopping mall analogy.
A PVC requests storage, a StorageClass guides provisioning, and a PV represents the storage made available to the workload.

A PersistentVolumeClaim expresses the workload's storage request, such as required capacity and access mode. A StorageClass can describe how a class of storage should be dynamically provisioned and managed. A PersistentVolume is the Kubernetes object representing the resulting storage capacity.

With dynamic provisioning, a PVC can trigger a provisioner, guided by a StorageClass, to create a backing volume and corresponding PV. Static provisioning remains possible when storage and PV objects are prepared in advance.

07 · NetworkPolicy

NetworkPolicy is the mall's access-control plan for communication between stores.

A mall does not allow every visitor or employee to enter every area. Customers can enter public stores, delivery staff can use loading areas, and only authorised staff can access restricted rooms. NetworkPolicy applies a similar idea to Pod-to-Pod communication.

Memory hook
  1. NetworkPolicy = mall access-control rules for which stores may communicate.
  2. Pod selectors = the stores to which the rule applies.
  3. Ingress and egress rules = the permitted incoming and outgoing paths.

NetworkPolicy objects describe permitted ingress and egress traffic for selected Pods at IP and port level. For example, a policy can permit frontend Pods to reach backend Pods while preventing direct frontend access to database Pods.

The cluster networking implementation must support and enforce NetworkPolicy. Creating a NetworkPolicy object in a cluster whose network plugin does not enforce it does not create effective isolation.

08 · Resource requests and limits

Requests help the mall place the store. Limits constrain what it may consume.

Before a store opens, mall management needs to know the minimum space, power and facilities it requires. That is the request used for planning and placement. The mall may also define the maximum capacity the store is allowed to consume. That is the limit.

Memory hook
  1. Request = the capacity signal used to decide where the Pod can be placed.
  2. Limit = the maximum runtime allowance configured for the container.
Infographic explaining Kubernetes resource requests and limits through a shopping mall analogy.
Requests influence scheduling. CPU and memory limits constrain runtime behaviour in different ways.

In the example, a container requests 1 CPU and 2 GiB of memory. Kubernetes uses the Pod's effective resource request when selecting a node with sufficient allocatable capacity. One Kubernetes CPU unit may map to a virtual core, physical core or hardware thread depending on the node.

CPU use above a limit can be throttled. Memory enforcement is reactive: if a container exceeds its memory limit and the operating system encounters memory pressure, the container may be terminated and reported as OOMKilled. Restart behaviour follows the Pod's restart policy.

09 · Configuration, Secrets and probes

Every store needs instructions, protected credentials and opening checks.

A mall store needs operating instructions, restricted credentials and checks that confirm whether it is ready and functioning. Kubernetes separates those concerns into ConfigMaps, Secrets and probes.

Memory hook
  1. ConfigMap = the store's operating instructions and notice board.
  2. Secret = a restricted credential locker.
  3. Readiness probe = is the store ready to serve customers?
  4. Liveness probe = is the store still functioning?
  5. Startup probe = has the store finished opening?

ConfigMaps hold non-confidential configuration such as endpoints, feature flags and environment-specific settings. Secrets are intended for confidential values, but creating a Secret does not automatically guarantee strong protection. Security depends on RBAC, encryption at rest, access controls and operational configuration.

A readiness probe asks whether the application can serve traffic now. A failed readiness probe removes the Pod from matching Service endpoints without necessarily restarting the container. A liveness probe detects a stuck or unhealthy process; repeated liveness failure causes the kubelet to restart the affected container. A startup probe can protect slow-starting applications during initialisation.

10 · Hands-on example

Read the YAML like a mall operating plan.

apiVersion: v1
kind: Namespace
metadata:
  name: payments
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: payment-api
  namespace: payments
spec:
  replicas: 3
  selector:
    matchLabels:
      app.kubernetes.io/name: payment-api
  template:
    metadata:
      labels:
        app.kubernetes.io/name: payment-api
        app.kubernetes.io/part-of: payments
    spec:
      containers:
      - name: payment-api-demo
        image: nginx:1.27-alpine
        ports:
        - containerPort: 80
        resources:
          requests:
            cpu: "1"
            memory: "2Gi"
          limits:
            cpu: "2"
            memory: "4Gi"
---
apiVersion: v1
kind: Service
metadata:
  name: payment-api-service
  namespace: payments
spec:
  type: ClusterIP
  selector:
    app.kubernetes.io/name: payment-api
  ports:
  - port: 80
    targetPort: 80

This uses a pinned NGINX image as a placeholder web application. The containerPort documents the application port; it does not independently expose the workload.

Read it like this
  1. Namespace payments = the logical scope used to organise and govern Payments resources.
  2. Deployment payment-api = the store operating plan for the application Pods.
  3. replicas: 3 = request a desired state of three store instances.
  4. ReplicaSet = the behind-the-scenes controller that works to maintain the requested Pod count.
  5. Pod = each individual store instance.
  6. Container payment-api-demo = the packaged demo application process inside each Pod.
  7. Service payment-api-service = the stable ClusterIP and DNS identity that directs traffic to selected Pods.

11 · Knowledge reinforcement

Test the mental model.

1. Which statement best explains the difference between a Worker Node and a Namespace?

2. What does a Deployment manage to maintain the requested number of Pods?

3. Why do we use a Service in Kubernetes?

4. What is the role of a StorageClass in dynamic provisioning?

5. Which statement correctly describes CPU and memory limits?

12 · Architecture challenge

Design a small online retail platform.

You are helping a retail team move a simple application to Kubernetes. The goal is to connect the concepts from this article into one practical design.

The application

  • Web frontend receives customer requests.
  • Orders API validates and processes new orders.
  • Inventory database stores product quantities.

Requirements

  • The frontend must be reachable from outside the cluster.
  • The Orders API must be reachable only from the frontend.
  • The database must not be reachable from outside the cluster or directly from the frontend.
  • The frontend and Orders API are stateless and need multiple replicas.
  • The database needs persistent storage.
  • Non-sensitive settings must be separated from credentials.
  • Unready application instances must stop receiving traffic.
  • Every workload must declare CPU and memory requests and limits.
Load balancer → Ingress or Gateway → Frontend Service → Frontend Pod → Orders Service → Orders Pod → Inventory Service → Database Pod

Try it yourself first. Sketch the architecture and answer these questions before opening the reference design.

  1. Which components should use Deployments, and why?
  2. Should the inventory database use a Deployment or a StatefulSet?
  3. Which Services should use ClusterIP?
  4. Which component should be exposed through Ingress or Gateway?
  5. What NetworkPolicy paths should be permitted?
  6. Which values belong in a ConfigMap, and which belong in a Secret?
  7. Which workload needs a PVC?
  8. What should each readiness probe verify?
  9. What happens when the Orders API Pod is running but not ready?
  10. How should initial CPU and memory requests be selected?
Reveal one reasonable design

This is not the only valid architecture. The goal is to make defensible choices and explain the trade-offs.

FrontendDeployment with three replicas and a ClusterIP Service. Ingress or Gateway sends external traffic only to this Service.
Orders APIDeployment with two replicas and a ClusterIP Service. It remains internal to the cluster.
Inventory databaseStatefulSet with persistent storage and an internal Service. A StatefulSet is appropriate when stable identity and storage association matter.
Network accessPermit Frontend → Orders and Orders → Database. Deny unnecessary paths, including direct Frontend → Database.
ConfigurationUse a ConfigMap for Service names, feature flags and non-sensitive settings. Use a Secret for database credentials.
Health and resourcesReadiness controls Service traffic. Start resource requests from test data or measured usage, then tune them using observation.
  • If the Orders API readiness probe fails, the Pod can remain running but is removed from matching Service endpoints until it becomes ready again.
  • The database claims persistent storage through a PVC. The StorageClass and provisioner determine how backing storage is supplied.
  • Liveness probes should detect a stuck process, while startup probes can protect slow-starting components.
Memory hook
  1. Frontend = customer-facing store.
  2. Orders API = back-office order desk.
  3. Inventory database = secured stock room.
  4. Service = fixed directory number.
  5. NetworkPolicy = authorised access route.
  6. PVC = storage-room request.

13 · Key takeaways

The mental model is memorable when its boundaries are explicit.

  • A cluster combines a control plane and worker nodes.
  • The control plane reconciles declared desired state; it does not invent business intent.
  • Worker nodes are runtime locations. Namespaces are logical scopes for grouping and naming resources.
  • A Pod is the smallest deployable unit and can contain one or more tightly coupled containers.
  • A Deployment manages ReplicaSets; ReplicaSets work to maintain requested Pod replicas.
  • A Service provides stable access to changing backend Pods.
  • Ingress routing rules require an implementation such as an Ingress controller.
  • PVCs request storage, PVs represent storage and StorageClasses can guide dynamic provisioning.
  • NetworkPolicy requires an enforcing network implementation.
  • CPU limits can throttle; memory-limit violations may result in OOM termination.
  • Secrets require proper encryption, RBAC and operational controls.
Why this matters before VKS

VKS builds on Kubernetes concepts rather than replacing them. Supervisor, VCF Namespaces, workload clusters, VKr, storage policies and NSX or VDS networking should be understood by mapping them back to the upstream Kubernetes foundations.