When you have several disparate services that all make up an application, communication between these services-often not located geographically near each other-requires managing some sort of network. Within the service mesh context, the control plane also involves “establishing and enforcing policy.” How this plays out, though, is quite different from Kubernetes. Every time you run a command with kubectl, you’re interacting with Kubernetes via the API server to retrieve the current state of your cluster or to apply configurations (think: policy) to your system. The part of the Kubernetes control plane users interact with most directly is the API server. Kubernetes Components (original source: Kubernetes documentation)Ĭomponents of the Kubernetes control plane include the API server, etcd key value store, the scheduler, and various controllers. In Kubernetes, the control plane is the set of components that “make global decisions about the cluster (for example, scheduling), as well as detecting and responding to cluster events (for example, starting up a new pod when a deployment’s replicas field is unsatisfied).” If you were to do all of these things, you would be doing the work of the Kubernetes control plane. If the load on all of the pods in a node started to hit capacity, perhaps you would need to spin up a new pod to handle the increase. You would need to re-route the network requests to the failing pod to start being sent to the replacement pod. Each node runs multiple replicas of pods, with each pod itself running several containers.Ĭan you imagine manually observing all of the pods and nodes in a system as complex as this? You would need to watch for a pod failing or a container stopping, and then react by spinning up a replica pod to replace it. That’s a lot of levels for a simple system.Ī more complex system (think: enterprise SaaS with millions of daily active users) might have a dozen clusters, with each cluster in charge of hundreds of nodes spread out across the globe. Inside that cluster is a single node (worker machine), which contains a single pod, which runs a single container. At its simplest (think: freshman CS project), a Kubernetes deployment would consist of a single cluster. Kubernetes is a system for orchestrating containers. What is a Control Plane? Kubernetes Control Plane Now, let’s take a look at what that means in the contexts of Kubernetes and service mesh. That gives us our general “lowest common denominator” understanding of these two terms, regardless of the context: The control plane is everything involved with establishing and enforcing policy, while the data plane is everything involved with carrying out that policy. This work-the work of the data plane-is concerned with carrying out policy. Packet switching, for example, evaluates packet addresses against the network policies and then does the work of getting those packets to the right destination. Meanwhile, the data plane is everything else in the network architecture that carries out those policies. This is true in the context of networking as well as (which we’ll unpack below) in that of Kubernetes and service mesh. Speaking generally, the control plane is concerned with establishing policy. These policies-along with the router’s facilities for storing and maintaining these policies-make up the network’s control plane. What kinds of packets should get routed to specific host machines? What kinds of packets should get rejected? How do we determine which packets go to which host? What should the router do if packets get dropped? In a router (hardware or software), we would have rules and policies about how to handle network packets. If we were to start at the beginning, we would consider network routing. The terms were originally used in a networking context, but more recently have come to be used within the infrastructure and platform service spaces. Ultimately, the terms “control plane” and “data plane” are all about the separation of concerns-that is, a clear separation of responsibilities within a system. What do these terms mean? Do they refer to the same things in Kubernetes as they do in a service mesh? If you’ve encountered difficulty searching for a straight answer, look no further. If you’re diving into Kubernetes or you’re getting started with a service mesh, you have likely encountered the terms “control plane” and “data plane.”
0 Comments
Leave a Reply. |