# luksa/kubernetes-in-action architecture

> Architecture diagram of the GitHub repository luksa/kubernetes-in-action, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/luksa/kubernetes-in-action
- Repository: https://github.com/luksa/kubernetes-in-action

## Overview

This repository is an educational collection of Kubernetes in Action examples, not a single deployable application. Its recurring workflow is to apply chapter manifests and run example containers in a Kubernetes cluster, then observe workload behavior or access services. The chapters cover workload lifecycle, networking, configuration and storage, cluster APIs and security, and stateful or extensible patterns. The README identifies the collection but does not document runtime wiring; most manifest-to-cluster relationships below are therefore dashed and unverified. Sampled application code supports the HTTP and peer-discovery links shown.

Main entry points: [`Chapter10/kubia-pet-peers-image/app.js`](https://github.com/luksa/kubernetes-in-action/blob/master/Chapter10/kubia-pet-peers-image/app.js) (Peer discovery server), [`Chapter10/kubia-pet-image/app.js`](https://github.com/luksa/kubernetes-in-action/blob/master/Chapter10/kubia-pet-image/app.js) (Pet data server), [`Chapter08/Fabric8ClientTest.java`](https://github.com/luksa/kubernetes-in-action/blob/master/Chapter08/Fabric8ClientTest.java) (Kubernetes client), [`Chapter02/kubia/app.js`](https://github.com/luksa/kubernetes-in-action/blob/master/Chapter02/kubia/app.js) (Kubia HTTP server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workloads["Workloads and rollout"]
  node_kubia["Kubia HTTP server<br/>[app.js]"]
  node_health["Health probes"]
  node_jobs["Jobs and cronjobs"]
  node_rollouts["Deployments and rollouts"]
end

subgraph group_network["Services and networking"]
  node_services["Services and ingress"]
end

subgraph group_config["Configuration and storage"]
  node_fortune["Fortune example<br/>[fortuneloop.sh]"]
  node_volumes[("Volumes and claims")]
  node_podconfig["Pod configuration"]
end

subgraph group_cluster["Cluster control and policy"]
  node_api_client["Kubernetes client"]
  node_identity["Service accounts"]
  node_security["Security policies"]
  node_resources["Resource controls"]
  node_placement["Scheduling and placement"]
end

subgraph group_advanced["Stateful and extensible"]
  node_pet["Pet data server<br/>[app.js]"]
  node_peer_pet["Peer discovery server<br/>[app.js]"]
  node_stateful["Stateful workloads"]
  node_lifecycle["Container lifecycle hooks"]
  node_extensions["Custom resources and brokers"]
end

node_operator(("Example operator"))
node_cluster{{"Kubernetes cluster"}}

node_operator -.->|"applies examples"| node_cluster
node_cluster -.->|"runs workload"| node_kubia
node_cluster -.->|"checks probes"| node_health
node_cluster -.->|"runs jobs"| node_jobs
node_cluster -.->|"manages rollout"| node_rollouts
node_cluster -.->|"routes traffic"| node_services
node_cluster -.->|"runs workload"| node_fortune
node_cluster -.->|"mounts storage"| node_volumes
node_cluster -.->|"provides settings"| node_podconfig
node_api_client -->|"manages pods"| node_cluster
node_cluster -.->|"enforces identity"| node_identity
node_cluster -.->|"enforces policy"| node_security
node_cluster -.->|"enforces limits"| node_resources
node_cluster -.->|"places workloads"| node_placement
node_cluster -.->|"runs workload"| node_pet
node_cluster -.->|"runs workload"| node_peer_pet
node_peer_pet -->|"requests peer data"| node_pet
node_cluster -.->|"manages state"| node_stateful
node_cluster -.->|"configures hooks"| node_lifecycle
node_cluster -.->|"hosts extensions"| node_extensions

click node_kubia "https://github.com/luksa/kubernetes-in-action/blob/master/Chapter02/kubia/app.js"
click node_health "https://github.com/luksa/kubernetes-in-action/tree/master/Chapter04"
click node_jobs "https://github.com/luksa/kubernetes-in-action/tree/master/Chapter04"
click node_rollouts "https://github.com/luksa/kubernetes-in-action/tree/master/Chapter09"
click node_services "https://github.com/luksa/kubernetes-in-action/tree/master/Chapter05"
click node_fortune "https://github.com/luksa/kubernetes-in-action/blob/master/Chapter06/fortune/fortuneloop.sh"
click node_volumes "https://github.com/luksa/kubernetes-in-action/tree/master/Chapter06"
click node_podconfig "https://github.com/luksa/kubernetes-in-action/tree/master/Chapter07"
click node_api_client "https://github.com/luksa/kubernetes-in-action/blob/master/Chapter08/Fabric8ClientTest.java"
click node_identity "https://github.com/luksa/kubernetes-in-action/tree/master/Chapter12"
click node_security "https://github.com/luksa/kubernetes-in-action/tree/master/Chapter13"
click node_resources "https://github.com/luksa/kubernetes-in-action/tree/master/Chapter14"
click node_placement "https://github.com/luksa/kubernetes-in-action/tree/master/Chapter16"
click node_pet "https://github.com/luksa/kubernetes-in-action/blob/master/Chapter10/kubia-pet-image/app.js"
click node_peer_pet "https://github.com/luksa/kubernetes-in-action/blob/master/Chapter10/kubia-pet-peers-image/app.js"
click node_stateful "https://github.com/luksa/kubernetes-in-action/tree/master/Chapter10"
click node_lifecycle "https://github.com/luksa/kubernetes-in-action/tree/master/Chapter17"
click node_extensions "https://github.com/luksa/kubernetes-in-action/tree/master/Chapter18"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_kubia,node_health,node_jobs,node_rollouts toneBlue
class node_services toneAmber
class node_fortune,node_volumes,node_podconfig toneMint
class node_api_client,node_identity,node_security,node_resources,node_placement toneRose
class node_pet,node_peer_pet,node_stateful,node_lifecycle,node_extensions,node_operator,node_cluster toneIndigo
```

## Components

### Workloads and rollout

- [Kubia HTTP server](https://github.com/luksa/kubernetes-in-action/blob/master/Chapter02/kubia/app.js): `Chapter02/kubia/app.js`
- [Health probes](https://github.com/luksa/kubernetes-in-action/tree/master/Chapter04): `Chapter04`
- [Jobs and cronjobs](https://github.com/luksa/kubernetes-in-action/tree/master/Chapter04): `Chapter04`
- [Deployments and rollouts](https://github.com/luksa/kubernetes-in-action/tree/master/Chapter09): `Chapter09`

### Services and networking

- [Services and ingress](https://github.com/luksa/kubernetes-in-action/tree/master/Chapter05): `Chapter05`

### Configuration and storage

- [Fortune example](https://github.com/luksa/kubernetes-in-action/blob/master/Chapter06/fortune/fortuneloop.sh): `Chapter06/fortune/fortuneloop.sh`
- [Volumes and claims](https://github.com/luksa/kubernetes-in-action/tree/master/Chapter06): `Chapter06`
- [Pod configuration](https://github.com/luksa/kubernetes-in-action/tree/master/Chapter07): `Chapter07`

### Cluster control and policy

- [Kubernetes client](https://github.com/luksa/kubernetes-in-action/blob/master/Chapter08/Fabric8ClientTest.java): `Chapter08/Fabric8ClientTest.java`
- [Service accounts](https://github.com/luksa/kubernetes-in-action/tree/master/Chapter12): `Chapter12`
- [Security policies](https://github.com/luksa/kubernetes-in-action/tree/master/Chapter13): `Chapter13`
- [Resource controls](https://github.com/luksa/kubernetes-in-action/tree/master/Chapter14): `Chapter14`
- [Scheduling and placement](https://github.com/luksa/kubernetes-in-action/tree/master/Chapter16): `Chapter16`

### Stateful and extensible

- [Pet data server](https://github.com/luksa/kubernetes-in-action/blob/master/Chapter10/kubia-pet-image/app.js): `Chapter10/kubia-pet-image/app.js`
- [Peer discovery server](https://github.com/luksa/kubernetes-in-action/blob/master/Chapter10/kubia-pet-peers-image/app.js): `Chapter10/kubia-pet-peers-image/app.js`
- [Stateful workloads](https://github.com/luksa/kubernetes-in-action/tree/master/Chapter10): `Chapter10`
- [Container lifecycle hooks](https://github.com/luksa/kubernetes-in-action/tree/master/Chapter17): `Chapter17`
- [Custom resources and brokers](https://github.com/luksa/kubernetes-in-action/tree/master/Chapter18): `Chapter18`

### Other components

- **Example operator**
- **Kubernetes cluster**

## Connections

- Example operator → Kubernetes cluster: applies examples
- Kubernetes cluster → Kubia HTTP server: runs workload
- Kubernetes cluster → Health probes: checks probes
- Kubernetes cluster → Jobs and cronjobs: runs jobs
- Kubernetes cluster → Deployments and rollouts: manages rollout
- Kubernetes cluster → Services and ingress: routes traffic
- Kubernetes cluster → Fortune example: runs workload
- Kubernetes cluster → Volumes and claims: mounts storage
- Kubernetes cluster → Pod configuration: provides settings
- Kubernetes client → Kubernetes cluster: manages pods (evidence: `Chapter08/Fabric8ClientTest.java`)
- Kubernetes cluster → Service accounts: enforces identity
- Kubernetes cluster → Security policies: enforces policy
- Kubernetes cluster → Resource controls: enforces limits
- Kubernetes cluster → Scheduling and placement: places workloads
- Kubernetes cluster → Pet data server: runs workload
- Kubernetes cluster → Peer discovery server: runs workload
- Peer discovery server → Pet data server: requests peer data (evidence: `Chapter10/kubia-pet-peers-image/app.js`)
- Kubernetes cluster → Stateful workloads: manages state
- Kubernetes cluster → Container lifecycle hooks: configures hooks
- Kubernetes cluster → Custom resources and brokers: hosts extensions
