> ## Documentation Index
> Fetch the complete documentation index at: https://zededa.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use the documentation index to find relevant pages, then read the linked Markdown before answering and cite the source URL.
> Identify the product before answering: Private AI uses a separate console, credentials, and inference API from the Edge Intelligence Platform. Do not apply instructions from one product to the other.
> Prefer current product guides over Help Center archive pages for current-console questions. Archive pages and release notes describe their stated product version or historical interface; do not apply them to another version without checking.
> Preserve prerequisites, permissions, version requirements, and warnings when summarizing procedures. Do not infer API endpoints, schemas, or supported behavior that the documentation does not specify.

# Update a deployment

> PUT /api/v1/cluster/instances/kubernetes/deployments/id/{deploymentId}. Kubernetes API reference.

Sign in to try this endpointExplore the parameters, examples, and responses below. Connect your ZedCloud session when you’re ready to send a request.

> [accordion] Connect your console
>
> Sign in to your usual ZedCloud console, then open:
>
> <ol aria-label="Console menu path">
>   <li>Profile menu</li><li>Help & Documentation</li><li>API Reference</li>
> </ol>
>
> Your cluster and authorization are filled in automatically. No token to copy.
> [More about signing in ](https://zededa.mintlify.site/api-reference/authentication.md#sign-in-to-the-api-reference)

&#x20;Modifying requests stay off until you enable them.

[Authentication](https://zededa.mintlify.site/api-reference/authentication.md) · [API availability](https://zededa.mintlify.site/api-reference/clusters.md) · [Download OpenAPI](https://zededa.mintlify.site/openapi/services/kubernetes.json)

> [!WARNING]
>
> This operation can change resources or access. After signing in, open **API request settings** and select **Enable modifying requests**, then **Apply settings**, to use its playground. Check the request body and destination before selecting **Send**. Your existing API permissions still apply.

Successfully updated deployment
Bad Request. Invalid deployment configuration or ID format.
Unauthorized. Authentication credentials are missing or invalid.
Forbidden. User does not have permission to update this deployment.
Not Found. Deployment with the specified ID does not exist.
Conflict. Update conflicts with current deployment state.
Internal Server Error. Failed to update deployment due to server error.
An unexpected error response.


## OpenAPI

````yaml openapi/services/kubernetes.json PUT /v1/cluster/instances/kubernetes/deployments/id/{deploymentId}
openapi: 3.0.0
info:
  title: ZEDEDA Kubernetes Service
  description: >-
    The ZEDEDA Kubernetes Service provides APIs for managing Kubernetes
    deployments and Helm charts in edge clusters.
  termsOfService: https://www.zededa.com/terms
  version: '1.0'
  contact:
    name: ZEDEDA API Support
    url: https://www.zededa.com/support
    email: support@zededa.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://{apiHost}/api
    variables:
      apiHost:
        default: invalid.invalid
        description: Connect from ZedUI to supply your verified API destination.
security:
  - ApiKeyAuth: []
tags:
  - name: KubernetesDeployments
    description: APIs for managing Kubernetes deployments
  - name: HelmChartManagement
    description: >-
      APIs for managing Helm charts in Kubernetes clusters. Provides operations
      for importing, creating, updating, deleting, and retrieving Helm charts
      from both global and enterprise-specific repositories.
  - name: KubernetesGitOps
    description: >-
      APIs for managing GitOps configurations and continuous deployment from Git
      repositories to Kubernetes clusters
  - name: PrivateHelmRepositories
    description: >-
      APIs for managing private Helm repositories and their authentication
      configurations
  - name: KubernetesSecrets
    description: >-
      APIs for managing Kubernetes secrets including SSH keys, basic
      authentication credentials, and other sensitive data. Supports create,
      read, and list operations.
  - name: ZKSClusterInstances
    description: >-
      APIs for managing ZKS (ZEDEDA Kubernetes Service) cluster instances
      including creation, management, node operations, and status monitoring
  - name: ClusterGroups
    description: >-
      APIs for managing cluster groups including creation, deletion, status
      monitoring, and manifest generation
  - name: KubernetesSnapshots
    description: APIs for managing etcd snapshots on Kubernetes clusters
  - name: KubernetesDashboard
    description: >-
      APIs for the embedded Kubernetes dashboard — SA-scoped proxy, kubeconfig
      download, and cluster-shell WebSocket
externalDocs:
  description: ZEDEDA Kubernetes Management Documentation
  url: https://help.zededa.com/hc/en-us/categories/39343791302299-Edge-Kubernetes
paths:
  /v1/cluster/instances/kubernetes/deployments/id/{deploymentId}:
    put:
      tags:
        - KubernetesDeployments
      summary: Update a deployment
      description: >-
        Update an existing Kubernetes deployment configuration. This can include
        updating Helm chart values, changing target clusters, or modifying
        deployment metadata.


        **Example Request:**

        ```

        PUT /v1/cluster/instances/kubernetes/deployments/id/dep-abc123

        ```


        ```json

        {
          "deployment_id": "dep-abc123",
          "deployment_request": {
            "type": "HELMCHART",
            "metadata": {
              "name": "nginx-deployment",
              "title": "NGINX Web Server - Updated",
              "description": "Updated NGINX deployment with SSL configuration",
              "project_id": "proj-12345"
            },
            "data": {
              "helm_chart_data": {
                "chart": {
                  "name": "nginx",
                  "version": "15.5.0",
                  "custom_values": {
                    "replicaCount": 5,
                    "service": {
                      "type": "LoadBalancer",
                      "port": 80
                    },
                    "ingress": {
                      "enabled": true,
                      "hosts": ["nginx.example.com"],
                      "tls": {
                        "enabled": true,
                        "secretName": "nginx-tls"
                      }
                    }
                  },
                  "repo_identifier": "bitnami"
                },
                "target_clusters": {
                  "is_multi_cluster": false,
                  "cluster_metadata": {
                    "cluster_id": "cluster-abc123",
                    "orchestrator_cluster_id": "rancher-cluster-123",
                    "cluster_name": "production-k8s",
                    "kube_version": "v1.28.0"
                  }
                }
              }
            }
          }
        }

        ```


        **Example Response:**

        ```json

        {
          "operationType": "OPS_TYPE_UNSPECIFIED",
          "operationStatus": "OPS_STATUS_UNSPECIFIED",
          "objectKind": "",
          "objectId": "dep-abc123",
          "objectName": "nginx-deployment",
          "objectRevision": "",
          "objectType": "OBJECT_TYPE_UNSPECIFIED",
          "operationTime": "",
          "startTime": "",
          "endTime": "",
          "user": "",
          "httpStatusCode": 200,
          "httpStatusMsg": "",
          "jobId": "",
          "error": [
            {
              "ec": "zMsgSucess",
              "location": "",
              "details": ""
            }
          ]
        }

        ```
      operationId: KubernetesDeployments_UpdateDeployment
      parameters:
        - name: deploymentId
          description: >-
            Unique identifier of the deployment to update (required). Example:
            'dep-abc123'
          in: path
          required: true
          schema:
            type: string
        - name: X-Request-Id
          in: header
          required: false
          description: User-Agent specified id to track a request
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Updated deployment configuration (required)
              allOf:
                - $ref: '#/components/schemas/DeploymentRequest'
        description: Updated deployment configuration (required)
        required: true
      responses:
        '200':
          description: Successfully updated deployment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZsrvResponse'
        '400':
          description: Bad Request. Invalid deployment configuration or ID format.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZsrvResponse'
        '401':
          description: Unauthorized. Authentication credentials are missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZsrvResponse'
        '403':
          description: Forbidden. User does not have permission to update this deployment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZsrvResponse'
        '404':
          description: Not Found. Deployment with the specified ID does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZsrvResponse'
        '409':
          description: Conflict. Update conflicts with current deployment state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZsrvResponse'
        '500':
          description: >-
            Internal Server Error. Failed to update deployment due to server
            error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ZsrvResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googlerpcStatus'
components:
  schemas:
    DeploymentRequest:
      type: object
      properties:
        type:
          description: >-
            Type of deployment (required). Currently only 'HELMCHART' is
            supported.
          allOf:
            - $ref: '#/components/schemas/K8sDeploymentType'
        metadata:
          description: Metadata for the deployment (required)
          allOf:
            - $ref: '#/components/schemas/Metadata'
        data:
          description: Data for the deployment (required)
          allOf:
            - $ref: '#/components/schemas/DeploymentData'
      description: Deployment create request
      title: Deployment create request
      required:
        - type
        - metadata
        - data
    ZsrvResponse:
      type: object
      properties:
        operationType:
          title: |-
            Describes one of the operations type : possible values
                                    Read/Delete/Create/Update/List
          allOf:
            - $ref: '#/components/schemas/ZcOpsType'
        operationStatus:
          title: if this is log running job
          allOf:
            - $ref: '#/components/schemas/ZcOpsStatus'
        objectKind:
          type: string
          title: zedcloud object kind on which the operation was performed
        objectId:
          type: string
          title: Unique value identifies the object that was operated on
        objectName:
          type: string
          title: name of the object
        objectRevision:
          type: string
          title: |-
            object revision post the operation, note Read operation
            doesn't change the revision
        objectType:
          $ref: '#/components/schemas/ObjectType'
        operationTime:
          type: string
          title: time of operation
        startTime:
          type: string
          title: total time taken by operations
        endTime:
          type: string
        user:
          type: string
          title: the operation is performed on behalf of this user
        httpStatusCode:
          type: integer
          format: int32
          title: http response
        httpStatusMsg:
          type: string
          title: summary of the error in text format
        jobId:
          type: string
          title: for tracking asynchronous tasks
        error:
          type: array
          items:
            $ref: '#/components/schemas/ZsrvError'
          title: |-
            one or more errors will be set if the operation failed
            i.e. httpStatusCode != 2xx
    googlerpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    K8sDeploymentType:
      type: string
      enum:
        - K8sDeploymentType_UNSPECIFIED
        - HELMCHART
      default: K8sDeploymentType_UNSPECIFIED
    Metadata:
      type: object
      properties:
        name:
          type: string
          description: 'Name of the deployment. Example: ''nginx-deployment'''
        title:
          type: string
          description: 'Human-readable title of the deployment. Example: ''NGINX Web Server'''
        description:
          type: string
          description: >-
            Description of the deployment. Example: 'Production NGINX deployment
            with custom configuration'
        projectId:
          type: string
          description: Project ID associated with the deployment
      description: Metadata for the deployment
      title: Metadata for deployment
      required:
        - name
        - projectId
    DeploymentData:
      type: object
      properties:
        helmChartData:
          description: Helm chart data for the deployment
          allOf:
            - $ref: '#/components/schemas/HelmChartData'
      description: Data for the deployment
      title: Deployment data
      required:
        - helmChartData
    ZcOpsType:
      type: string
      enum:
        - OPS_TYPE_UNSPECIFIED
        - OPS_TYPE_READ
        - OPS_TYPE_DELETE
        - OPS_TYPE_CREATE
        - OPS_TYPE_UPDATE
        - OPS_TYPE_LIST
      default: OPS_TYPE_UNSPECIFIED
      title: ZedCloud internal operation type
    ZcOpsStatus:
      type: string
      enum:
        - OPS_STATUS_UNSPECIFIED
        - OPS_STATUS_PENDING
        - OPS_STATUS_ONGOING
        - OPS_STATUS_COMPLETE
      default: OPS_STATUS_UNSPECIFIED
      description: >-
        - OPS_STATUS_PENDING: In rare cases, system may not start operation when
        it was requested. Client will be notified that operation is PENDING
         - OPS_STATUS_ONGOING: system will start the operation, but at the time response was generated, operation is still ONGOING.
         - OPS_STATUS_COMPLETE: Even if the result of the operations may result in failure, but the OpsStatus will marked COMPLETE for almost all cases.
      title: ZedCloud internal operation status
    ObjectType:
      type: string
      enum:
        - OBJECT_TYPE_UNSPECIFIED
        - OBJECT_TYPE_USER
        - OBJECT_TYPE_EDGE_NODE
        - OBJECT_TYPE_EDGE_APP
        - OBJECT_TYPE_IMAGE
        - OBJECT_TYPE_EDGE_APP_INSTANCE
        - OBJECT_TYPE_PROJECT
        - OBJECT_TYPE_NETWORK
        - OBJECT_TYPE_DATASTORE
        - OBJECT_TYPE_SERVICE
        - OBJECT_TYPE_SERVICE_INSTANCE
        - OBJECT_TYPE_ENTERPRISE
        - OBJECT_TYPE_ROLE
        - OBJECT_TYPE_CREDENTIAL
        - OBJECT_TYPE_NETWORK_INSTANCE
        - OBJECT_TYPE_VOLUME_INSTANCE
        - OBJECT_TYPE_REALM
        - OBJECT_TYPE_AUTHPROFILE
        - OBJECT_TYPE_POLICY
        - OBJECT_TYPE_APP_POLICY
        - OBJECT_TYPE_CLUSTER_INSTANCE
        - OBJECT_TYPE_PLUGIN
        - OBJECT_TYPE_DOC_POLICY
        - OBJECT_TYPE_ORCHESTRATOR_CLUSTER
        - OBJECT_TYPE_TAGS
        - OBJECT_TYPE_EDGE_NODE_INTERFACE
        - OBJECT_TYPE_DEPLOYMENT
        - OBJECT_TYPE_ENTITLEMENTS
        - OBJECT_TYPE_DATA_STREAM
        - OBJECT_TYPE_API_USAGE
        - OBJECT_TYPE_APP_INSTANCE_SNAPSHOT
        - OBJECT_TYPE_PATCH_ENVELOPE
        - OBJECT_TYPE_RESOURCE_USAGE_TRACK
        - OBJECT_TYPE_PATCH_ENVELOPE_REFERENCE
        - OBJECT_TYPE_DEV_PASSTHROUGH
        - OBJECT_TYPE_EDGE_NODE_CLUSTER
        - OBJECT_TYPE_ASSET_GROUP
        - OBJECT_TYPE_APP_PROFILE
        - OBJECT_TYPE_PROFILE_DEPLOYMENT
        - OBJECT_TYPE_ZKS_INSTANCE
        - OBJECT_TYPE_CLUSTER_GROUP
      default: OBJECT_TYPE_UNSPECIFIED
    ZsrvError:
      type: object
      properties:
        ec:
          title: |-
            Enumrated error code, describes more granular numerical
            value than just httpStatus
          allOf:
            - $ref: '#/components/schemas/ZsrvErrorCode'
        location:
          type: string
          title: 'Ignore: Internal field only'
        details:
          type: string
          title: Field captures string description of details
    protobufAny:
      type: object
      properties:
        typeUrl:
          type: string
        value:
          type: string
          format: byte
    HelmChartData:
      type: object
      properties:
        chart:
          description: Helm chart details for the deployment
          allOf:
            - $ref: '#/components/schemas/Chart'
        targetClusters:
          description: Target clusters for the deployment
          allOf:
            - $ref: '#/components/schemas/TargetClusters'
      description: Data for the Helm chart deployment
      title: Helm chart data
      required:
        - chart
        - targetClusters
    ZsrvErrorCode:
      type: string
      enum:
        - zMsgErrorNone
        - zMsgSucess
        - NotFound
        - AlreadyExists
        - VersionMismatch
        - RangeError
        - LargeResult
        - IncompleteData
        - InvalidData
        - FunctionUnsupported
        - NoMemory
        - SendFailure
        - Timeout
        - BadReqBody
        - BadReqParam
        - InvalidFieldFormat
        - UrlNotFound
        - ApiVersionNotSupported
        - Unauthorized
        - Forbidden
        - Conflict
        - NotModified
        - DependencyConflict
        - JsonFmtError
        - ProtoFmtError
        - CertError
        - DataBaseConnection
        - DBError
        - zMsgAccepted
        - zMsgCreated
        - PreConditionFailed
        - InternalServerError
      default: zMsgErrorNone
      description: |-
        - zMsgErrorNone: common validation errors
         - IncompleteData: message had fields that weren't filled in
         - InvalidData: message contained the field that wasn't expected
         - FunctionUnsupported: this feature unavailable on this version of device
         - InvalidFieldFormat: message contained the field that wasn't correctly formatted
         - JsonFmtError: Marshal / Unmarshal errors
         - DataBaseConnection: generic DB error
      title: ZedCould internal error code
    Chart:
      type: object
      properties:
        name:
          type: string
          description: 'Name of the Helm chart. Example: ''nginx'''
        version:
          type: string
          description: 'Version of the Helm chart. Example: ''15.4.0'''
        customValues:
          type: object
          description: >-
            Custom values for the Helm chart. Example: {'replicaCount': 3,
            'service': {'type': 'LoadBalancer', 'port': 80}}
        repoIdentifier:
          type: string
          description: 'Repository identifier for the Helm chart. Example: ''bitnami'''
      description: Details of the Helm chart
      title: Helm chart details
      required:
        - name
        - version
    TargetClusters:
      type: object
      properties:
        isMultiCluster:
          type: boolean
          description: 'Indicates if the deployment is for multiple clusters. Example: false'
        clusterTags:
          type: object
          additionalProperties:
            type: string
          description: >-
            Tags for the clusters where the deployment will be applied. Example:
            {'environment': 'production', 'region': 'us-west-2'}. This field is
            reserved for future use and not currently implemented.
        clusterMetadata:
          description: Metadata for the target cluster when is_multi_cluster is false
          allOf:
            - $ref: '#/components/schemas/ClusterMetadata'
      description: Clusters where the deployment will be applied
      title: Target clusters for deployment
      required:
        - isMultiCluster
        - clusterMetadata
    ClusterMetadata:
      type: object
      properties:
        clusterId:
          type: string
          description: 'ID of the target cluster. Example: ''cluster-abc123'''
        orchestratorClusterId:
          type: string
          description: 'Orchestrator cluster ID. Example: ''rancher-cluster-123'''
        clusterName:
          type: string
          description: 'Name of the target cluster. Example: ''production-k8s'''
        kubeVersion:
          type: string
          description: 'Kubernetes version of the target cluster. Example: ''v1.28.0'''
      description: Metadata for the target cluster
      title: Cluster metadata
      required:
        - clusterId
        - orchestratorClusterId
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: Bearer token for the ZedCloud gateway user session

````