{"record":{"id":"2e9eb080f1360794","repo":"kubernetes/kops","slug":"error-building-kube-proxy-manifest-v","errorCode":null,"errorMessage":"error building kube-proxy manifest: %v","messagePattern":"error building kube-proxy manifest: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nodeup/pkg/model/kube_proxy.go","lineNumber":51,"sourceCode":"// KubeProxyBuilder installs kube-proxy\ntype KubeProxyBuilder struct {\n\t*NodeupModelContext\n}\n\nvar _ fi.NodeupModelBuilder = &KubeProxyBuilder{}\n\n// Build is responsible for building the kube-proxy manifest\n// @TODO we should probably change this to a daemonset in the future and follow the kubeadm path\nfunc (b *KubeProxyBuilder) Build(c *fi.NodeupModelBuilderContext) error {\n\tif b.NodeupConfig.KubeProxy == nil {\n\t\tklog.V(2).Infof(\"Kube-proxy is disabled, will not create configuration for it.\")\n\t\treturn nil\n\t}\n\n\t{\n\t\tpod, err := b.buildPod()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error building kube-proxy manifest: %v\", err)\n\t\t}\n\n\t\tpod.ObjectMeta.Labels[\"kubernetes.io/managed-by\"] = \"nodeup\"\n\n\t\tmanifest, err := k8scodecs.ToVersionedYaml(pod)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error marshaling manifest to yaml: %v\", err)\n\t\t}\n\n\t\tc.AddTask(&nodetasks.File{\n\t\t\tPath:     \"/etc/kubernetes/manifests/kube-proxy.manifest\",\n\t\t\tContents: fi.NewBytesResource(manifest),\n\t\t\tType:     nodetasks.FileType_File,\n\t\t})\n\t}\n\n\t{\n\t\tvar kubeconfig fi.Resource","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/nodeup/pkg/model/kube_proxy.go#L33-L69","documentation":"KubeProxyBuilder.Build creates the kube-proxy static pod manifest. It first calls b.buildPod(); if that fails the error is wrapped as 'error building kube-proxy manifest'. This is a wrapper around any failure constructing the kube-proxy pod spec — most commonly the KubeProxy config being missing (see the 'KubeProxy not configured' error).","triggerScenarios":"b.buildPod() returns an error during kops update / nodeup execution on a node, which is then wrapped and propagated out of Build. buildPod fails when b.NodeupConfig.KubeProxy is nil, or when subsequent flag/iptables-nftables setup fails.","commonSituations":"Nodeup config (kube-environment or nodeup config file) generated without a kubeProxy section — e.g. outdated nodeup running against a newer cluster config; corrupted or truncated NodeupConfig; cluster specs where kubeProxy was removed inadvertently.","solutions":["Re-run `kops update cluster --yes` and `kops rolling-update cluster` so nodeup and its config are regenerated from the current cluster spec","Check the NodeupConfig passed to nodeup contains a non-nil kubeProxy section","Ensure the nodeup binary version matches the kops version that produced the config","Inspect the wrapped %v detail to see the underlying buildPod error"],"exampleFix":"// before (stale nodeup on the node)\nssh node 'sudo nodeup --config=/etc/kubernetes/nodeup.json'\n// after\nkops update cluster --yes\nkops rolling-update cluster --yes   # re-pushes matching nodeup + NodeupConfig","handlingStrategy":"try-catch","validationCode":"if b.NodeupConfig == nil || b.NodeupConfig.KubeProxy == nil {\n    return fmt.Errorf(\"kube-proxy section missing from NodeupConfig\")\n}","typeGuard":"func isKubeProxyBuildErr(err error) bool {\n    return err != nil && strings.Contains(err.Error(), \"error building kube-proxy manifest\")\n}","tryCatchPattern":"if err := b.Build(c, ...); err != nil {\n    if isKubeProxyBuildErr(err) {\n        log.Printf(\"kube-proxy pod build failed: %v\", err) // inspect wrapped cause\n    }\n    return err\n}","preventionTips":["Always deploy nodeup produced by the same kops version as the cluster","Ensure `kops update cluster --yes` completed before nodeup runs on nodes","Verify NodeupConfig includes a kubeProxy section on every node role","Check wrapped error text to distinguish missing-config vs marshaling causes"],"tags":["go","kubernetes","nodeup","kube-proxy","config"],"backgroundTag":"manifest-build-failed","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}