October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

Kubeadm Init Error: Fixing “Error Unmarshaling JSON, json: unknown field”

Fix kubeadm’s strict YAML schema errors by matching the API version, separating InitConfiguration and ClusterConfiguration, and placing podSubnet under networking.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The kubeadm message error unmarshaling JSON: json: unknown field means your YAML contains a key that is not valid for the document’s apiVersion and kind, or the key is nested under the wrong parent. Correct the schema and placement before investigating later preflight or networking errors.

What the unknown-field error means

kubeadm converts YAML to JSON and decodes each document using a strict schema. A key such as metadata or spec is rejected when that key is not defined for the selected kubeadm configuration type, or when a valid key appears at an invalid level.

For example, metadata can be valid in an ordinary Kubernetes object manifest but is not automatically valid in kubeadm’s InitConfiguration, ClusterConfiguration, KubeletConfiguration or KubeProxyConfiguration. Similarly, placing a Kubernetes-style spec block directly below ClusterConfiguration.apiServer produces an unknown-field error because kubeadm expects documented fields such as extraArgs and extraVolumes there.

Fix the configuration in the right order

  1. Check the installed kubeadm version

    Run:

    kubeadm version

    Use the configuration API supported by that binary. Kubernetes documents that kubeadm 1.22 and newer no longer support v1beta1 and older APIs. kubeadm 1.27 and newer no longer support v1beta2 and older APIs. The current reference marks v1beta3 deprecated in favor of v1beta4 and indicates removal in a future release, 1.34 or later. Do not copy an API version from a guide without checking the version installed on your host.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  2. Generate a version-matched starting file

    Use kubeadm’s generated defaults:

    kubeadm config print init-defaults

    Save the output, then remove settings you do not need. This gives you field names and structure appropriate to the binary that generated it.

  3. Separate kubeadm documents

    A configuration file may contain several kubeadm objects. Separate each document with a line containing three hyphens:

    ---

    Each document needs its own apiVersion and kind.

  4. Put node settings in InitConfiguration

    Use InitConfiguration for settings specific to the node running initialization, including nodeRegistration, criSocket, and localAPIEndpoint.advertiseAddress.

  5. Put cluster settings in ClusterConfiguration

    Use ClusterConfiguration for cluster-wide values such as networking, etcd, and control-plane component customization.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  6. Validate API-server customization

    Under apiServer, use kubeadm’s documented properties. For example, extraArgs supplies API-server flags and extraVolumes defines additional mounts. Do not paste a generic Kubernetes resource’s spec object below apiServer.

  7. Run init again

    After correcting the file, run:

    kubeadm init --config kubeadm.yaml

    If kubeadm then reports a host, route, or preflight problem, treat that as a separate failure. An unknown-field warning can be followed by an independent error such as being unable to select an IP from the default routes.

Where pod-network-cidr belongs in kubeadm YAML

In a configuration file, the pod network range is ClusterConfiguration.networking.podSubnet. The equivalent command-line concept is often described as --pod-network-cidr, but the YAML field is named podSubnet.

apiVersion: kubeadm.k8s.io/v1beta4
kind: ClusterConfiguration
networking:
  podSubnet: 10.244.0.0/16
  serviceSubnet: 10.96.0.0/12

The selected range must match the requirements of the container network interface (CNI) you plan to install. The API defines podSubnet as the subnet used by Pods; it is not a top-level key and does not belong under InitConfiguration.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Working two-document example

This skeleton shows the intended separation. Replace the API version and fields with those supported by your installed kubeadm; the example is structural, not a guarantee that every release accepts every property.

apiVersion: kubeadm.k8s.io/v1beta4
kind: InitConfiguration
nodeRegistration:
  criSocket: unix:///run/containerd/containerd.sock
localAPIEndpoint:
  advertiseAddress: 192.0.2.10
---
apiVersion: kubeadm.k8s.io/v1beta4
kind: ClusterConfiguration
networking:
  podSubnet: 10.244.0.0/16
  serviceSubnet: 10.96.0.0/12
apiServer:
  extraArgs:
    authorization-mode: Node,RBAC

Flags or a YAML file?

Approach Best for Trade-off
Command-line flags A simple, one-off initialization with a few settings Less repeatable when many values or components are involved
Version-matched YAML with --config Repeatable builds, multiple configuration types, and reviewable changes Requires strict attention to API versions, document boundaries, and field placement

The preferred kubeadm configuration method is an YAML configuration file passed with --config. A file can include InitConfiguration, ClusterConfiguration, KubeProxyConfiguration, and KubeletConfiguration; only one of InitConfiguration or ClusterConfiguration is mandatory.

Quick checklist

  • Confirm the installed release with kubeadm version.
  • Use an API version supported by that release.
  • Start from kubeadm config print init-defaults.
  • Give every document its own apiVersion and kind.
  • Separate documents with ---.
  • Keep node-local values in InitConfiguration.
  • Keep cluster-wide values, including networking.podSubnet, in ClusterConfiguration.
  • Use kubeadm’s documented apiServer fields instead of a generic spec block.
  • Rerun kubeadm init --config kubeadm.yaml, then handle any subsequent preflight or host-network error independently.

The Bottom Line

An unknown-field error is a kubeadm schema or placement problem: match the API version to your binary, separate the configuration documents, and place podSubnet under ClusterConfiguration.networking.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.