kubernetes/kops · error
error while waiting for instance to be running: %v
Error message
error while waiting for instance to be running: %v
What it means
WaitForInstanceRunning polls DescribeInstance while waiting for a master to boot; the describe call itself failed (permissions, invalid instance id, throttling) and the AWS error is wrapped.
Source
Thrown at upup/pkg/fi/cloudup/awsup/aws_apitarget.go:125
}
if len(extra) != 0 {
klog.V(4).Infof("removing tags from %q: %v", ResourceArn, extra)
err := t.Cloud.RemoveELBV2Tags(ResourceArn, extra)
if err != nil {
return fmt.Errorf("error removing tags from ELBV2 %q: %v", ResourceArn, err)
}
}
return nil
}
func (t *AWSAPITarget) WaitForInstanceRunning(instanceID string) error {
attempt := 0
for {
instance, err := t.Cloud.DescribeInstance(instanceID)
if err != nil {
return fmt.Errorf("error while waiting for instance to be running: %v", err)
}
if instance == nil {
// TODO: Wait if we _just_ created the instance?
return fmt.Errorf("instance not found while waiting for instance to be running")
}
state := "?"
if instance.State != nil {
state = string(instance.State.Name)
}
if state == "running" {
return nil
}
klog.Infof("Waiting for instance %q to be running (current state is %q)", instanceID, state)
time.Sleep(10 * time.Second)
attempt++View on GitHub (pinned to 4c8573c808)
Solutions
- Check ec2:DescribeInstances permissions for the credentials in use
- Verify the instance id still exists in the region
- Retry the operation for transient errors
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at upup/pkg/fi/cloudup/awsup/aws_apitarget.go:125 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/11ce609aa91f4c10.
Report an issue: GitHub.