Update container service Kubernetes resources.

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 header

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 target cluster.
Namespace string No

app-namespace

K8s namespace ID
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

Description in Yaml format

Response parameters

Prameter Type Example Description
Code Integer 200 Code
Message String Success The returned message
RequestId String 7638276 F-****-****-884F-54CC0BC84A8D The ID of the request

Examples

Sample requests

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

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.