Introducing a new way to review your PRs.

Read the announcement

replicatedhq / kots

KOTS provides the framework, tools and integrations that enable the delivery and management of 3rd-party Kubernetes applications, a.k.a. Kubernetes Off-The-Shelf (KOTS) Software.

View on GitHub

21 documents · Updated Nov 23, 2026

docs / web-admin-console

Web Admin Console

The Web Admin Console is a browser application that gives operators one place to secure an installation, select an application, manage its deployment, and operate related cluster services. It combines route-based React screens with shared navigation, session-aware client state, and requests to the Admin Console backend.

Application composition

The console has a small set of shells that give different operator journeys a stable frame. The main shell owns shared application state and routes, while the upgrade journey uses a focused shell with its own steps.

Browser entry point

The browser starts the React application at the app element and places route handling around it. The default route enters the main console shell through an error boundary, while /upgrade-service/* enters the separate deployment upgrade flow.

The web package defines browser development, validation, and test commands. Its runtime dependencies provide the React view layer, route handling, shared server-data cache, and browser build support. Its development dependencies provide the lint, type-check, unit-test, and local development toolchain. The browser build selects a development or enterprise environment and injects its values into the bundle. It also prepares styles, static assets, and the YAML and JSON editor used by configuration views.

The frontend composition page describes the feature-level structure below these entry points. This page keeps the view at the system boundary: routes select an operator capability and the selected capability reads shared console context.

References: web/…/index.tsx• L1-33 web/…/Root.tsx• L663-724 web/package.json• L7-18 web/package.json• L85-179 web/webpack.config.js• L9-27 web/webpack.config.js• L29-77 web/webpack.config.js• L150-195

Application shell

The main shell presents shared navigation and a footer around the active route. It loads installation metadata and the application list before it can show the full operator experience. That data also controls which product areas are available for the current installation.

The shell sends an unauthenticated visitor to the secure console. After login, it sends the operator to the first available application or to the next installation step when no application is ready yet. The application detail shell also repairs an old application slug when only one application remains, preserves the nested page in the URL, and shares the selected application's actions with its child routes. It refreshes application data while a version is waiting for results and handles global states such as a lost backend connection and an upgrade in progress.

References: web/…/Root.tsx• L114-148 web/…/Root.tsx• L375-411 web/…/Root.tsx• L724-749 web/…/Root.tsx• L1186-1229 web/…/AppDetailPage.tsx• L95-184 web/…/AppDetailPage.tsx• L322-366 web/…/AppDetailPage.tsx• L386-438

Feature areas

The route tree groups the console into a small number of operator areas. Application routes cover the dashboard, configuration, version history, license, file view, and troubleshooting. Other top-level routes cover cluster management, GitOps, access, snapshots or disaster recovery, application installation, air-gapped upload, and restore.

The upgrade service is a separate three-stage journey: configuration, preflight checks, and deploy confirmation. Feature-oriented user journeys are described in product workflows, which is the better guide for understanding what an operator does in each area.

References: web/…/Root.tsx• L751-973 web/…/Root.tsx• L975-1167 web/…/UpgradeService.tsx• L22-109

License management

License management gives operators a view of the current application license and a way to bring its credentials up to date. The same product capability appears in the application license page and in the dashboard card, so an operator can sync a connected installation or upload a license file for an air-gapped installation.

The console also supports replacing a community license and replacing a service account token when the current license uses one. After a successful change, the console shows the license entitlements and directs the operator to the next relevant step: a GitOps repository when GitOps is connected, or version history when a new application version must be deployed.

References: web/…/AppLicense.tsx• L72-217 web/…/AppLicense.tsx• L240-305 web/…/AppLicense.tsx• L364-419 web/…/AppLicense.tsx• L422-680 web/…/AppLicense.tsx• L817-883 web/…/DashboardLicenseCard.tsx• L54-129 web/…/DashboardLicenseCard.tsx• L178-257 web/…/DashboardLicenseCard.tsx• L379-441

Shared UI infrastructure

Shared UI gives every route a common way to move through the console and report work. It also keeps installation-specific branding and capability limits visible across screens.

The top navigation is the main switch between application views and installation services. It shows links such as Application, GitOps, Cluster Management, Snapshots or Disaster Recovery, and Access only when the loaded metadata and application capabilities support them.

Inside an application, the sub-navigation maps operator goals to the selected application and version. It can hide views for unsupported application types, cluster modes, or user roles. This makes the navigation a view of the backend capability model rather than a fixed menu.

References: web/…/NavBar.tsx• L142-289 web/…/SubNavBar.jsx• L17-67 web/…/SubNavBar.jsx• L69-140 web/…/subNavConfig.js• L9-81

Shared feedback surfaces

The shell provides common surfaces for loading, errors, confirmation dialogs, and short-lived status messages. A toast context lets feature screens share message state, while the error boundary and global modals stop a route failure or a lost connection from leaving the operator without feedback.

These surfaces support the same operator model across ordinary pages and long-running actions. A screen can report progress or failure without creating a separate application-wide notification path.

References: web/…/ToastContext.tsx• L1-51 web/…/Root.tsx• L25-41 web/…/Root.tsx• L1186-1229 web/…/SideBar.tsx• L12-37

Installation branding

The console adapts its visible identity to the installation. Metadata supplies the application name and logo, and branding data can supply fonts and styles. The shell applies this information to the page head, login view, navigation, and browser icon.

This keeps the same console product usable for different application installations without changing the operator route model.

References: web/…/Root.tsx• L293-328 web/…/Root.tsx• L663-695 web/…/SecureAdminConsole.tsx• L298-364 web/…/NavBar.tsx• L158-206

Client state model

The console combines shell state with server-backed query state. Shell state controls routing, branding, selected installation conditions, and global status. React Query supplies a shared cache for data that belongs to a request or mutation.

Shell state

The main shell keeps the state that many routes need at the same time. This includes the application list, metadata, feature flags, selected application details, theme data, active setup steps, connection status, and upgrade status. The application detail context adds the selected application's current data and shared actions for nested pages, such as refresh, deploy, redeploy, upload progress, and error display.

The shell refreshes metadata and applications after important transitions such as login or an upload. It also stores a small login marker and session roles in browser storage so the UI can choose its initial route and apply role-based visibility. The marker is a client hint; backend requests still determine whether the session is valid.

References: web/…/Root.tsx• L87-110 web/…/Root.tsx• L114-192 web/…/AppDetailPage.tsx• L413-438 web/…/utilities.js• L605-654

Server data cache

React Query represents request data that can be loaded, refreshed, invalidated, or changed by a mutation. The same model supports stable reads such as metadata and applications, periodic dashboard reads, and follow-up reads after actions such as rerunning preflight checks.

Preflight result reads use the same cache model for installation and upgrade journeys. Each journey supplies its backend endpoint while the shared query behavior turns the response into display state and polls while the check is still running.

This split keeps global shell concerns separate from data owned by one feature. A route can update its server data without making the main shell own every response.

References: web/…/Root.tsx• L63-64 web/…/getMetadata.jsx• L1-25 web/…/getApps.tsx• L1-51 web/…/usePreflightResults.ts• L92-131 web/…/getPreflightResult.tsx• L3-12 web/…/getPreflightResult.tsx• L3-12 web/…/postPreflightRun.tsx• L31-51

Configuration visibility

Application configuration is treated as a dependency-aware set of choices. A configuration item can depend on another item, and groups or items can be filtered by installation conditions. The visible configuration and navigation therefore follow the current application state instead of showing every possible option.

This rule matters to both the setup journey and later application configuration. A change to the conditions supplied by the backend can change what the operator sees without changing the route itself.

References: web/…/ConfigService.js• L7-31 web/…/ConfigService.js• L44-81 web/…/ConfigService.js• L119-130 web/…/Root.tsx• L550-601

Backend communication

The browser treats the Admin Console backend as the source of truth for authentication, installation state, application state, and actions. Feature screens call that backend through the configured API endpoint and use the response to update the shell or their query data.

Session and authentication

The secure console supports a shared-password login and an identity-provider login. Both paths establish a backend session, then load the application list and route the operator to the correct next page. Requests include browser credentials so the backend session can authorize later reads and writes.

When a request returns unauthorized, the client clears its local login state and returns to the secure console. A failed login or logout remains visible in the shared error surfaces so the operator can retry.

References: web/…/SecureAdminConsole.tsx• L50-89 web/…/SecureAdminConsole.tsx• L102-184 web/…/NavBar.tsx• L50-81 web/…/getApps.tsx• L7-33

Request boundaries

The API endpoint is supplied when the browser bundle is built. The build maps the selected environment to values such as the endpoint before the application starts. Requests use either the browser fetch interface or Axios, with JSON as the normal data format and credentials enabled for session-bound calls. Feature API modules keep reads and writes close to the feature that owns the operator action.

The request helpers also define a basic time boundary for calls that must not wait forever. This gives the shell a way to distinguish a slow or unavailable backend from a normal in-progress request.

References: web/webpack.config.js• L9-27 web/…/fetchWithTimeout.ts• L1-20 web/…/getSelectedAppClusterDashboard.ts• L8-25 web/…/postDeployAppVersion.tsx• L4-33

License synchronization

License actions use authenticated backend requests and return the updated license for the selected application. The dashboard refreshes its license data after a sync, while the application license page updates its local view and keeps the operator's next action tied to the backend result.

Air-gapped installations upload YAML license content. Connected installations request a sync without a file. License replacement and service account token replacement use the same session boundary, report errors in the page, and send an unauthorized response back through the logout path.

References: web/…/AppLicense.tsx• L87-217 web/…/AppLicense.tsx• L240-305 web/…/DashboardLicenseCard.tsx• L54-129

Update discovery

The version-history view asks the backend for available application updates when the installation supports that view. It stores the result in local feature state and passes it to the update surface, where an operator can start the related upgrade journey.

This request does not retry or poll after a failure. A failed or stalled response can therefore leave the Available Updates section empty until the page reloads.

References: web/…/AppVersionHistory.tsx• L345-372 web/…/AppVersionHistory.tsx• L2115-2133 web/…/AvailableUpdatesComponent.tsx• L81-135

Status and long-running actions

The shell pings the backend while the operator is logged in. The response reports connection health and snapshot work in progress. The shell retries a failed ping before it shows a connection-terminated state, then stops polling until the operator recovers the connection.

Long-running upgrade work follows a similar pattern. The console polls upgrade status, keeps the status modal open while work is active, and reloads the page after the backend reports completion. The upgrade status modal keeps its loop alive through transient non-401 API failures, then resumes upgrade status requests after the ping recovers; a 401 still ends the session. Preflight and deploy actions update or invalidate related data so the next screen reflects backend state.

References: web/…/Root.tsx• L251-291 web/…/Root.tsx• L330-373 web/…/useSelectedAppClusterDashboard.ts• L9-79 web/…/postPreflightRun.tsx• L31-51 web/…/UpgradeStatusModal.test.tsx• L27-65

Preflight result exchange

Preflight checks tell the console whether an application version is ready for deployment. The backend can return progress, completed checks, notices, or collection errors. The browser converts those outcomes into one display model shared by installation and upgrade flows.

The exchange follows a short cycle:

  1. The relevant journey requests results from its application or upgrade endpoint.
  2. The browser reads progress and result data and converts serialized fields into structured values.
  3. The console polls while the check has no completed analyzer result or still has recoverable collection errors.
  4. The UI shows pass, warning, failure, skip, or deployment-blocked state from the normalized result.

This diagram shows how one backend response becomes the operator state used by both preflight journeys.

flowchart LR
    A[Installation or upgrade flow] --> B[Preflight result endpoint]
    B --> C[Shared result query]
    C --> D[Normalized preflight state]
    D --> E{Check complete?}
    E -- No --> B
    E -- Yes --> F[Display result or block deployment]

Collection errors can keep polling active because a later response may contain usable results. A notice without collection errors is treated as a completed warning, while strict failures can block deployment. The shared summary state also distinguishes a warning from a failure when no collection error exists.

References: web/…/usePreflightResults.ts• L5-35 web/…/usePreflightResults.ts• L38-90 web/…/usePreflightResults.ts• L92-131 web/…/getPreflightResult.tsx• L3-12 web/…/getPreflightResult.tsx• L3-12 web/…/types.ts• L4-75 web/…/utilities.js• L429-447 web/…/getPreflightResult.test.tsx• L8-77 web/…/utilities.test.js• L1-11

Operator journey boundaries

The Admin Console provides the shared frame for several operator journeys, but each journey has its own domain page. Use the frontend composition page to trace how routes and feature areas are arranged. Use product workflows to follow application install, deploy, upgrade, backup, access, GitOps, and troubleshooting goals from the operator view.

Change checklist

When these files or sections are changed, remember to consider these:

  • Changes to metadata or application capability fields can affect both route access and the top or application navigation.
  • Changes to login or logout behavior must keep the browser login marker, session roles, backend credentials, and unauthorized-response handling aligned.
  • Changes to API response shape must update both shell state consumers and React Query keys or invalidation rules that depend on that response.
  • Changes to configuration visibility rules must be checked against setup-step navigation and the configuration page because both use the same dependency model.
  • Changes to the web dependency manifest must keep the resolved Yarn lockfile aligned with the browser build, test, and runtime toolchain.
  • Changes to the browser build environment mapping must keep the endpoint and other injected values aligned with the backend target for each build mode.
  • Changes to available-update discovery must preserve the link between the backend response, update visibility, and the upgrade-service start action.
  • Changes to polling or long-running task status must preserve the connection-terminated and upgrade-status modal behavior, including recovery from transient API failures and logout on 401.
  • Changes to license sync, upload, replacement, or service-account-token responses must keep dashboard refresh, selected-application state, cross-application redirects, and the GitOps or version-history next step aligned.
  • Changes to preflight response fields or completion rules must keep installation and upgrade endpoints aligned with the shared normalized state, polling decision, deployment block, and summary state.

Important failure modes

TriggerConsequenceGuard
Metadata or application capability data is missing or staleThe console can hide a needed route or send the operator to the wrong setup stepRefresh metadata and the application list after login and state-changing setup actions
The browser bundle uses the wrong build environmentRequests can target the wrong backend or use missing endpoint valuesMap the build mode before injecting environment values into the bundle
The backend returns 401 for an authenticated requestThe browser can still show a logged-in shell while the session is no longer validClear client login state and return to the secure console
A license response belongs to a different application than the selected routeThe operator can remain on a page that shows the wrong application's license stateRedirect to the application slug returned by the backend
A license sync succeeds without refreshing the dashboard or application dataThe console can show old license details or miss the version created by the changeRefresh the owning license data and show the backend-selected next step
The available-updates request fails or stallsThe Available Updates section can stay blank until the operator reloads the pageTreat update discovery as a request without retry or polling and account for that state in the feature flow
Ping requests fail through the retry limitThe console cannot trust live status or snapshot progressStop normal polling and show the connection-terminated modal
Upgrade status remains active while the page is closed or refreshedThe operator can miss whether the cluster or application upgrade finishedPoll the task status and keep the status modal open until completion or failure
Upgrade-status pings return transient server errorsThe modal can falsely end the session or stop checking for upgrade completionKeep the polling loop active, retry the ping, resume status reads after recovery, and reserve logout for 401
Configuration conditions do not match the current application stateThe operator can see invalid choices or miss required choicesEvaluate dependent values and filters before rendering configuration groups and items
A preflight response keeps nested result fields serialized or malformedThe console cannot turn the response into usable check stateNormalize the response before display and reject responses that remain unparsed
Preflight polling treats a notice-only completion as runningThe operator can see a warning flow continue to poll after the check is completeTreat a notice without collection errors as a completed result
Preflight collection errors stop polling before a later result is availableThe operator can remain blocked by a temporary collection errorContinue polling while collection errors have no completed analyzer results

Key files

FileWhy to read it
web/…/index.tsxShows the browser entry point and the split between the main console and upgrade service.
web/…/Root.tsxShows the main shell, shared providers, global state, route areas, polling, and global failure surfaces.
web/…/AppDetailPage.tsxShows the selected-application shell, nested route context, application refresh, and deployment-related state.
web/…/SecureAdminConsole.tsxShows the login choices and the route decision after authentication.
web/…/NavBar.tsxShows how installation capabilities shape the top-level navigation.
web/…/SubNavBar.jsxShows how application-level navigation maps operator views to routes.
web/…/ToastContext.tsxShows the shared message state used by feature screens.
web/…/getMetadata.jsxShows the server-backed metadata query model.
web/…/ConfigService.jsShows the shared rules for dependent and filtered configuration visibility.
web/…/AppLicense.tsxShows application license display, sync and upload actions, license replacement, service account token replacement, and next-step guidance.
web/…/DashboardLicenseCard.tsxShows the dashboard entry point for license sync or upload and its refresh handoff.
web/…/AppVersionHistory.tsxShows how version history connects update discovery, deployment actions, progress state, and upgrade-service status.
web/…/UpgradeStatusModal.tsxShows upgrade-status polling, connection recovery, and the distinction between transient API errors and unauthorized sessions.
web/…/UpgradeStatusModal.test.tsxShows the expected recovery behavior after repeated server errors and the logout behavior for 401.
web/…/usePreflightResults.tsShows the shared backend read, normalization, polling, and display state for preflight checks.
web/…/getPreflightResult.tsxShows the application preflight endpoint used by installation flows.
web/…/getPreflightResult.tsxShows the upgrade-service preflight endpoint using the shared result flow.
web/…/types.tsShows the backend result states and the common preflight display contract.
web/…/getPreflightResult.test.tsxShows the expected polling and error-recovery behavior for both preflight journeys.
web/…/utilities.jsShows shared preflight summary state and browser session helpers.
web/…/postPreflightRun.tsxShows how a backend action invalidates related server data.
web/…/postDeployAppVersion.tsxShows the deploy action boundary and the route change after success.
web/…/UpgradeService.tsxShows the focused upgrade journey and its step model.
web/package.jsonShows the browser app's runtime libraries, dependency resolutions, and commands for local development, validation, and tests.
web/webpack.config.jsShows build-environment selection, injected browser values, module resolution, asset handling, and the browser bundle's shared build plugins.
web/yarn.lockShows the resolved dependency set used to reproduce the browser toolchain defined by the package manifest.