# nixndme/hks-kube-con architecture

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

- Interactive diagram: https://gitdiagram.com/nixndme/hks-kube-con
- Repository: https://github.com/nixndme/hks-kube-con

## Overview

K8s Showcase is a Flask telemetry demo for observing Kubernetes deployments and blue/green switches. A visitor reaches the app through the cluster’s ingress and service; the app serves a status page and JSON endpoint, tracking recent visitors and reading pod and rollout state from the Kubernetes API. Deployment configuration is provided both as plain Kubernetes manifests and as a Helm chart; the README also describes GitOps updates driven by chart values. The app implementation was sampled, but deployment manifests and template contents were not, so those relationships are shown only where documented.

Main entry points: [`app/app.py`](https://github.com/nixndme/hks-kube-con/blob/main/app/app.py) (Status endpoint), [`k8s/ingress.yaml`](https://github.com/nixndme/hks-kube-con/blob/main/k8s/ingress.yaml) (Cluster ingress), [`k8s/service.yaml`](https://github.com/nixndme/hks-kube-con/blob/main/k8s/service.yaml) (App service), [`k8s/deployment.yaml`](https://github.com/nixndme/hks-kube-con/blob/main/k8s/deployment.yaml) (Kubernetes deployment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_traffic["Traffic and app"]
  node_ingress["Cluster ingress<br/>[ingress.yaml]"]
  node_service["App service<br/>[service.yaml]"]
  node_flask["Flask app<br/>[app.py]"]
  node_page["Status page<br/>[index.html]"]
  node_status["Status endpoint<br/>[app.py]"]
end

subgraph group_telemetry["Live telemetry"]
  node_visitor_log["Visitor tracking<br/>[app.py]"]
  node_pod_mix["Pod mix<br/>[app.py]"]
  node_rollout["Rollout detail<br/>[app.py]"]
  node_deploy_info["Deploy metadata<br/>[app.py]"]
end

subgraph group_deployment["Deployment configuration"]
  node_plain_deploy["Kubernetes deployment<br/>[deployment.yaml]"]
  node_plain_config["Kubernetes configuration<br/>[configmap.yaml]"]
  node_helm_chart["Helm chart"]
  node_helm_values["Chart values<br/>[values.yaml]"]
end

node_visitor(("Visitor"))
node_k8s_api["Kubernetes API"]
node_gitops["GitOps poller"]
node_cluster["Kubernetes cluster"]

node_visitor -->|"requests"| node_ingress
node_ingress -.->|"routes traffic"| node_service
node_service -.->|"forwards requests"| node_flask
node_flask -->|"renders"| node_page
node_visitor -->|"visits page"| node_visitor_log
node_visitor_log -->|"records visits for"| node_status
node_flask -->|"routes status"| node_status
node_status -->|"calls"| node_pod_mix
node_status -->|"calls"| node_rollout
node_status -->|"returns metadata"| node_deploy_info
node_pod_mix -->|"lists pods"| node_k8s_api
node_rollout -->|"reads pods and service"| node_k8s_api
node_plain_deploy -.->|"deploys app"| node_cluster
node_plain_config -.->|"configures app"| node_cluster
node_helm_chart -.->|"installs app"| node_cluster
node_helm_values -->|"triggers redeploy"| node_gitops
node_gitops -->|"redeploys"| node_cluster

click node_ingress "https://github.com/nixndme/hks-kube-con/blob/main/k8s/ingress.yaml"
click node_service "https://github.com/nixndme/hks-kube-con/blob/main/k8s/service.yaml"
click node_flask "https://github.com/nixndme/hks-kube-con/blob/main/app/app.py"
click node_page "https://github.com/nixndme/hks-kube-con/blob/main/app/templates/index.html"
click node_status "https://github.com/nixndme/hks-kube-con/blob/main/app/app.py"
click node_visitor_log "https://github.com/nixndme/hks-kube-con/blob/main/app/app.py"
click node_pod_mix "https://github.com/nixndme/hks-kube-con/blob/main/app/app.py"
click node_rollout "https://github.com/nixndme/hks-kube-con/blob/main/app/app.py"
click node_deploy_info "https://github.com/nixndme/hks-kube-con/blob/main/app/app.py"
click node_plain_deploy "https://github.com/nixndme/hks-kube-con/blob/main/k8s/deployment.yaml"
click node_plain_config "https://github.com/nixndme/hks-kube-con/blob/main/k8s/configmap.yaml"
click node_helm_chart "https://github.com/nixndme/hks-kube-con/tree/main/helm/k8s-showcase"
click node_helm_values "https://github.com/nixndme/hks-kube-con/blob/main/helm/k8s-showcase/values.yaml"

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_ingress,node_service,node_flask,node_page,node_status toneBlue
class node_visitor_log,node_pod_mix,node_rollout,node_deploy_info toneAmber
class node_plain_deploy,node_plain_config,node_helm_chart,node_helm_values,node_k8s_api toneMint
class node_visitor,node_gitops,node_cluster toneIndigo
```

## Components

### Traffic and app

- [Cluster ingress](https://github.com/nixndme/hks-kube-con/blob/main/k8s/ingress.yaml): `k8s/ingress.yaml`
- [App service](https://github.com/nixndme/hks-kube-con/blob/main/k8s/service.yaml): `k8s/service.yaml`
- [Flask app](https://github.com/nixndme/hks-kube-con/blob/main/app/app.py): `app/app.py`
- [Status page](https://github.com/nixndme/hks-kube-con/blob/main/app/templates/index.html): `app/templates/index.html`
- [Status endpoint](https://github.com/nixndme/hks-kube-con/blob/main/app/app.py): `app/app.py`

### Live telemetry

- [Visitor tracking](https://github.com/nixndme/hks-kube-con/blob/main/app/app.py): `app/app.py`
- [Pod mix](https://github.com/nixndme/hks-kube-con/blob/main/app/app.py): `app/app.py`
- [Rollout detail](https://github.com/nixndme/hks-kube-con/blob/main/app/app.py): `app/app.py`
- [Deploy metadata](https://github.com/nixndme/hks-kube-con/blob/main/app/app.py): `app/app.py`

### Deployment configuration

- [Kubernetes deployment](https://github.com/nixndme/hks-kube-con/blob/main/k8s/deployment.yaml): `k8s/deployment.yaml`
- [Kubernetes configuration](https://github.com/nixndme/hks-kube-con/blob/main/k8s/configmap.yaml): `k8s/configmap.yaml`
- [Helm chart](https://github.com/nixndme/hks-kube-con/tree/main/helm/k8s-showcase): `helm/k8s-showcase`
- [Chart values](https://github.com/nixndme/hks-kube-con/blob/main/helm/k8s-showcase/values.yaml): `helm/k8s-showcase/values.yaml`

### Other components

- **Visitor**
- **Kubernetes API**
- **GitOps poller**
- **Kubernetes cluster**

## Connections

- Visitor → Cluster ingress: requests (evidence: `README.md`)
- Cluster ingress → App service: routes traffic (evidence: `README.md`)
- App service → Flask app: forwards requests (evidence: `README.md`)
- Flask app → Status page: renders (evidence: `app/app.py`)
- Visitor → Visitor tracking: visits page (evidence: `app/app.py`)
- Visitor tracking → Status endpoint: records visits for (evidence: `app/app.py`)
- Flask app → Status endpoint: routes status (evidence: `app/app.py`)
- Status endpoint → Pod mix: calls (evidence: `app/app.py`)
- Status endpoint → Rollout detail: calls (evidence: `app/app.py`)
- Status endpoint → Deploy metadata: returns metadata (evidence: `app/app.py`)
- Pod mix → Kubernetes API: lists pods (evidence: `app/app.py`)
- Rollout detail → Kubernetes API: reads pods and service (evidence: `app/app.py`)
- Kubernetes deployment → Kubernetes cluster: deploys app (evidence: `README.md`)
- Kubernetes configuration → Kubernetes cluster: configures app (evidence: `README.md`)
- Helm chart → Kubernetes cluster: installs app (evidence: `README.md`)
- Chart values → GitOps poller: triggers redeploy (evidence: `README.md`)
- GitOps poller → Kubernetes cluster: redeploys (evidence: `README.md`)
