Kubernetes developers often need a local cluster that behaves more like a production environment. A single-node cluster is useful for basic application testing, but it does not provide enough flexibility for testing worker scheduling, node labels, rolling updates, networking, and multi-node application deployments.
Docker Desktop provides a convenient way to run Kubernetes locally. Its integration with kind (Kubernetes IN Docker) allows developers to create multi-node Kubernetes clusters using Docker containers as Kubernetes nodes.
An important change in the kind ecosystem is the adoption of the kubeadm v1beta4 configuration format for Kubernetes 1.36 and later. This format introduces a more structured way to configure component arguments, environment variables, volumes, and other cluster initialization settings.
There is one important distinction: kind's own cluster configuration API remains kind.x-k8s.io/v1alpha4. The v1beta4 format discussed in this article belongs to kubeadm configuration documents embedded inside kind configuration patches. It is not a replacement for kind's top-level API version.
In this article, we will understand the relationship between Docker Desktop, kind, and kubeadm, configure a multi-node cluster, use v1beta4 configuration patches, apply worker-node labels, expose application ports, and validate the resulting Kubernetes environment.
1. What Is kind?
kind stands for Kubernetes IN Docker.
It is a tool for running local Kubernetes clusters using Docker containers as Kubernetes nodes.
Instead of creating multiple virtual machines, kind creates containers that run the Kubernetes node environment.
Each container can act as a control-plane node or a worker node.
Developers commonly use kind for:
- Local Kubernetes development.
- Testing Kubernetes manifests.
- Testing Helm charts.
- CI/CD pipelines.
- Testing controllers and operators.
- Validating multi-node application deployments.
- Testing Kubernetes version compatibility.
A kind cluster uses kubeadm to bootstrap Kubernetes components inside its node containers.
This means kind handles the cluster creation process, while kubeadm performs important Kubernetes initialization and node-joining operations.
How kind Works With Docker Desktop
Docker Desktop provides the Docker Engine and its container environment. kind uses that Docker environment to create Kubernetes node containers.
A simplified architecture looks like this:
Developer
|
v
Docker Desktop
|
v
Docker Engine
|
v
kind CLI
|
+------+------+
| |
v v
Control Plane Worker Nodes
Container Containers
| |
v v
kubeadm kubeadm
| |
+------+------+
|
v
Kubernetes API
|
v
kubectl
|
v
Application Pods
The control-plane container runs Kubernetes control-plane components, while worker containers provide locations where application workloads can be scheduled.
The main advantage is that developers can test multi-node Kubernetes behavior without creating a separate physical server or a collection of full virtual machines.
2. Understand the Difference Between kind v1alpha4 and kubeadm v1beta4
This is the most important concept in this topic.
Both kind and kubeadm use versioned configuration APIs, but they are different APIs with different responsibilities.
kind Configuration API
The top-level kind configuration describes the cluster structure.
It controls:
- Cluster name.
- Node roles.
- Kubernetes node image.
- Networking.
- Port mappings.
- Additional node mounts.
- kubeadm configuration patches.
The current kind configuration format uses:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
This version identifies the kind cluster configuration schema.
kubeadm Configuration API
kubeadm initializes the Kubernetes control plane and joins additional nodes.
Its configuration documents control settings such as:
- API server arguments.
- Controller manager arguments.
- Scheduler arguments.
- Kubelet arguments.
- Node registration.
- Bootstrap tokens.
- Cluster networking.
- Certificate configuration.
Kubernetes 1.36 and later use the kubeadm v1beta4 configuration format.
For example:
apiVersion: kubeadm.k8s.io/v1beta4
kind: ClusterConfiguration
This identifies a kubeadm configuration document, not a kind cluster configuration.
Compare the Two Formats
| Configuration | API version | Responsibility |
|---|
| kind Cluster | kind.x-k8s.io/v1alpha4 | Defines the local cluster and its nodes |
| kubeadm InitConfiguration | kubeadm.k8s.io/v1beta4 | Configures control-plane initialization |
| kubeadm ClusterConfiguration | kubeadm.k8s.io/v1beta4 | Configures cluster-wide Kubernetes components |
| kubeadm JoinConfiguration | kubeadm.k8s.io/v1beta4 | Configures additional node registration |
The kind project supports the v1beta4 kubeadm configuration format when using Kubernetes 1.36.0 and later.
For Kubernetes 1.23 through 1.35, kind retains support for kubeadm v1beta3.
Older Kubernetes releases use their corresponding older configuration versions.
The actual format depends on the Kubernetes version used by the kind node image.
3. Understand What Changed in kubeadm v1beta4
The v1beta4 format introduces a more structured representation for several configuration fields.
One important change concerns extra component arguments.
Earlier kubeadm configuration formats commonly represented extra arguments as a map.
For example, an older configuration could look like this:
apiServer:
extraArgs:
profiling: "false"
event-ttl: "1h"
In v1beta4, extra arguments use a list of name-value objects:
apiServer:
extraArgs:
- name: profiling
value: "false"
- name: event-ttl
value: "1h"
Each argument has an explicit name and value.
This structure also allows duplicate argument names when a component needs multiple values for the same flag.
Important v1beta4 Changes
| Area | Earlier representation | v1beta4 representation |
|---|
| Component extra arguments | Map | List of name-value objects |
| Kubelet extra arguments | Map | List of name-value objects |
| Extra environment variables | Limited map-based representation | Structured list |
| Certificate SAN configuration | Previous configuration structure | Explicitly structured fields |
| Image pull configuration | Previous configuration structure | Includes imagePullSerial |
| Timeouts | Previous timeout settings | Structured timeout configuration |
The v1beta4 format makes these configuration values more explicit and provides additional flexibility.
Why Does This Matter for kind?
kind uses kubeadm internally.
When a kind cluster is created, kind prepares the node environment and executes kubeadm initialization or join operations.
If you customize kubeadm using kind configuration patches, the patch must use the configuration API supported by the Kubernetes version being deployed.
For Kubernetes 1.36 and later, that means using v1beta4.
The kind project also supports automatic translation of older map-based extraArgs and kubeletExtraArgs patches when targeting v1beta4 configurations.
However, using the new list-based format directly is preferable for new configurations.
4. Understand Docker Desktop Kubernetes Provisioning
Docker Desktop provides a Kubernetes interface that allows developers to create local clusters without manually installing every Kubernetes component.
It supports two provisioning methods.
kubeadm Provisioner
The kubeadm provisioner creates a single-node Kubernetes cluster.
It is useful for basic development and testing.
However, it does not provide the same multi-node cluster configuration capabilities as kind.
kind Provisioner
The kind provisioner creates Kubernetes nodes using Docker containers.
It supports multi-node clusters and allows developers to select the Kubernetes version and number of nodes through Docker Desktop's Kubernetes interface.
It is particularly useful for testing application scheduling, worker-node behavior, and cluster configuration.
Docker Desktop Provisioner Comparison
| Feature | kubeadm | kind |
|---|
| Cluster type | Single node | Single or multiple nodes |
| Kubernetes version selection | Managed by Docker Desktop | Selectable |
| Worker nodes | Not supported in this provisioning mode | Supported |
| Multi-node testing | Limited | Supported |
| Provisioning speed | Generally slower | Generally faster |
| Custom kind YAML configuration | Not applicable | Available through kind CLI |
For the detailed configuration examples in this article, we will use the kind CLI with Docker Desktop's Docker Engine.
This is important because the Docker Desktop Kubernetes interface does not directly import an arbitrary kind YAML configuration file. The CLI workflow gives developers access to kind's complete configuration options.
5. Prepare the Development Environment
Before creating a cluster, install the required tools.
| Tool | Purpose |
|---|
| Docker Desktop | Runs the Docker Engine |
| kind | Creates local Kubernetes clusters |
| kubectl | Communicates with Kubernetes |
| PowerShell or terminal | Executes commands |
| YAML editor | Creates cluster configuration files |
Start Docker Desktop and wait until the Docker Engine is running.
Verify Docker:
docker version
Check the Docker context:
docker context show
The context should point to the Docker Engine managed by Docker Desktop.
Check that Docker can run containers:
docker run --rm hello-world
Install kind
On a Windows development machine, kind can be installed using a package manager such as Chocolatey:
choco install kind
Alternatively, install kind using the official release binaries.
Verify the installation:
kind version
Install kubectl
Install kubectl using the official Kubernetes installation instructions.
Verify the installation:
kubectl version --client
You now have the tools required to create and manage a local Kubernetes cluster.
6. Create a Basic kind Cluster
Before introducing custom kubeadm configuration, create a basic cluster.
Run:
kind create cluster --name local-dev
kind downloads the default node image if necessary and creates a control-plane node container.
The command also configures the Kubernetes cluster and updates the kubeconfig context.
Check the cluster:
kubectl cluster-info
List the nodes:
kubectl get nodes
Example output:
NAME STATUS ROLES AGE VERSION
local-dev-control-plane Ready control-plane 2m v1.36.0
The exact node name and Kubernetes version depend on the selected kind release and node image.
This basic cluster is useful for verifying that Docker Desktop, kind, and kubectl are working together.
7. Create a Multi-Node Cluster Using kind
A multi-node cluster allows developers to test how Kubernetes distributes workloads across different nodes.
For example, we can create:
- One control-plane node.
- Two worker nodes.
Create a file named kind-config.yaml.
Add the following configuration:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: development-cluster
nodes:
- role: control-plane
- role: worker
- role: worker
Notice that the top-level API version remains v1alpha4.
This is the correct kind configuration format.
Create the Cluster
Run:
kind create cluster \
--name development-cluster \
--config kind-config.yaml
kind creates three Docker containers:
development-cluster
|
+-------+-------+
| |
v v
Control Plane Worker 1
|
v
Worker 2
Check the nodes:
kubectl get nodes
Expected output will contain one control-plane node and two worker nodes.
The nodes should eventually report Ready.
A multi-node kind cluster is useful for testing Kubernetes scheduling and deployment behavior, but all nodes still share the underlying host machine. It does not provide the same physical isolation or compute capacity as separate production servers.
8. Configure kubeadm v1beta4 Patches in kind
Now we can introduce the v1beta4 configuration format.
kind provides the kubeadmConfigPatches field for customizing how Kubernetes nodes are initialized.
For example, we can configure a control-plane node using kubeadm InitConfiguration.
The following example adds a label to the control-plane node:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: v1beta4-cluster
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
apiVersion: kubeadm.k8s.io/v1beta4
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
- name: node-labels
value: "node-role=development"
- role: worker
There are two different configuration versions in this file.
The outer document uses:
apiVersion: kind.x-k8s.io/v1alpha4
The embedded kubeadm document uses:
apiVersion: kubeadm.k8s.io/v1beta4
This is how kind allows developers to customize kubeadm initialization without changing kind's own configuration schema.
Understand the Configuration
The kubeadmConfigPatches field contains a YAML document that kind passes to kubeadm.
The document uses InitConfiguration because it customizes the initialization of the first control-plane node.
The nodeRegistration section configures how the node registers with Kubernetes.
The kubeletExtraArgs field uses the v1beta4 list-based representation.
The name field identifies the kubelet argument.
The value field supplies the argument value.
In this example, the control-plane node receives the label:
node-role=development
Create the Cluster
Run:
kind create cluster \
--config kind-config.yaml
Verify the label:
kubectl get nodes --show-labels
The control-plane node should include the configured label.
This demonstrates how v1beta4 patches can customize Kubernetes node initialization through kind.
9. Configure Worker Nodes Using JoinConfiguration
A control-plane node is initialized using kubeadm InitConfiguration.
Additional nodes join the cluster using kubeadm JoinConfiguration.
This distinction matters when applying node-specific configuration.
For example, suppose the application needs two workers with different labels.
Update the kind configuration:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: worker-config-cluster
nodes:
- role: control-plane
- role: worker
kubeadmConfigPatches:
- |
apiVersion: kubeadm.k8s.io/v1beta4
kind: JoinConfiguration
nodeRegistration:
kubeletExtraArgs:
- name: node-labels
value: "workload=api"
- role: worker
kubeadmConfigPatches:
- |
apiVersion: kubeadm.k8s.io/v1beta4
kind: JoinConfiguration
nodeRegistration:
kubeletExtraArgs:
- name: node-labels
value: "workload=database"
The first worker receives the label:
workload=api
The second worker receives:
workload=database
Create the cluster:
kind create cluster \
--config kind-config.yaml
Verify the labels:
kubectl get nodes --show-labels
Why Use JoinConfiguration?
kubeadm uses JoinConfiguration when additional nodes join an existing cluster.
It provides a way to customize node registration during that process.
This is useful when different workers have different responsibilities.
For example:
- API workloads.
- Background processing.
- Database testing.
- Monitoring services.
- Integration testing.
The labels can then be used with Kubernetes node selectors and affinity rules.
10. Schedule Applications Using Node Labels
After configuring worker labels, you can control where Kubernetes schedules application workloads.
Suppose an API application should run on the worker labeled workload=api.
Create api-deployment.yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-deployment
spec:
replicas: 2
selector:
matchLabels:
app: api
template:
metadata:
labels:
app: api
spec:
nodeSelector:
workload: api
containers:
- name: api
image: nginx:1.27
ports:
- containerPort: 80
Apply the deployment:
kubectl apply -f api-deployment.yaml
Check the pods:
kubectl get pods -o wide
The pods should be scheduled on a node with the workload=api label.
Understand nodeSelector
The nodeSelector field tells Kubernetes that the pod can only run on nodes containing the specified labels.
nodeSelector:
workload: api
This is useful for local testing of workload placement.
For more advanced scheduling, Kubernetes also supports node affinity, taints, tolerations, and topology spread constraints.
11. Configure Port Mappings for Local Application Access
Applications running inside a kind cluster are not automatically accessible through every port on the host machine.
kind provides extraPortMappings to forward host ports to a node container.
This is especially useful with Docker Desktop because the Kubernetes nodes themselves run inside Docker containers.
Update the configuration:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: web-development
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 30080
hostPort: 8080
listenAddress: "127.0.0.1"
protocol: TCP
- role: worker
This configuration forwards host port 8080 to port 30080 on the control-plane node.
For a Kubernetes NodePort Service, the node container port and the Service's nodePort must match.
Create a NodePort Service
Create service.yaml:
apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
type: NodePort
selector:
app: nginx
ports:
- name: http
port: 80
targetPort: 80
nodePort: 30080
protocol: TCP
Create an application deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.27
ports:
- containerPort: 80
Apply both files:
kubectl apply -f nginx-deployment.yaml
kubectl apply -f service.yaml
Check the service:
kubectl get services
Open the following address in your browser:
http://localhost:8080
You should see the default NGINX page.
This example demonstrates how kind port mappings allow local applications to reach services running inside Kubernetes.
12. Customize Kubernetes API Server Configuration
The v1beta4 format also supports structured configuration for Kubernetes control-plane components.
For example, you can customize API server arguments using ClusterConfiguration.
Add a kubeadm patch to the control-plane node:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
apiVersion: kubeadm.k8s.io/v1beta4
kind: ClusterConfiguration
apiServer:
extraArgs:
- name: profiling
value: "false"
- role: worker
This disables API server profiling.
The configuration uses a list of name-value objects rather than the older map representation.
Why Customize API Server Arguments?
The Kubernetes API server is the central interface for cluster management.
It handles requests from kubectl, controllers, operators, and other Kubernetes components.
Developers may customize its arguments when testing:
- API server behavior.
- Admission control.
- Authentication.
- Authorization.
- Audit configuration.
- Performance-related settings.
Only configure supported API server arguments.
Incorrect settings can prevent the control plane from starting.
For advanced configuration, consult the Kubernetes kubeadm API documentation for the selected Kubernetes version.
13. Understand Configuration Patches and JSON6902
kind supports kubeadm configuration patches and additional patch mechanisms.
When basic YAML configuration is not sufficient, developers can use strategic merge or JSON6902 patches.
These allow more precise modifications to Kubernetes component configuration.
For example, a JSON6902 patch can add a field to an existing configuration object.
A patch file might contain:
[
{
"op": "add",
"path": "/spec/template/spec/containers/0/env/-",
"value": {
"name": "APP_MODE",
"value": "development"
}
}
]
This is an example of a JSON6902 operation.
The add operation inserts a value at the specified JSON path.
For kubeadm component patches, kind can mount a patch directory into the node container and instruct kubeadm to apply the patches.
The configuration process involves:
- Creating a patch file.
- Mounting the directory into the kind node.
- Configuring the kubeadm patch directory.
- Creating the cluster.
- Verifying that the component configuration contains the expected changes.
Use the correct patch target and file naming format.
Also remember that kubeadm patches modify Kubernetes component configuration, while Kubernetes application manifests configure workloads.
These are two different configuration layers.
14. Validate the Cluster Configuration
After creating the cluster, verify that all nodes and Kubernetes components are healthy.
Check Cluster Information
kubectl cluster-info
This displays the Kubernetes control-plane endpoint and other cluster information.
Check Kubernetes Nodes
kubectl get nodes -o wide
Verify that all nodes have a Ready status.
Check System Pods
kubectl get pods -n kube-system
Important components include:
- CoreDNS.
- kube-proxy.
- Kubernetes API server.
- Controller manager.
- Scheduler.
- etcd.
The exact component placement depends on the cluster configuration.
Inspect Node Labels
kubectl get nodes --show-labels
This verifies the node-registration settings applied through kubeadm v1beta4 patches.
Check the Docker Containers
kind creates Docker containers for the Kubernetes nodes.
Run:
docker ps
The output should include the control-plane and worker node containers.
Inspect Cluster Events
kubectl get events -A \
--sort-by=.metadata.creationTimestamp
This helps identify scheduling problems, image-pull failures, and other cluster events.
15. Manage Kubernetes Clusters in Docker Desktop
Docker Desktop provides a Kubernetes dashboard for managing local clusters.
Open Docker Desktop and select the Kubernetes view.
Depending on the Docker Desktop release, the interface allows you to:
- Create a Kubernetes cluster.
- Choose the provisioning method.
- Select a Kubernetes version when using kind.
- Configure the number of nodes.
- View cluster status.
- Stop or reset the cluster.
- Inspect Kubernetes resources.
When using the kind CLI separately, the same Docker Desktop Engine can host the kind node containers.
However, do not assume that a CLI-created cluster automatically appears as a cluster managed by the Docker Desktop Kubernetes provisioning interface. Docker Desktop's built-in Kubernetes cluster management and an independently created kind cluster are different workflows.
Use the CLI and kubeconfig context to manage the cluster created through kind.
Check available contexts:
kubectl config get-contexts
Switch to the desired context:
kubectl config use-context kind-development-cluster
This ensures that kubectl commands target the intended cluster.
16. Troubleshoot Common kind and v1beta4 Problems
Error: Unknown API Version
If you see an error indicating that a kubeadm API version is unsupported, verify the Kubernetes version used by the node image.
The v1beta4 configuration format is used for Kubernetes 1.36 and later in the relevant kind release.
For older Kubernetes versions, use the corresponding kubeadm configuration version.
Do not change the outer kind API version to v1beta4.
Error: Unknown Field extraArgs
A common mistake is using the old map-based format with a configuration parser expecting v1beta4.
Incorrect:
extraArgs:
profiling: "false"
Correct:
extraArgs:
- name: profiling
value: "false"
Use the structured list format for new v1beta4 configuration patches.
Error: Cluster Creation Fails
Check:
docker ps -a
Inspect the failed node container:
docker logs CONTAINER_NAME
Common causes include:
- Incorrect YAML indentation.
- Invalid kubeadm configuration.
- Incompatible node image.
- Insufficient system resources.
- Docker Engine problems.
- Port conflicts.
Error: Node Is Not Ready
Check:
kubectl describe node NODE_NAME
Inspect system pods:
kubectl get pods -n kube-system
Check the node container logs if the problem appears related to kubelet or container runtime startup.
Error: Application Cannot Be Reached
Check the Service:
kubectl get services
Check the pods:
kubectl get pods -o wide
Check the kind port mappings and verify that the host port is not already in use.
For a NodePort Service, ensure the configured nodePort matches the kind node's containerPort mapping.
Error: Wrong Kubernetes Context
Running kubectl against another cluster can produce confusing results.
Check:
kubectl config current-context
Switch to the correct context before applying manifests.
17. Best Practices for Local Kubernetes Development
Pin Kubernetes Node Images
Avoid relying on an unspecified default version when reproducibility matters.
Specify a compatible kind node image for the Kubernetes version you want to test.
Use a published image tag and, for stricter reproducibility, its verified digest.
Keep kind and Kubernetes Versions Compatible
Use a kind release that supports the Kubernetes version and kubeadm configuration format you select.
Check the kind release notes before upgrading.
Use v1beta4 for New kubeadm Patches
When targeting Kubernetes 1.36 or later, use the structured v1beta4 configuration format.
Avoid carrying forward older map-based examples without reviewing their compatibility.
Separate Control-Plane and Worker Configuration
Use InitConfiguration for control-plane initialization and JoinConfiguration for additional node registration.
This makes node-specific settings easier to understand and maintain.
Use Labels for Workload Placement
Labels and selectors provide a simple way to test workload scheduling.
Use node affinity and taints when more advanced scheduling behavior is required.
Keep API Server Access Local
Do not expose the Kubernetes API server publicly for convenience.
Keep the API server bound to localhost unless you have a specific, secured networking requirement.
kind is intended primarily for local development and testing, not as a production Kubernetes distribution.
Automate Cluster Creation
Store kind YAML configuration in source control.
This allows developers and CI systems to create consistent environments using the same cluster definition.
Clean Up Unused Clusters
List clusters:
kind get clusters
Delete a cluster:
kind delete cluster --name development-cluster
Removing unused clusters releases Docker resources and reduces unnecessary resource consumption.
Conclusion
kind makes it possible to create multi-node Kubernetes clusters using Docker containers, while Docker Desktop provides a convenient environment for running those containers locally.
The kubeadm v1beta4 configuration format adds a more structured way to configure Kubernetes components, including API server arguments, kubelet arguments, environment variables, and other initialization settings.
The important distinction is that kind's top-level cluster configuration still uses kind.x-k8s.io/v1alpha4. The kubeadm v1beta4 format is used inside the configuration patches passed to Kubernetes 1.36 and later.
In this article, we created a multi-node cluster, configured control-plane and worker nodes, applied labels, exposed application ports, customized API server settings, and validated the resulting Kubernetes environment.
For developers working with Kubernetes locally, this approach provides a repeatable way to test node configuration, scheduling, networking, and application deployment behavior without maintaining a separate cluster infrastructure.
Join the conversation! Your thoughts help the community grow.