> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/references/october2026/interfaces/apps/deploy-a-data-application.md).

# Deploy a data application

Deploy a containerized application on DataOS with an app Resource, expose it through an integrated Service, and register it in the catalog.

An App deploys a containerized application on DataOS, exposes it through an integrated Service, and registers it in the catalog.

## App manifest structure

```
App resource
├── Resource envelope
└── spec
    ├── Placement and capacity
    ├── service
    │   ├── Container runtime
    │   ├── HTTP and ingress
    │   ├── OIDC, CORS, and rate limits
    │   └── Scaling, metrics, and storage
    └── app
        ├── Catalog metadata
        ├── Open action
        └── Visibility
```

## Resource envelope

| Key           | Required | Description                                   |
| ------------- | -------: | --------------------------------------------- |
| `version`     |      Yes | Resource schema version, currently `v1alpha`. |
| `type`        |      Yes | Must be `app`.                                |
| `name`        |      Yes | Stable, lowercase machine identifier.         |
| `title`       |      Yes | Human-readable resource title.                |
| `description` |      Yes | Short resource description.                   |
| `owner`       |      Yes | Primary DataOS owner.                         |
| `tags`        |       No | Resource labels.                              |
| `spec`        |      Yes | App-specific configuration.                   |

## Placement and resources

| Key         | Required | Default | Description                         |
| ----------- | -------: | ------- | ----------------------------------- |
| `compute`   |      Yes | None    | Compute cluster that runs the App.  |
| `runAsUser` |      Yes | None    | DataOS workload identity.           |
| `logLevel`  |       No | `INFO`  | Platform logging verbosity.         |
| `replicas`  |      Yes | `1`     | Initial instance count.             |
| `resources` |      Yes | None    | CPU and memory requests and limits. |
| `service`   |      Yes | None    | Runtime configuration.              |
| `app`       |      Yes | None    | Catalog configuration.              |

```yaml
resources:
  requests:
    cpu: 250m
    memory: 256Mi
  limits:
    cpu: 500m
    memory: 512Mi
```

Requests reserve scheduling capacity. Limits cap consumption. Autoscaling works best when requests reflect normal usage.

## Service runtime

| Key               | Required | Description                                                                                                                                                                                |
| ----------------- | -------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `type`            |      Yes | Workload identifier that describes the runtime of the container image, for example `nginx`, `streamlit`, `nextjs`, or `web`. It is not limited to a fixed list; set it to match the image. |
| `image`           |      Yes | Container image; pin a version for reproducibility.                                                                                                                                        |
| `imagePullSecret` |       No | Registry credential for a private image.                                                                                                                                                   |
| `command`         |      Yes | Container executable in list form.                                                                                                                                                         |
| `arguments`       |       No | Ordered command arguments.                                                                                                                                                                 |
| `port`            |      Yes | Container listening port.                                                                                                                                                                  |
| `envs`            |       No | Non-sensitive environment variables.                                                                                                                                                       |
| `secrets`         |       No | DataOS secret references.                                                                                                                                                                  |
| `hostname`        |       No | Internal service hostname.                                                                                                                                                                 |
| `stateful`        |       No | Stateful service behavior.                                                                                                                                                                 |
| `dryRun`          |       No | Dry-run behavior where supported.                                                                                                                                                          |
| `executionMode`   |       No | Runtime execution-mode override.                                                                                                                                                           |
| `workingDirs`     |       No | Writable container directories.                                                                                                                                                            |
| `http`            |       No | Routing and gateway security.                                                                                                                                                              |
| `autoScaling`     |       No | Horizontal scaling.                                                                                                                                                                        |
| `metricEndpoint`  |       No | Metrics port and path.                                                                                                                                                                     |
| `disk`            |       No | Persistent disk configuration.                                                                                                                                                             |

The process must listen on `service.port` and usually bind to `0.0.0.0`.

### Secrets

```yaml
secrets:
  - id: engineering:sales-app-secrets
    contextAlias: appSecret
    optional: false
```

Secret IDs must use `tenant:secret-name`. Never place tokens or passwords in `envs`, browser code, logs, or Git.

### Writable directories

```yaml
workingDirs:
  - id: nginx-cache
    directory: /var/cache/nginx
  - id: nginx-run
    directory: /run
```

Declare every location the image must modify under the stricter runtime security model.

## HTTP and ingress

| Key                           |           Required | Description                                     |
| ----------------------------- | -----------------: | ----------------------------------------------- |
| `http.path`                   | When `http` exists | Dataplane HTTPRoute prefix.                     |
| `http.stripPath`              |                 No | Removes the HTTPRoute prefix before forwarding. |
| `http.noNetworkAuthorization` |                 No | Disables network authorization; use cautiously. |
| `http.ingress`                |                 No | Browser-facing route.                           |
| `http.oidcClient`             |                 No | OIDC integration.                               |
| `http.cors`                   |                 No | Cross-origin policy.                            |
| `http.rateLimit`              |                 No | Gateway request quotas.                         |

Ingress supports `enabled`, `path`, `stripPath`, `appDetailSpec`, and `apiDetailSpec`.

The HTTPRoute path and ingress path are separate; they are not concatenated. For most Apps, set them to the same value.

### Path stripping

With `stripPath: true`, `/nginx` is removed and the application receives `/`. This works well for stock Nginx and root-mounted applications.

With `stripPath: false`, the application receives `/sales` and must serve its HTML, assets, API routes, redirects, and cookies under that prefix.

## Simple App example

This is the smallest useful example for learning the App flow. It uses a public Nginx image, requires no application secret, strips `/nginx-demo`, and lets the container serve its normal root page.

Replace the user, compute, and tenant placeholders before applying it.

```yaml
version: v1alpha
type: app
name: nginx-demo
title: Nginx Demo
description: Simple Nginx application deployed through DataOS.
owner: <your-user-id>
tags:
  - quickstart
  - nginx
spec:
  compute: <compute-name>
  runAsUser: <your-user-id>
  logLevel: INFO
  replicas: 1
  resources:
    requests:
      cpu: 250m
      memory: 256Mi
    limits:
      cpu: 500m
      memory: 512Mi
  service:
    type: nginx
    image: nginx:1.27-alpine
    command:
      - nginx
    arguments:
      - -g
      - daemon off;
    port: 80
    hostname: nginxdemo
    stateful: false
    workingDirs:
      - id: nginx-cache
        directory: /var/cache/nginx
      - id: nginx-run
        directory: /run
    http:
      path: /nginx-demo
      stripPath: true
      ingress:
        enabled: true
        path: /nginx-demo
        stripPath: true
        appDetailSpec: nginx-demo
  app:
    domain: platform
    description: Simple Nginx application for learning the App workflow.
    owners:
      - <your-user-id>
    tags:
      - quickstart
      - nginx
    link:
      title: Open app
      url: /nginx-demo
    visibility:
      scope: tenants
      tenants:
        - <tenant-id>
```

```bash
dataos-ctl resource apply -f app.yaml
dataos-ctl resource get -t app -n nginx-demo
```

The browser opens `/nginx-demo`; ingress removes that prefix; Nginx receives `/` and serves its default page.

## OIDC

OIDC establishes the browser user's identity. It does not automatically authorize features or data access.

| Key             | Description                              |
| --------------- | ---------------------------------------- |
| `enabled`       | Turns OIDC integration on.               |
| `clientId`      | OIDC client identifier.                  |
| `clientSecret`  | OIDC client secret; handle as sensitive. |
| `redirectPaths` | Allowed callback paths, not full URLs.   |

### App example with OIDC

Replace all placeholders and align the callback path with the application.

```yaml
version: v1alpha
type: app
name: sales-portal
title: Sales Portal
description: Authenticated sales application.
owner: <your-user-id>
tags:
  - sales
  - oidc
spec:
  compute: <compute-name>
  runAsUser: <your-user-id>
  replicas: 1
  resources:
    requests:
      cpu: 250m
      memory: 256Mi
    limits:
      cpu: 1
      memory: 1Gi
  service:
    type: web
    image: <registry>/sales-portal:<version>
    imagePullSecret: <registry-secret>
    command:
      - node
    arguments:
      - server.js
    port: 3000
    envs:
      BASE_PATH: /sales-portal
    secrets:
      - id: <tenant-id>:sales-portal-secrets
        contextAlias: appSecret
    hostname: salesportal
    stateful: false
    http:
      path: /sales-portal
      stripPath: false
      ingress:
        enabled: true
        path: /sales-portal
        stripPath: false
        appDetailSpec: sales-portal
      oidcClient:
        enabled: true
        clientId: <oidc-client-id>
        clientSecret: <oidc-client-secret>
        redirectPaths:
          - /sales-portal/auth/callback
  app:
    domain: sales
    description: Authenticated sales application.
    owners:
      - <your-user-id>
    tags:
      - sales
      - oidc
    link:
      title: Open portal
      url: /sales-portal
    visibility:
      scope: tenants
      tenants:
        - <tenant-id>
```

For production, prefer delivering sensitive OIDC values through the platform's approved secret mechanism rather than committing them to the manifest.

## CORS

CORS options include `origins`, `methods`, `headers`, `exposed_headers`, `credentials`, `max_age`, `private_network_access`, `preflight_continue`, and `preflight_status_code`.

Allow only required origins, methods, and headers. Do not combine wildcard origins with credentials.

## Rate limits

Rate-limit options support quotas for `second`, `minute`, `hour`, `day`, `month`, and `year`, plus `policy`, `limit_by`, `header_name`, and `path`.

## Advanced App example

This example combines a private image, tenant-qualified secret, writable directory, OIDC, CORS, rate limiting, autoscaling, metrics, disk, references, and tenant visibility. Replace every placeholder before applying.

```yaml
version: v1alpha
type: app
name: analytics-portal
title: Analytics Portal
description: Production analytics experience.
owner: <your-user-id>
tags:
  - analytics
  - production
spec:
  compute: <compute-name>
  runAsUser: <your-user-id>
  logLevel: INFO
  replicas: 2
  resources:
    requests:
      cpu: 500m
      memory: 512Mi
    limits:
      cpu: 2
      memory: 2Gi
  service:
    type: web
    image: <registry>/analytics-portal:<version>
    imagePullSecret: <registry-secret>
    command:
      - python
    arguments:
      - -m
      - app
    port: 8080
    envs:
      APP_ENV: production
      BASE_PATH: /analytics
    secrets:
      - id: <tenant-id>:analytics-portal-secrets
        contextAlias: appSecret
    hostname: analyticsportal
    stateful: false
    workingDirs:
      - id: app-cache
        directory: /var/cache/app
    http:
      path: /analytics
      stripPath: false
      ingress:
        enabled: true
        path: /analytics
        stripPath: false
        appDetailSpec: analytics-portal
      oidcClient:
        enabled: true
        clientId: <oidc-client-id>
        clientSecret: <oidc-client-secret>
        redirectPaths:
          - /analytics/auth/callback
      cors:
        enabled: true
        options:
          origins:
            - https://<dataos-host>
          methods:
            - GET
            - POST
          headers:
            - Authorization
            - Content-Type
          credentials: true
          max_age: 3600
      rateLimit:
        enabled: true
        options:
          minute: 120
          policy: local
          limit_by: ip
          path: /analytics
    autoScaling:
      enabled: true
      minReplicas: 2
      maxReplicas: 6
      targetCPUUtilizationPercentage: 70
      targetMemoryUtilizationPercentage: 75
    metricEndpoint:
      port: 8080
      path: /metrics
    disk:
      size: 10Gi
      type: standard
      mountPath: /data
  app:
    domain: analytics
    description: Production analytics portal.
    owners:
      - <your-user-id>
    products:
      - analytics-platform
    tags:
      - analytics
      - production
    references:
      - title: User guide
        url: https://example.com/analytics/docs
    link:
      title: Open analytics
      url: /analytics
    visibility:
      scope: tenants
      tenants:
        - <tenant-id>
```

Confirm the target domain schema supports each advanced option before applying; installed domain versions may differ between environments.

## Authentication and authorization

* Use a user token when downstream access should be evaluated as that user.
* Keep App tokens server-side and deliver them through DataOS secrets.
* Browser applications using an App token should call a backend-for-frontend.
* UI permission checks improve usability but are not enforcement.
* Repeat authorization checks on the server when an action occurs.

## App catalog metadata

`spec.app` supports `icon`, `domain`, `description`, `owners`, `products`, `tags`, `references`, `link`, and `visibility`.

App `link.url` must be a path. When omitted, DataOS uses the ingress path, then the HTTP path, then `/`. The link creates no route by itself.

## Visibility

`spec.app.visibility` controls which tenants can discover the App in the catalog. It does not grant access inside the application.

### Omit visibility

`visibility` is optional. If it is omitted, DataOS stores tenant-scoped visibility for the tenant in which the App resource is created:

```yaml
# visibility omitted
```

Equivalent stored behavior:

```yaml
visibility:
  scope: tenants
  tenants:
    - <resource-tenant>
```

Omission is convenient for a tenant-local App. Prefer an explicit object in shared manifests so the intended audience is clear during review.

### Global visibility

```yaml
visibility:
  scope: global
```

The App is discoverable from every tenant. Do not add `tenants` or `pattern`.

### Selected tenants

```yaml
visibility:
  scope: tenants
  tenants:
    - engineering
    - platform
```

The list is required, non-empty, and should contain unique tenant IDs.

### Tenant pattern

```yaml
visibility:
  scope: pattern
  pattern: "eng-*"
```

The App is discoverable from tenant IDs matching the glob pattern.

Replace the string values `visibility: tenant` and `visibility: global` with the object forms above. DataOS normalizes the string `tenant` to the resource tenant and `global` to `scope: global`.

## Deploy and verify

```bash
dataos-ctl resource apply -f app.yaml
dataos-ctl resource get -t app -n <app-name>
```

Verify container health, Service status, ingress, assets, Open action, tenant visibility, authentication, authorization, logs, metrics, and scaling.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://v2.dataos.info/references/october2026/interfaces/apps/deploy-a-data-application.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
