UCloud logo UCloud logo UCloud
v2026.7.0-k8s.18
  1. UCloud/Core
  2. 1. Introduction
  3. 2. Projects
  4. 3. API Tokens
    1. 3.1. Platform API Tokens
    2. 3.2. Provider API Tokens
  5. 4. Accounting
  6. 5. Orchestration
  7. 6. Frontend
  8. UCloud/IM for Slurm-based HPC
  9. 7. Installation
  10. 8. Architecture and Networking
  11. 9. User and Project Management
  12. 10. Filesystem Integration
    1. 10.1. Inter-provider file transfers
  13. 11. Slurm Integration
    1. 11.1. Application Management
    2. 11.2. Built-in Applications
  14. 12. Reference
    1. 12.1. Configuration
    2. 12.2. CLI
  15. 13. Appendix
    1. 13.1. Built-in Application Index
  16. UCloud/IM for Kubernetes
  17. 14. Installation
  18. 15. Architecture and Networking
  19. 16. Filesystem Integration
  20. 17. Compute Jobs
    1. 17.1. Networks
    2. 17.2. Public Links
    3. 17.3. Public IPs
    4. 17.4. License Servers
    5. 17.5. SSH Servers
    6. 17.6. Job Audit Log
    7. 17.7. Virtual machines
  21. 18. AI Inference
    1. 18.1. Architecture
    2. 18.2. Chat Middleware
    3. 18.3. Chat Playground
    4. 18.4. Model Discovery and Catalog
    5. 18.5. Dynamo Deployments
    6. 18.6. Usage and Accounting
    7. 18.7. Audit
    8. 18.8. Metrics
    9. 18.9. Security
  22. 19. Integrated applications
    1. 19.1. Syncthing
    2. 19.2. Integrated terminal
    3. 19.3. Kubernetes clusters
      1. 19.3.1. Architecture
      2. 19.3.2. Stacks
      3. 19.3.3. Creating a cluster
      4. 19.3.4. Cluster dashboard
      5. 19.3.5. Networking and storage
      6. 19.3.6. Maintenance and upgrades
      7. 19.3.7. Backup and recovery
      8. 19.3.8. Reference
  23. 20. UCX applications
    1. 20.1. Hello world
    2. 20.2. Data binding
    3. 20.3. UI events
    4. 20.4. Component reference
    5. 20.5. API reference
  24. 21. Reference
    1. 21.1. Configuration
    2. 21.2. CLI
  25. Style guidelines
  26. 22. Branding and identity for UCloud
  27. 23. Documentation
  28. H: Procedures
  29. 24. H: Procedures
  30. 25. H: Introduction
  31. 26. H: Auditing
  32. 27. H: Auditing scenario
  33. 28. H: GitHub actions
  34. 29. H: Deployment
  35. 30. H: 3rd party dependencies (risk assesment)
  36. Glossary
  37. 31. Glossary
  1. Links
  2. Source Code
  3. Releases

Architecture

The Kubernetes cluster application is a pre-release. It is not ready for production use, and the behavior and the interfaces can change.

The application is one executable with several roles. The platform, the machines of the cluster and the state of the cluster decide which role starts. All roles read and write one shared state: the stack KV-state.

This article describes the processes, the resources of the stack, the stack KV-state, and the phases of a cluster.

Processes

ProcessStarts onPurpose
CreatorThe application session of the userShows the deployment form and the recovery form. It creates the stack and the first nodes of the cluster.
Cluster dashboardEvery control plane node, as the custom UI serviceServes the web interface of the cluster. It reads the Kubernetes API and the stack KV-state.
Maintenance coordinatorEvery control plane node, in the custom UI serviceExecutes the maintenance operations on every node of the cluster. It reads the operations from the stack KV-state and sends the remote work to the node agents.
ControllerOnce per cluster, as a Deployment on a control plane nodeWatches the Ingress resources of the cluster. It creates a public link for every eligible host and it keeps the members of the Ingress service correct.
Node agentEvery node, as a systemd serviceRuns the remote work that needs root on the node: Kubernetes upgrades, operating-system updates and backups.
RecoveryA declared job of the stackServes the disaster recovery wizard. It runs only while a recovery is active. See Backup and recovery.
flowchart TB
    browser["Browser<br/>Cluster dashboard"]:::diagram-external-window
    core["UCloud/Core"]:::diagram-external-ucloud
    im["UCloud/IM<br/>Kubernetes"]:::diagram-provider-ucloud

    subgraph cp["Control plane node<br/>Virtual machine"]
        server["K3s server<br/>API server and etcd"]:::diagram-provider-server
        ui["Custom UI service<br/>Dashboard and maintenance | port: 43102"]:::diagram-provider-window
        ctrl["Deployment<br/>Ingress controller"]:::diagram-provider-cog-6-tooth
        cpa["Node agent"]:::diagram-provider-cog-6-tooth
    end

    subgraph wrk["Worker node<br/>Virtual machine"]
        agent["K3s agent<br/>Kubelet"]:::diagram-provider-server
        wa["Node agent"]:::diagram-provider-cog-6-tooth
    end

    drive["State drive<br/>Stack files"]:::diagram-provider-folder

    class cp diagram-provider-kubernetes
    class wrk diagram-provider-kubernetes

    browser --> core
    core -->|"routes the custom UI"| im
    im -->|"serves the dashboard"| ui
    ui -->|"reads and changes"| server
    ui -->|"maintenance API"| cpa
    ui -->|"maintenance API"| wa
    ctrl -->|"watches Ingress"| server
    ctrl -->|"creates public links"| im
    server -->|"schedules workloads"| agent
    drive -.->|"input, bundle and storage"| cpa
    drive -.->|"input, bundle and storage"| wa

The machines of one cluster, the processes on each machine, and the traffic that reaches them. It does not show the networking inside the cluster; see Networking and storage.

The custom UI service and the maintenance coordinator are one process. The platform starts the service on every control plane node and shares the mounts of the node with it. The dashboard is available while at least one control plane node runs.

The cluster stack

A stack groups the resources of one cluster. UCloud/IM for Kubernetes creates the resources of the stack on the systems of the provider.

ResourcePurpose
State driveHolds all files of the cluster: the node inputs, the script bundle, the backups and the shared storage.
Private networkConnects the nodes on a fixed address plan. See Networking and storage.
ServiceServes the Kubernetes API on port 6443. The control plane jobs are the members of the service.
Public linkServes the Kubernetes API on a public hostname, for example <cluster-id>-api.<domain>.
Node jobsOne UCloud job per node. Each job runs Ubuntu 26.04 as a virtual machine with a disk from the state drive.
Ingress serviceServes the applications of the cluster on port 30080. See Application access.
Ingress public linksOne public link per Ingress host of the cluster.

If the creator stops while it creates the stack, the platform removes the resources that the stack created. The cluster record can still list leftover resources. The application removes them in the background and clears the record when they are gone. See Creating a cluster.

Stack KV-state

All roles share the stack KV-state. It holds a small record per purpose. Every write carries the revision of the record, so two roles cannot overwrite each other by accident.

RecordHolds
Cluster recordThe phase of the cluster, the nodes and their jobs, the worker pools, the provider, the network, the service, the script bundle and the next free node number.
Maintenance operationOne operation per node: the kind, the phase, the deadline and the progress.
Rolling upgradeThe active rolling upgrade: the target release, the nodes and their operation identifiers.
Traffic recordThe control plane jobs whose traffic is suspended during maintenance.
Automatic maintenanceThe policy with the maintenance window, and the state of the current or last run.
Backup state and requestThe schedule of the backup coordinator, the last attempts and the manual requests.
Recovery recordThe active recovery: the stage, the backup and the error of the last step.

The Reference lists the key of every record, and Stacks describes the store that holds the records.

The cluster record is the source of truth for the cluster. Every process reads the record before it changes the cluster, and the application validates the schema revision of the record. A record that an incompatible version of the application wrote is rejected.

Credentials

The cluster uses four secrets. See Reference for the paths and the lifetime.

  • The join tokens admit a node to the cluster. One token admits control plane nodes and one token admits workers. The tokens are static for the lifetime of the cluster.
  • The administrator token of the Kubernetes API. It belongs to the service account of the cluster and it does not expire.
  • The controller registration token admits the controller to the provider API. It belongs to the node that runs the controller.
  • The maintenance enrollment secret admits the maintenance coordinator to the node agent of one node.

Cluster phases

flowchart LR
    provisioning["Provisioning"]:::diagram-provider-cog-6-tooth
    created["Created"]:::diagram-provider-kubernetes
    recovering["Recovering"]:::diagram-provider-cog-6-tooth
    error["Error"]:::diagram-provider-document-text
    cleanup["Cleanup pending"]:::diagram-provider-document-text

    provisioning -->|"creation completes"| created
    provisioning -->|"a step fails"| error
    created -->|"a recovery starts"| recovering
    recovering -->|"the recovery closes"| created
    created -->|"a failed scale-out leaves resources"| cleanup
    cleanup -->|"the cleanup completes"| created
    cleanup -->|"a recovery starts"| recovering

The phases of a cluster and the events that move a cluster from one phase to the next. It does not show the background cleanup attempts.

PhaseMeaning
provisioningThe creator creates the resources of the cluster. New nodes cannot join yet.
createdThe cluster works. Maintenance, backup and recovery are available. Scale-out is available when the pending-cleanup list is empty.
errorA step of the creation failed. The cluster record holds the reason.
cleanup-pendingA failed scale-out left resources. The application removes them in the background and returns to created. Maintenance, backup and recovery remain available. Scale-out waits for the cleanup.
recoveringA recovery replaces the control plane nodes from a backup. All other operations wait.
Previous Kubernetes clusters
Next Stacks