---
title: "Deploy an application via an agent"
method: POST
path: "/api/v1/agents/deploy"
tags: ["agents"]
---

# Deploy an application via an agent

`POST /api/v1/agents/deploy`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/agents/deploy`
- Auth: none declared

handles HTTP POST requests to deploy via agent

## Request body

- ServiceDeploymentRequest
  - `annotations` object
  - `app_id` string, required
  - `app_name` string, required
  - `cluster_id` string, required
  - `config_maps` ServiceConfigMapReference[]
    - `items` object: key -> path mapping
    - `mount_path` string
    - `name` string, required
  - `env` object
  - `health_check` ServiceHealthCheckConfig
    - `command` string[]: for exec
    - `failure_threshold` integer: count
    - `initial_delay` integer: seconds
    - `path` string: for http
    - `period_seconds` integer: seconds
    - `port` integer: for http/tcp
    - `success_threshold` integer: count
    - `timeout_seconds` integer: seconds
    - `type` string: http, tcp, exec
  - `image` string, required
  - `labels` object
  - `namespace` string
  - `port` integer, required
  - `replicas` integer
  - `resources` ServiceResourceRequirements
    - `cpu` string
    - `cpu_limit` string
    - `mem_limit` string
    - `memory` string
  - `secrets` ServiceSecretReference[]
    - `items` object: key -> path mapping
    - `mount_path` string
    - `name` string, required
  - `strategy` ServiceDeploymentStrategy
    - `max_surge` string: for RollingUpdate
    - `max_unavailable` string: for RollingUpdate
    - `type` string: RollingUpdate, Recreate, BlueGreen
  - `tag` string, required
  - `volumes` ServiceVolumeMount[]
    - `mount_path` string, required
    - `name` string, required
    - `read_only` boolean
    - `size` string: for PVC
    - `source` string: for hostPath or PVC name
    - `sub_path` string
    - `type` string: emptyDir, hostPath, persistentVolumeClaim

## Response `202`

Accepted

- object

---

[API](https://skmtc.dev/nife/apis/nife-io-swagger-api.md) - [All operations](https://skmtc.dev/nife/apis/nife-io-swagger-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nife/apis/nife-io-swagger-api/revisions/6e868dc62795?raw)
