建立一個虛擬節點(VNode),用於對接自建 Kubernetes 叢集,使其可以擴充資源至 ECI。
介面說明
-
呼叫本介面建立虛擬節點時,系統將自動為您建立一個服務關聯角色 AliyunServiceRoleForECIVnode,用於存取 ECI、ECS、VPC 等相關雲端服務。更多資訊,請參見虛擬節點服務關聯角色。
-
虛擬節點按個數計費。每個虛擬節點會有一個常駐節點,相當於 2 vCPU、8 GiB 的 ECI 執行個體,收取相關 ECI 執行個體費用。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
eci:CreateVirtualNode |
create |
*VirtualNode
|
|
無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
地域 ID。 |
cn-hangzhou |
| ZoneId |
string |
否 |
可用區 ID。 |
cn-hangzhou-b |
| SecurityGroupId |
string |
是 |
安全性群組 ID。虛擬節點以及該虛擬節點下的 ECI 執行個體將加入至該安全性群組中。 |
sg-2ze81zoc3yl7a3we**** |
| VSwitchId |
string |
是 |
交換器 ID。虛擬節點以及虛擬節點下的 ECI 執行個體所使用的交換器。 |
vsw-2ze23nqzig8inprou**** |
| VirtualNodeName |
string |
否 |
虛擬節點的名稱。長度為 2~128 個英文字元,可以包含小寫英文字元、數字、半形句號(.)或連字號(-)。 |
testNode |
| ResourceGroupId |
string |
否 |
資源群組 ID。 |
rg-uf66jeqopgqa9hdn**** |
| ClientToken |
string |
否 |
保證請求冪等性。從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。僅支援 ASCII 字元,且不能超過 64 個字元。更多詳情,請參見如何保證冪等性。 |
123e4567-e89b-12d3-a456-426655440000 |
| EnablePublicNetwork |
boolean |
否 |
是否支援公網。預設為 false。 |
false |
| EipInstanceId |
string |
否 |
彈性公網 IP 的 ID。 |
eip-uf66jeqopgqa9hdn**** |
| KubeConfig |
string |
否 |
虛擬節點要連線的 Kubernetes 叢集的 KubeConfig。需進行 Base64 編碼後傳入。 |
JTVDbmFwaVZlcnNpb24lM0ElMjB2MSU1Q25jbHVzdGVycyUzQSU1Q24tJTIwY2x1c3RlciUzQSU1Q24uLi****** |
| CustomResources |
string |
否 |
虛擬節點支援的自訂資源。如果 ECI Pod 的 request 中宣告了相應的自訂資源,則該 Pod 會被排程至 VNode。
格式為 |
example1.com=100,example2.com=200 |
| ClusterDomain |
string |
否 |
叢集的網域。設定後,除了主機的搜尋網域外,Kubelet 會設定所有容器來搜尋該網域。 |
example.com |
| ClusterDNS |
string |
否 |
DNS 伺服器的 IP 位址。如果 ECI Pod 中設定了 |
100.1.XX.XX |
| Tag |
array<object> |
否 |
虛擬節點標籤資訊。最多可以設定 20 個。 |
|
|
object |
否 |
虛擬節點標籤資訊。 |
||
| Key |
string |
否 |
標籤鍵。 |
name |
| Value |
string |
否 |
標籤值。 |
test |
| Taint |
array<object> |
否 |
虛擬節點污點資訊。最多可以設定 20 個。 |
|
|
object |
否 |
虛擬節點污點資訊。 |
||
| Key |
string |
否 |
污點的 Key。 |
testKey |
| Value |
string |
否 |
污點的 Value。 |
testValue |
| Effect |
string |
否 |
污點的 Effect。取值範圍:
|
NoSchedule |
| TlsBootstrapEnabled |
boolean |
否 |
是否啟用 TLS 啟動引導。啟用後,請使用 TLS 啟動引導的 KubeConfig 憑證。取值範圍:
預設為 false。 |
false |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回資訊。 |
||
| RequestId |
string |
請求 ID。 |
89164E78-FC82-4684-BE97-DCDD85D26546 |
| VirtualNodeId |
string |
虛擬節點 ID。 |
vnd-2ze960zkdqrldeaw**** |
樣本
正常返回樣本
JSON格式
{
"RequestId": "89164E78-FC82-4684-BE97-DCDD85D26546",
"VirtualNodeId": "vnd-2ze960zkdqrldeaw****"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | Account.Arrearage | Your account has an outstanding payment. | 帳號已經欠費。 |
| 400 | DryRunOperation | Request validation has been passed with DryRun flag set. | 此次 DryRun 預檢請求合格。 |
| 400 | InvalidParameter.CPU.Memory | The specified cpu and memory are not allowed | |
| 400 | InvalidParameter.DuplicatedName | The container group include containers with duplicate names. | 容器群組內有重複名稱的容器。 |
| 400 | InvalidParameter.DuplicatedVolumeName | The container group includes volumes with duplicate names. | 容器群組內有重複名稱的資料卷。 |
| 400 | IncorrectStatus | %s | 指定的執行個體狀態不正確。 |
| 400 | ServiceNotEnabled | %s | 該次請求所依賴的服務尚未啟用,請啟用後再試。 |
| 400 | ImageSnapshot.IncorrectStatus | %s | 用於映像快取的快照狀態不正確。 |
| 400 | ImageSnapshot.NotSupport | %s | 基於資料磁碟快照的映像快取功能暫未全面開放,如有需要請聯絡我們。 |
| 400 | DiskVolume.NotSupport | The disk volume is not supported. | 雲端硬碟磁碟區暫不支援,如有需要請聯絡我們。 |
| 400 | RamRole.NotSupport | The RAM role is not supported. | RAM 執行個體角色不支援。 |
| 400 | DiskNumber.LimitExceed | The maximum number of disks in an instance is exceeded. | 執行個體下的雲端硬碟數目超過限制。 |
| 400 | InvalidPaymentMethod.InsufficientBalance | No payment method is specified for your account. We recommend that you add a payment method or add funds to the prepayment balance. | 您的帳戶暫無有效支付方式,請新增支付方式或保持預付款餘額充足。 |
| 400 | DiskVolume.NotInSameZone | The instance to be created and the disk are not in the same zone. | 即將建立的執行個體和雲端硬碟不在同一可用區。 |
| 400 | NoPermission | You are not authorized to use the "Product on ECI" feature. | |
| 400 | HighCpuMemConfigRequired | You need to apply to be added to the whitelist of the specified CPU and memory. | 您需要申請 CPU 高配白名單。 |
| 400 | RecommendEmpty.InstanceTypeFamilyNotMatched | The recommended instance type is unavailable in the current zone. Try again later. | 目前可用區沒有推薦的規格可使用,請稍後重試或者到其他的可用區建立。 |
| 400 | LocalDiskAmountNotMatch | The number of local volumes does not match the instance type. | 本機存放區數量與執行個體規格不匹配。 |
| 400 | Payfor.CreditPayInsufficientBalance | Your payment credit line is insufficient. | 您的付款信用額度不足。 |
| 400 | InvalidOperation.KMS.InstanceTypeNotSupport | The specified instance is invalid. Only I/O optimized instances support KMS key. | 指定的執行個體無效,只有 I/O 最佳化類型的執行個體支援設定「KMS Key」。 |
| 400 | InvalidParameter.Encrypted.KmsNotEnabled | KMS must be enabled for encrypted disks. | 加密磁碟需要啟用金鑰管理服務。 |
| 400 | InvalidParameter.KMS.EncryptedIllegal | After configuring the parameter KmsKeyId, you must enable encryption. | 設定參數「KmsKeyId」後,您必須開啟加密屬性。 |
| 400 | Ipv6AddressNotSupportVsw | IPv6 is not supported in the specified vSwitch. | 該交換器暫未開通 IPv6 位址。 |
| 400 | EipAddressPoolIpNotEnough | The ip address of specified PublicIpAddressPool is not enough. | 指定的 EIP 公網地址池位址資源不足。 |
| 400 | VnodeDedicatedHostIdAlreadyExist | DedicatedHostId:%s of Vnode:%s already exists. | DedicatedHostId 已存在。 |
| 400 | DedicatedHostQuotaExceeded | The quota of DedicatedHost is exceeded. | 專用宿主機的配額超過限制。 |
| 403 | OperationDenied.VswZoneMisMatch | The specified VSwitchId is not in the specified Zone. | |
| 403 | QuotaExceeded | %s quota exceeded. | |
| 403 | Zone.NotOnSale | The specified zone is not available for purchase. | 建立執行個體的可用區已停止銷售,請更換其他可用區;或無法在該可用區使用指定 VPC 的虛擬交換器。 |
| 403 | Forbidden.RiskControl | This operation has been identified as an abnormal operation and cannot be processed. | 此操作已被確定為一個操作異常,無法處理。 |
| 403 | Forbidden.SubUser | The specified action is not available for you. | |
| 403 | Forbidden.OnlyForInvitedTest | Eci create action is only open to invited users during public beta. | |
| 403 | OperationDenied.SecurityGroupMisMatch | The specified VSwitchId and SecurityGroupId are not in the same VPC. | |
| 403 | InvalidVSwitchId.IpNotEnough | The specified VSwitch does not have enough IP addresses. | |
| 403 | Forbidden.UserBussinessStatus | This operation is not allowed, because you have overdue bills. Pay the overdue bill and try again. | 使用者處於欠費狀態不允許建立,請儲值後再嘗試。 |
| 403 | Forbidden.UserNotRealNameAuthentication | This operation is not allowed, because you have not passed the real-name verification. | 操作被禁止,因為使用者尚未進行實名驗證。 |
| 403 | InvalidUser.PassRoleForbidden | The RAM user is not authorized to assume a RAM role. | 子帳號使用者沒有權限使用 RAM 執行個體角色。 |
| 403 | NoPermission | The RAM role does not belong to ECS. | |
| 403 | OperationDenied.NoStock | Sales of this resource are temporarily suspended in the specified zone. We recommend that you use the multi-zone creation function to avoid the risk of insufficient resource. For more information, see https://www.alibabacloud.com/help/document_detail/157290.html | |
| 403 | InvalidParameter.KMS.KeyId.Forbidden | You are not authorized to access the specified KMSKeyId. | 無權存取指定的 KmsKeyId。 |
| 403 | Forbidden.AccountClosed | The operation is forbidden. Your account has been closed. | 操作被禁止,因為使用者帳戶已登出。 |
| 403 | InvalidOperation.ResourceManagedByCloudProduct | The operation is forbidden. The security group has been managed by another cloud product. | 安全性群組由其他雲端產品管理,禁止操作。 |
| 403 | Spot.NotMatched | %s. We recommend that you use the create multi-zone function to avoid insufficient inventory. For more information, see https://www.alibabacloud.com/help/document_detail/157290.html | |
| 403 | SecurityRisk.3DVerification | We have detected a security risk with your default credit or debit card. Please proceed with verification via the link in your email. | 我們偵測到您的預設信用卡或金融卡存在安全風險。請透過電子郵件中的連結進行驗證。 |
| 403 | CreateServiceLinkedRole.Denied | Please make sure the account has ram:CreateServiceLinkedRole permission. | 請確保帳號擁有 ram:CreateServiceLinkedRole 權限。 |
| 404 | ImageSnapshot.NotFound | The specified snapshot does not exist. | 映像快取,快照不存在。 |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. | 指定的雲端硬碟不存在。 |
| 404 | InvalidParameter.KMS.KeyId.NotFound | The specified KMSKeyId does not exist. | 指定的參數「KMSKeyId」不存在。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。