kubernetes/kops · error

failed to retrieve server metadata: %w

Error message

failed to retrieve server metadata: %w

What it means

In the node bootstrap authenticator's CreateToken, the Scaleway instance metadata API GetMetadata call failed. The token is derived from the server's own metadata, so this fires when nodeup runs somewhere that cannot reach the Scaleway metadata service (169.254.42.42) — e.g. outside a Scaleway instance or with metadata blocked.

Source

Thrown at upup/pkg/fi/cloudup/scaleway/scalewaymetadata/authenticator.go:43

	"github.com/scaleway/scaleway-sdk-go/api/instance/v1"
	"k8s.io/kops/pkg/bootstrap"
)

const ScalewayAuthenticationTokenPrefix = "x-scaleway-instance-server-id " //nolint:gosec // This is an authentication scheme prefix, not a credential.

type scalewayAuthenticator struct{}

var _ bootstrap.Authenticator = (*scalewayAuthenticator)(nil)

func NewScalewayAuthenticator() (bootstrap.Authenticator, error) {
	return &scalewayAuthenticator{}, nil
}

func (a *scalewayAuthenticator) CreateToken(body []byte) (string, error) {
	metadataAPI := instance.NewMetadataAPI()
	metadata, err := metadataAPI.GetMetadata()
	if err != nil {
		return "", fmt.Errorf("failed to retrieve server metadata: %w", err)
	}
	return ScalewayAuthenticationTokenPrefix + metadata.ID, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Verify nodeup is running on an actual Scaleway instance
  2. Check that the metadata endpoint is reachable from the node (firewall/network policy)
  3. Retry — the metadata service can be briefly unavailable during boot
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/scaleway/scalewaymetadata/authenticator.go:43 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/7c9b064f9a6951f3. Report an issue: GitHub.