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
- Remove the `classic` block from `spec.networking` in your cluster spec.
- Choose a supported networking provider, e.g. add `networking: { calico: {} }` (or kubenet/canal/cilium) and run `kops update cluster`.
- 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
- Audit old cluster specs for `classic:` blocks before kOps upgrade.
- Always declare an explicit supported networking provider in spec.networking.
- Validate specs with `kops get -o yaml` round-trips after migrating from legacy configs.
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
- cannot mix egress values in private or IPv6-capable subnets
- no networking mode set
- validation of the full cluster and instance group specs fail
- error populating configuration: %v
- configuration must include Subnets
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/de2ca8a91cf62504.
Report an issue: GitHub.