Updates the resources of a Kubernetes cluster.

Note You can modify only deployments.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only the common request header. For more information, see Common request parameters.

Request syntax

POST /pop/v5/oam/update_k8s_resource_config HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
ClusterId String No 2e7059e9-2d********5e8ecac64ff

The ID of the cluster.

Namespace String No app-namespace

The ID of the namespace to which the Kubernetes resources are bound.

ResourceContent String No apiVersion: apps/v1 kind: Deployment metadata: name: demo-app namespace: app-namespace spec: replicas: 3 selector: matchLabels: cluster: abc template: # create pods using pod definition in this template metadata: labels: cluster: abc spec: containers: - image: registry-vpc.cn-hangzhou.aliyuncs.com/edas-demo-image/consumer:1.0 imagePullPolicy: Always name: test-container ports: - containerPort: 80 env: - name: foo value: bar

The description of the update in the YAML format.

Response parameters

Parameter Type Example Description
Code Integer 200

The HTTP status code.

Message String success

The returned message.

RequestId String 7638276F-****-****-884F-54CC0BC84A8D

The ID of the request.

Examples

Sample requests

POST /pop/v5/oam/update_k8s_resource_config HTTP/1.1
Common request header

Sample success responses

XML format

<RequestId>7638276F-****-****-884F-54CC0BC84A8D</RequestId>
<Message>success</Message>
<Code>200</Code>

JSON format

{"RequestId":"7638276F-****-****-884F-54CC0BC84A8D","Message":"success","Code":"200"}

Error codes

For a list of error codes, visit the API Error Center.