kubernetes/kops · error

classic networking not supported

Error message

classic networking not supported

What it means

kOps removed support for the legacy "classic" networking mode (pre-CNI Kubernetes networking). If the cluster spec's networking.classic field is set (non-nil), BuildOptions rejects the spec outright. This forces users onto supported networking providers (kubenet, CNI, calico, etc.).

Source

Thrown at pkg/model/components/networking.go:42

)

// NetworkingOptionsBuilder adds options for the kubelet to the model
type NetworkingOptionsBuilder struct {
	Context *OptionsContext
}

var _ loader.ClusterOptionsBuilder = &NetworkingOptionsBuilder{}

func (b *NetworkingOptionsBuilder) BuildOptions(o *kops.Cluster) error {
	clusterSpec := &o.Spec
	if clusterSpec.Kubelet == nil {
		clusterSpec.Kubelet = &kops.KubeletConfigSpec{}
	}

	networking := &clusterSpec.Networking

	if networking.Classic != nil {
		return fmt.Errorf("classic networking not supported")
	}

	return nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Remove the `classic` block from `spec.networking` in your cluster spec.
  2. Choose a supported networking provider, e.g. add `networking: { calico: {} }` (or kubenet/canal/cilium) and run `kops update cluster`.
  3. If migrating an old cluster, plan a CNI migration (rolling update) rather than keeping classic networking.

Example fix

// before (cluster spec yaml)
networking:
  classic: {}
// after
networking:
  calico: {}
Defensive patterns

Strategy: validation

Validate before calling

spec, _ := yaml.Marshal(cluster.Spec)
var c kops.ClusterSpec
yaml.Unmarshal(spec, &c)
if c.Networking != nil && c.Networking.Classic != nil {
    return errors.New("spec.networking.classic is no longer supported; choose a CNI provider")
}

Type guard

func usesClassicNetworking(c *kops.Cluster) bool { return c != nil && c.Spec.Networking != nil && c.Spec.Networking.Classic != nil }

Try / catch

if err := optsBuilder.BuildOptions(cluster); err != nil {
    if strings.Contains(err.Error(), "classic networking not supported") {
        // migrate spec.networking to calico/canal/cilium, then retry
    }
}

Prevention

When it happens

Trigger: A cluster spec YAML contains `networking: { classic: {} }` (or classic: true) and the user runs kops commands that build the model (create/replace/update cluster).

Common situations: Upgrading very old clusters/specs from Kubernetes 1.5-era configs; copying an ancient manifest; a tool generating specs with classic networking defaults.

Related errors


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/de2ca8a91cf62504. Report an issue: GitHub.