What happened:
I used a very simple NodePool. No CapacityType is specified, but the InstanceType is specified. I only used one VSwitch, it is in zone cn-shanghai-b.
spec:
requirements:
- key: kubernetes.io/arch
operator: In
values: [ "amd64" ]
- key: kubernetes.io/os
operator: In
values: ["linux"]
- key: node.kubernetes.io/instance-type
operator: In
values:
- ecs.c7a.4xlarge
However, the provider failed to start the instance because there was no stock in zone B.
{"level":"ERROR","time":"2024-12-25T11:48:21.756Z","logger":"controller","caller":"lifecycle/launch.go:61","message":"failed launching nodeclaim","commit":"935dd24","controller":"nodeclaim.lifecycle","controllerGroup":"karpenter.sh","controllerKind":"NodeClaim","NodeClaim":{"name":"default-qgc6n"},"namespace":"","name":"default-qgc6n","reconcileID":"2c1d3739-1235-4bc5-b75d-b3427cb2e0ae","error":"creating instance, insufficient capacity, requestId: 19691F1C-858F-54AA-80C8-05789EC1XXXX, failed to launch instance: errorCode=NoInstanceStock, errorMessage=The instanceTypes are out of usage"}
Then I added the log. Output InstanceType and CapacityType.
|
capacityType := p.getCapacityType(nodeClaim, instanceTypes) |
|
zonalVSwitchs, err := p.vSwitchProvider.ZonalVSwitchesForLaunch(ctx, nodeClass, instanceTypes, capacityType) |
{"level":"DEBUG","time":"2024-12-25T11:48:21.069Z","logger":"controller","caller":"instance/instance.go:112","message":"launch InstanceType: ecs.c7a.4xlarge, type: spot","commit":"935dd24","controller":"nodeclaim.lifecycle","controllerGroup":"karpenter.sh","controllerKind":"NodeClaim","NodeClaim":{"name":"default-42cbv"},"namespace":"","name":"default-42cbv","reconcileID":"99f4d4f5-d385-4f88-a5b2-a8097258bf8b"}
The results show that it always tries only spot.
What you expected to happen:
OnDemand(postpaid) is available, and is expected to automatically fallback to OnDemand.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
- Karpenter-provider-alibabacloud version (use
git describe --tags --dirty --always):
- AliCloud ACK version:
- Others:
What happened:
I used a very simple NodePool. No CapacityType is specified, but the InstanceType is specified. I only used one VSwitch, it is in zone cn-shanghai-b.
However, the provider failed to start the instance because there was no stock in zone B.
{"level":"ERROR","time":"2024-12-25T11:48:21.756Z","logger":"controller","caller":"lifecycle/launch.go:61","message":"failed launching nodeclaim","commit":"935dd24","controller":"nodeclaim.lifecycle","controllerGroup":"karpenter.sh","controllerKind":"NodeClaim","NodeClaim":{"name":"default-qgc6n"},"namespace":"","name":"default-qgc6n","reconcileID":"2c1d3739-1235-4bc5-b75d-b3427cb2e0ae","error":"creating instance, insufficient capacity, requestId: 19691F1C-858F-54AA-80C8-05789EC1XXXX, failed to launch instance: errorCode=NoInstanceStock, errorMessage=The instanceTypes are out of usage"}Then I added the log. Output InstanceType and CapacityType.
karpenter-provider-alibabacloud/pkg/providers/instance/instance.go
Lines 370 to 371 in a6c5b5f
{"level":"DEBUG","time":"2024-12-25T11:48:21.069Z","logger":"controller","caller":"instance/instance.go:112","message":"launch InstanceType: ecs.c7a.4xlarge, type: spot","commit":"935dd24","controller":"nodeclaim.lifecycle","controllerGroup":"karpenter.sh","controllerKind":"NodeClaim","NodeClaim":{"name":"default-42cbv"},"namespace":"","name":"default-42cbv","reconcileID":"99f4d4f5-d385-4f88-a5b2-a8097258bf8b"}The results show that it always tries only spot.
What you expected to happen:
OnDemand(postpaid) is available, and is expected to automatically fallback to OnDemand.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
git describe --tags --dirty --always):