kubernetes/kops · error
unable to find Network ID %q
Error message
unable to find Network ID %q
What it means
Shared-VPC resolution failure in PerformAssignments on AWS: the cluster uses a shared VPC (networkID set) with no explicit NetworkCIDR, and FindVPCInfo returned nil — meaning no VPC with that ID is visible to the credentials in use, so its CIDR cannot be adopted.
Source
Thrown at upup/pkg/fi/cloudup/defaults.go:86
if cloud == nil {
return fmt.Errorf("cloud cannot be nil")
}
if cloud.ProviderID() == kops.CloudProviderGCE {
if err := gce.PerformNetworkAssignments(ctx, c, cloud); err != nil {
return err
}
}
if cloud.ProviderID() == kops.CloudProviderAWS && c.Spec.Networking.NetworkCIDR == "" {
if c.SharedVPC() {
vpcInfo, err := cloud.FindVPCInfo(c.Spec.Networking.NetworkID)
if err != nil {
return err
}
if vpcInfo == nil {
return fmt.Errorf("unable to find Network ID %q", c.Spec.Networking.NetworkID)
}
c.Spec.Networking.NetworkCIDR = vpcInfo.CIDR
if c.Spec.Networking.NetworkCIDR == "" {
return fmt.Errorf("unable to infer NetworkCIDR from Network ID, please specify --network-cidr")
}
} else {
// TODO: Choose non-overlapping networking CIDRs for VPCs, using vpcInfo
c.Spec.Networking.NetworkCIDR = defaultAWSNetworkCIDR
}
// Amazon VPC CNI uses the same network
if c.Spec.Networking.AmazonVPC != nil && c.Spec.Networking.NonMasqueradeCIDR != "::/0" {
c.Spec.Networking.NonMasqueradeCIDR = c.Spec.Networking.NetworkCIDR
}
}
if cloud.ProviderID() == kops.CloudProviderAzure && c.Spec.Networking.NetworkCIDR == "" {
if c.SharedVPC() {View on GitHub (pinned to 4c8573c808)
Solutions
- Verify the NetworkID is a correct existing VPC ID
- Grant the kOps IAM user access to describe the shared VPC in the network account
- Or set --network-cidr explicitly to skip the lookup
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at upup/pkg/fi/cloudup/defaults.go:86 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/fdb8adaa6447adb3.
Report an issue: GitHub.