kubernetes/kops · error

%s must be set for bare metal

Error message

%s must be set for bare metal

What it means

GetApiIngressStatus validation for bare metal: fires when cluster.Spec.API.PublicName (the public DNS name pointing at the metal API endpoint) is empty, since API ingress status cannot be computed without it. The message interpolates the empty name.

Source

Thrown at upup/pkg/fi/cloudup/metal/cloud.go:141

}

// FindClusterStatus discovers the status of the cluster, by inspecting the cloud objects
func (c *Cloud) FindClusterStatus(cluster *kops.Cluster) (*kops.ClusterStatus, error) {
	// etcdStatus, err := findEtcdStatus(c, cluster)
	// if err != nil {
	//      return nil, err
	// }
	klog.Warningf("method metal.Cloud::FindClusterStatus stub-implemented")
	return &kops.ClusterStatus{
		// EtcdClusters: etcdStatus,
	}, nil
}

func (c *Cloud) GetApiIngressStatus(cluster *kops.Cluster) ([]fi.ApiIngressStatus, error) {
	var ret []fi.ApiIngressStatus
	publicName := cluster.Spec.API.PublicName
	if publicName == "" {
		return ret, fmt.Errorf("%s must be set for bare metal", kops.HumanPathForClusterField("spec.api.publicName"))
	}
	ip := net.ParseIP(publicName)
	if ip == nil {
		ret = append(ret, fi.ApiIngressStatus{
			Hostname: publicName,
		})
	} else {
		ret = append(ret, fi.ApiIngressStatus{
			IP: publicName,
		})
	}
	return ret, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Set spec.api.publicName in the cluster spec for bare-metal clusters
  2. Ensure the public name resolves to the API server's address
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/metal/cloud.go:141 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/5e00fe82177cc96d. Report an issue: GitHub.