概述

本文主要介绍在Kubernetes集群创建失败时,如何查找失败的原因,并解决问题。

详细信息

阿里云提醒您:

  • 如果您对实例或数据有修改、变更等风险操作,务必注意实例的容灾、容错能力,确保数据安全。
  • 如果您对实例(包括但不限于ECS、RDS)等进行配置与数据修改,建议提前创建快照或开启RDS日志备份等功能。
  • 如果您在阿里云平台授权或者提交过登录账号、密码等安全信息,建议您及时修改。

您可以参考以下步骤,通过集群日志查看集群创建失败的报错信息,然后根据相应的解决方法解决问题:

  1. 登录Kubernetes控制台,单击所需的集群右侧的查看日志,查看具体的报错信息。
  2. 通过上一步获取的失败报错信息,参见以下内容进行解决。
    报错信息 解决方法  
    Resource CREATE failed: ResponseException: resources.k8s_SNat_Eip: Elastic IP address quota exceeded Code: QuotaExceeded.Eip 释放多余的EIP或者提交VPC产品的工单提高EIP限额。  
    Resource CREATE failed: ResponseException: resources.k8s_master_slb_internet: The maximum number of SLB instances is exceeded. Code: ORDER.QUANTITY_INVALID 释放多余的SLB实例或者提交SLB产品的工单提高SLB限额。  
    Resource CREATE failed: ResponseException: resources.k8s_vpc: VPC quota exceeded. Code: QuotaExceeded.Vpc 释放多余的VPC或者提交VPC产品的工单提高VPC限额。  
    Status Code: 403 Code: InvalidResourceType.NotSupported Message: This resource type is not supported ECS没有库存或者选择的类型不支持,请选择其他ECS规格重试。  
    Resource CREATE failed: ResponseException: resources.k8s_master_1: The specified image does not support cloud-init. Code: ImageNotSupportCloudInit 使用自定义镜像创建集群,自定义镜像必须是基于最新的CentOS镜像。  
    Resource CREATE failed: ResponseException: resources.k8s_nodes: The resource is out of stock in the specified zone. Please try other types, or choose other regions and zones. Code: OperationDenied.NoStock 当前所选实例规格已售罄,请选择其他可用区或其他实例规格。  
    Resource CREATE failed: ResponseException: resources.k8s_NAT_Gateway: A route entry already exists, which CIDR is '0.0.0.0/0' Code: RouterEntryConflict.Duplicated 当前VPC路由表内已存在默认路由,请移除默认路由,或取消勾选为专有网络创建SNAT后重试。  
    Resource CREATE failed: ResponseException: resources.KubernetesWorkerRole: The number of role is limited to 100. Code: LimitExceeded.Role RequestId: CA59BB8C-5F21-4146-A468-6D4601A55F39:"" RAM角色数量已达到配额限制,请清理部分角色或提交RAM工单提高配额。  
    Resource CREATE failed: ResponseException: resources.k8s_NAT_Gateway: The Account failed to create order. Code: OrderFailed 下单失败,请提交工单咨询。  
    Resource CREATE failed: ResponseException: resources.k8s_master_1: This operation is forbidden by Aliyun RiskControl system. Code: Forbidden.RiskControl 您的账户出现异常,详情请提交工单咨询。  
    Resource CREATE failed: ResponseException: resources.k8s_master_slb_internet: Your account does not have enough balance. Code: PAY.INSUFFICIENT_BALANCE 创建按量付费实例需要您账户余额大于100元,请先充值。  
    Resource CREATE failed: ResponseException: resources.k8s_nodes: Your account does not have enough balance. Code: InvalidAccountStatus.NotEnoughBalance  
    Resource CREATE failed: WaitConditionFailure: resources.k8s_node_cloudinit_wait_cond: See output value for more details. 配置集群出错,请稍后重试或提交工单咨询。  
    Resource CREATE failed: WaitConditionTimeout: resources.k8s_master1_cloudinit_wait_cond: 0 of 2 received:  
    Resource CREATE failed: ResponseException: resources.k8s_master_1: The request processing has failed due to some unknown error. Code: UnknownError 未知错误,请稍后重试或提交工单咨询。  
    Resource CREATE failed: ResponseException: resources.k8s_nodes: The request processing has failed due to some unknown error. Code: UnknownError  
    code:"InsufficientBalance.AgentCredit", msg:"Insufficient agent credit. Please contact your agent." 账号余额不足,请查看账单。  
    Resource CREATE failed: ResponseException: resources.k8s_SNat_Eip: The account is arrearage. Code: ORDER.ARREARAGE 账号余额不足,请查看账单。  
    "errorCode":"ErrManagedAddonRoleNotAttach","errorMsg":"please complete the cluster addon's service ramrole authorization at https://ur.alipay.com/1paTcxSWdAEW70GVH5TZiO,reqId=85DCCF3D-1E34-4E35-90A7-F4DB7A4488DC" 需要给服务做角色授权,登录RAM控制台,选择需要的权限进行授权。  

    code:"InvalidResourceType.NotSupported", msg:"This resource type is not supported. Please try other resource types."

    实例规格库存不足,建议更换实例规格,或者选择多种实例规格。

     

    Resource CREATE failed: ResponseException: resources.k8s_nodes_config: The instance type "\"ecs.cm4.2xlarge\"" is not supported by ess. Code: InvalidInstanceType.NotSupported

     

    code:"Zone.NotOnSale", msg:"The resource in the specified zone is no longer available for sale. Please try other regions and zones."

     

    code:"OperationDenied.NoStock", msg:"The resource is out of stock in the specified zone. Please try other types, or choose other regions and zones."

     

    Resource CREATE failed: ResponseException: resources.k8s_NAT_Gateway: The Account is rejected by risk control system. Code: RISK.RISK_CONTROL_REJECTION

    您的账户出现异常,详情请提交工单咨询。

     

    Resource CREATE failed: ResponseException: resources.k8s_NAT_Gateway: The Account failed to create order. Code: CreateOrderFailed

    创建NAT网关失败,详情请提交工单咨询。

     

    Resource CREATE failed: ResponseException: resources.k8s_NAT_Gateway_SNATEntry: The Eip not in nat gateway Code: EIP_NOT_IN_GATEWAY

    EIP绑定NAT网关失败,建议您重新创建。

     

    Resource CREATE failed: ResponseException: resources.k8s_NAT_Gateway_SNATEntry: The NatGateway instance not exist. Code: InvalidNatGatewayId.NotFound

    NAT网关实例不存在,建议您重新创建。

     

    Resource CREATE failed: ResponseException: resources.k8s_master_slb_Eip: Request was denied due to conflict with a previos request. Code: OperationConflict

    EIP创建失败,建议您重新创建。

     

    Resource CREATE failed: ResponseException: resources.k8s_NAT_Gateway: vpc incorrect status. Code: InvalidVPCStatus

    详情请提交工单咨询。

     

    Resource CREATE failed: ResponseException: resources.k8s_SNat_Eip: Reserve eip failed. Code: ReserveIpFail

    配置SNAT失败,建议您重新创建。

     

    Resource CREATE failed: RetryError: resources.k8s_master_1: RetryError[step check_instance_ids_is_ready failed]:

    ECS启动超时,建议您重新创建。

     

    code:"Instance.StartInstanceFailed", msg:"Instances starting failed."

     

    code:"InvalidInstanceType.ValueUnauthorized", msg:"The specified InstanceType is not authorized."

    详情请提交工单咨询。

     

    Resource CREATE failed: ResponseException: resources.k8s_sg_default_ingress: The specified SecurityGroupId does not exist. Code: InvalidSecurityGroupId.NotFound

    安全组ID不合法。

     

    Resource CREATE failed: ResponseException: resources.k8s_NAT_Gateway_SNATEntry: Operation failed because Some ips in SnatIpPool are not added in CommonBandwidthPackage. Code: OperationFailed.SnatIpsCheck

    详情请提交工单咨询。

     

    Resource CREATE failed: ResponseException: resources.k8s_master_2: The specified InstanceId does not exist. Code: InvalidInstanceId.NotFound

     

    Resource CREATE failed: ResponseException: resources.k8s_master_ssh_internet_vgroup: The specified BackendServers is invalid; some of the specified backend servers do not exist or are not running. Code: ObtainIpFail

    SLB配置后端服务器失败,建议您重新创建。

     

    Resource CREATE failed: ResponseException: resources.k8s_master_slb_listener: Request was denied due to request throttling. Code: Throttling

    相关API限流,详情请提交工单咨询。

     

    Resource CREATE failed: WaitConditionTimeout: resources.k8s_master1_cloudinit_wait_cond: 0 of 2 received:

    部署脚本失败,登录对应ECS实例,执行以下命令,获取日志信息进行排查。

    grep cloud-init /var/log/messages | tee /tmp/attach.log

     

    Resource CREATE failed: StackValidationFailed: resources.k8s_NAT_Gateway: Property error: k8s_NAT_Gateway.Properties.VpcId: vpc-xxx is not exists.:

    VPC不存在,请检查VPC是否存在。

     

    Wait for ce474bf60019e43e99f975865f43874a5 Waitfor cluster master ready  timeout, Error code: ErrWaitForClusterReady

    Kubernetes集群托管版创建Master失败,详情请提交工单咨询。

     

    Resource CREATE failed: ResponseException: resources.k8s_master_slb_Eip: The instance component is invalid. Code: COMMODITY.INVALID_COMPONENT RequestId: AD2DCCA5-09F4-4BE0-B593-EDA8070C8F13:

    EIP不售卖,详情请提交工单咨询。

     

    Resource CREATE failed: ResponseException: resources.k8s_SNat_Eip: eip frequent purchase Code: FrequentPurchase.EIP RequestId: 459A27DD-AD46-4D15-A3FB-2C744B69B4CB:

    EIP购买限流,请稍后重新创建。

     

    code:\"QuotaExceeded.PrivateIpAddress\", msg:\"The specified VSwitch \"vsw-2ze6trd5pz8w5skvsevib\" has not enough IpAddress.

    交换机剩余私网IP数量不足,建议您使用私网IP充足的交换机。

     

    Resource CREATE failed: ResponseException: resources.k8s_NAT_Gateway: NatGateway in one vpc support only one. Code: VPC_ONLY_CAN_CREATE_ONE_NAT_GATEWAY RequestId: A33F3E64-C2A1-44D0-BCEF-30B1B89216F5:

    并发操作导致,请稍后重新创建。

     

    Resource CREATE failed: ResourceCreateFailed: resources.k8s_master_1: Resource "k8s_master_1" creation failed,instances(i-bp1XXX51gak) were deleted unexpectedly.:

    ECS实例不存在,建议重新创建或者提交工单咨询。

     

    Resource CREATE failed: ResponseException: resources.k8s_NAT_Gateway_Bind_Eip: instance not found Code: InvalidParams.NotFound RequestId: E01D9801-60D3-4B0B-B14C-B32CC704A9ED:

    EIP不存在,建议重新创建或者提交工单咨询。

     

    code:"InvalidInstanceType.ValueNotSupported", msg:"The specified instanceType exceeds the maximum limit for the POSTPaid instances."

    ECS实例规格不支持创建,建议提交工单咨询。

     

    code:"InvalidParameter.Encrypted.KmsNotEnabled", msg:"The encrypted disk need enable KMS"

    ECS实例规格不支持创建,建议提交工单咨询。

     

    Resource CREATE failed: ResponseException: resources.k8s_nodes_config: The specified keyPairName does not exist. Code: InvalidKeyPairName.NotFound RequestId: F1B1E00F-D031-449E-A9C7-FACF89F7F08F:""

    ECS实例对应的密钥对不存在,请到ECS控制台添加。

     

    Resource CREATE failed: ResponseException: resources.k8s_nodes_sg: The previous request is still processing. Code: IDEMPOTENCE_PROCESSING RequestId: E46652E8-C0CA-4B4A-BC25-CCBEE6B63DE1:

    不支持并发创建ESS伸缩组,请重新创建。

     

    Resource CREATE failed: ResponseException: resources.k8s_sg: The specified Tag.n.Key is not valid. Code: InvalidTagKey.Malformed RequestId: 978F1855-7AE7-4A71-9A88-DD113A11574B:

    Tag key不合法,请进行修改。

     

    code:"InstanceType.Offline", msg:"The specified InstanceType has been offline."

    该ECS实例规格不售卖,请更换实例规格。

     

    Resource CREATE failed: ResponseException: resources.k8s_nodes_sg: Ess should be authorized in ram to operate user resource. Code: UserNotAuthorizeEss RequestId: 5F03E964-F9F3-4FBD-B825-678B6CC7FA62:

    需要开通ESS并做对应服务授权。

     

    code:"AccountForbidden.ProductCreationLimited", msg:"The commodity must be officially operated by Aliyun and in pay-as-you-go billing method."

    当前账号只能购买后付费实例。

     

    Resource CREATE failed: ResponseException: resources.k8s_nodes: The specified zone does not support vpc network or sold out. Code: ResourceNotAvailable.VPCNetwork RequestId: 380D5E72-0AF3-48C1-B93B-4DF9FC0D3A05:

    当前实例规格已售完,请更换实例规格或地域。

     

    Resource CREATE failed: ResponseException: resources.k8s_nodes_sg: The specified virtual switch does not exist. Code: InvalidVSwitchId.NotFound RequestId: 7DAFB4B1-1B3E-4341-BEE7-F3E0F69AD170:

    交换机不存在,或没有进行ESS服务授权。

     

    Resource CREATE failed: ResponseException: resources.k8s_nodes_config: The specified value of parameter "SystemDiskSize" is not valid. Code: InvalidParameter RequestId: 5E60376B-CB7D-4786-B48F-8C176FD07104:

    系统盘大小不合法。

     

    Resource CREATE failed: ResponseException: resources.KubernetesWorkerRole: The number of role is limited to 100. Code: LimitExceeded.Role RequestId: CA59BB8C-5F21-4146-A468-6D4601A55F39:""

    超过RAM用户创建的限制。

     

    Resource CREATE failed: ResponseException: resources.k8s_nodes_sg: The current status of virtual switch does not support this operation. Code: IncorrectVSwitchStatus RequestId: 38C98BCF-D849-4AFF-9866-D81C1332A7FF:""

    交换机状态异常,建议提交工单咨询。

     

    Resource CREATE failed: WaitConditionFailure: resources.k8s_node_cloudinit_wait_cond: See output value for more details.:

    Jun 25 05:54:23 AliYun cloud-init: + public::common::log '--endpoint must be provided! eg. 192.X.X.1:XX'

    建议提交工单咨询。

     

    Resource CREATE failed: WaitConditionFailure: resources.k8s_master_cloudinit_wait_cond: See output value for more details.:

    Feb  4 18:04:46 bj-mtaq-k8s-image-prod-001 cloud-init: wait for port 22 ready failed.

    Master节点22端口不通,建议提交工单咨询。

     

    Resource CREATE failed: WaitConditionFailure: resources.k8s_master_cloudinit_wait_cond: See output value for more details.:

    Oct 23 08:11:16 iZufXXX68z2lZ cloud-init: [ERROR ImagePull]: failed to pull image registry-vpc.ap-south-1.aliyuncs.com/acs/coredns:1.2.2: output: Error response from daemon: Get https://regiXXXuncs.com/v2/acs/coredns/manifests/1.2.2:Get https://dockXXXyuncs.com/auth?scope=repository%3Aacs%2Fcoredns%3Apull&service=registry.aliyuncs.com%3Aap-south-1%3A26842: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

    镜像拉取超时,建议提交工单咨询。

     

    Resource CREATE failed: WaitConditionFailure: resources.k8s_master_cloudinit_wait_cond: See output value for more details.:Feb 18 18:01:27 iZufXXXz2lZ cloud-init: + docker pull registry-vpXXXcs.com/acs/kube-apiserver:v1.14.8-aliyun.1

    Feb 18 18:01:42 iZufXXX68z2lZ cloud-init: Error response from daemon: Get https://regXXX-gov-1.aliyuncs.com/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

     

    Resource CREATE failed: WaitConditionFailure: resources.k8s_master_cloudinit_wait_cond: See output value for more details.:Nov 14 12:42:11 iZufXXXl68z2lZ cloud-init: + '[' 1 '!=' 0 ']'

    Nov 14 12:42:11 iZufXXXz2lZ cloud-init: + [[ -n --version v2.14.1 ]]

    Nov 14 12:42:11 iZuXXXlZ cloud-init: + echo 'Failed to install helm with the arguments provided: --version v2.14.1'

    安装Helm失败,请重新创建。

     

    Resource CREATE failed: WaitConditionFailure: resources.k8s_master_cloudinit_wait_cond: See output value for more details.:Nov 14 08:37:21 iZuXXXz2lZ cloud-init: ++ date '+[%Y%m%d %H:%M:%S]: '

    Nov 14 08:37:21 iZuf6XXXz2lZ cloud-init: + echo '[20191114' '08:37:21]:' local file run-Kubernetes.tar.gz does not exist, trying to download from '[]'

    拉取部署包超时,请重新创建。

     

    Resource CREATE failed: WaitConditionFailure: resources.k8s_node_cloudinit_wait_cond: See output value for more details.:Nov 21 22:27:56 iZuf6XXX8z2lZ cloud-init: cloud-init: + kubeadm join --node-name eu-central-1.192.X.X.24 --token xxx.xxxx 192.X.X.13:6443 --discovery-token-unsafe-skip-ca-verification

    Nov 21 22:32:56 iZufXXX68z2lZ cloud-init: error execution phase preflight: couldn't validate the identity of the API Server: abort connecting to API servers after timeout of 5m0s

    API Server不通,请重新创建。

     

    Resource CREATE failed: WaitConditionFailure: resources.k8s_master_cloudinit_wait_cond: See output value for more details.:

    Feb  4 15:35:10 iZuf6XXX8z2lZ cloud-init: Failed to start ntpd.service: Unit not found.

    ntpd服务启动失败,请重新创建。

     

    Resource CREATE failed: WaitConditionFailure: resources.k8s_master_cloudinit_wait_cond: See output value for more details.:Nov 14 08:37:21 iZufXXXz2lZ cloud-init: + curl --retry 10 --retry-delay 5 -sSL http://aliacs-kXXXng-internal.aliyuncs.com/public/pkg/run/run-Kubernetes.tar.gz

    Nov 14 08:37:21 iZufXXX8z2lZ cloud-init: + tar -xvf run-Kubernetes.tar.gz

    Nov 14 08:37:21 iZuf6XCXX2lZ cloud-init: tar: This does not look like a tar archive

    下载安装包失败,请重新创建。

     

适用于

  • 容器服务Kubernetes版