kubernetes/kops · error
kops-controller returned status code %d: %s
Error message
kops-controller returned status code %d: %s
What it means
kops-controller answered the bootstrap request with a non-OK, non-Conflict status; the first line of the response body is included as detail. Conflict is handled separately (graceful exit), so this is a server-side rejection such as 403 for an untrusted node token.
Source
Thrown at pkg/kopscontrollerclient/client.go:178
if response.Body != nil {
response.Body.Close()
}
os.Exit(0)
}
if response.Body != nil {
defer response.Body.Close()
}
if response.StatusCode != http.StatusOK {
detail := ""
if response.Body != nil {
scanner := bufio.NewScanner(response.Body)
if scanner.Scan() {
detail = scanner.Text()
}
}
return fmt.Errorf("kops-controller returned status code %d: %s", response.StatusCode, detail)
}
return json.NewDecoder(response.Body).Decode(resp)
}
func (b *Client) Close() {
if b.httpClient != nil {
b.httpClient.CloseIdleConnections()
}
}
View on GitHub (pinned to 4c8573c808)
Solutions
- Map the status code: 403 usually means the node's token was rejected (clock skew, unknown signing key)
- Check kops-controller logs for the rejected request
- Re-run nodeup on the node after fixing the cause
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at pkg/kopscontrollerclient/client.go:178 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/9f2227874b8dcef4.
Report an issue: GitHub.