tke — Kubernetes Engine
tke · 2018-05-25
CreateClusterEndpoint
POST
Create a cluster access endpoint.
Wire call
Converge Cloud is RPC over HTTP. There is one path — / — and the action travels in the X-TC-Action header. The /tke/CreateClusterEndpoint path used in the OpenAPI document is a documentation convenience so each action is addressable; it is not a route on the server.
curl
curl -sS https://tke.api3.convergecloud.com/ \
-H 'Authorization: TC3-HMAC-SHA256 Credential=<SecretId>/<YYYY-MM-DD>/tke/tc3_request, SignedHeaders=content-type;host;x-tc-action, Signature=<sig>' \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'Host: tke.api3.convergecloud.com' \
-H 'X-TC-Action: CreateClusterEndpoint' \
-H 'X-TC-Version: 2018-05-25' \
-H 'X-TC-Timestamp: <unix-seconds>' \
-H 'X-TC-Region: luzon' \
-d '{"ClusterId":"<ClusterId>"}'Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| ClusterId | string | Yes | Cluster ID |
| SubnetId | string | No | The ID of the subnet where the cluster's port is located (only needs to be entered when the non-public network access is enabled, and must be within the subnet of the cluster's VPC). |
| IsExtranet | boolean | No | Whether public network access is enabled or not (True = public network access, FALSE = private network access, with the default value as FALSE). |
| Domain | string | No | The domain name |
| SecurityGroup | string | No | The security group in use, which must be passed in when public access is enabled. |
| ExtensiveParameters | string | No | LB parameters in a JSON string. It is only required for public network access: {"InternetAccessible":{"InternetChargeType":"TRAFFIC_POSTPAID_BY_HOUR","InternetMaxBandwidthOut":200},"VipIsp":"","BandwidthPackageId":""}. |
Response
Fields are returned inside the Response envelope. Converge Cloud answers HTTP 200 for errors as well as successes, so read Response.Error rather than the status code — and test for the presence of that object, because Code is occasionally the empty string.
| Field | Type | Description |
|---|---|---|
| RequestId | string | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
Success
{
"Response": {
// action-specific fields,
"RequestId": "…"
}
}Error
{
"Response": {
"Error": { "Code": "…", "Message": "…" },
"RequestId": "…"
}
}Try it
CredentialThe key never leaves this tab — it signs the request here. The signed request goes to /api-relay/tke.
Request bodyvalid JSONPOST tke.api3.convergecloud.com · CreateClusterEndpoint
What failure looks like
Example error responses for this action. Match on Code.
Recorded error 1
{
"Response": {
"RequestId": "cc43b62b-c4f5-7acd-e408-0e2c7fe08327",
"Error": {
"Code": "InternalError",
"Message": "Phase 2 [getClusterInformation]: get cluster cls-00000000 failed ,err: clusters.platform.tkestack.io \"cls-00000000\" not found"
}
}
}Recorded error 2
{
"Response": {
"RequestId": "8cb5bb80-c7ca-ed61-d133-b2fda6b632f8",
"Error": {
"Code": "InternalError",
"Message": "Phase 2 [getClusterInformation]: get cluster cls-00000000 failed ,err: clusters.platform.tkestack.io \"cls-00000000\" not found"
}
}
}