kind delete cluster -n local
extraPortMappings?Kind runs Kubernetes inside Docker containers. By default, services exposed inside the Kind cluster (e.g., NodePort, LoadBalancer) are not reachable directly from your host machine, because they live inside Docker’s network namespace.
extraPortMappings is Kind’s way of saying:
“Map a port inside the container (the node) to a port on your host machine, so you can access services running in the Kind cluster from outside.”
containerPort?This is the port inside the Kind node container (i.e., inside Docker).
containerPort: 30007 means that inside the Kind control-plane container, port 30007 will be exposed.hostPort?This is the port on your actual host machine (laptop/VM) that you’ll use to reach the Kind cluster service.
hostPort: 30007, your laptop’s localhost:30007 is forwarded into the Kind node container’s port 30007.Application Pods usually run on worker nodes, not on the control-plane (master) node.
So why does extraPortMappings expose the port on the control-plane container instead of worker nodes?