Initializing a container environment
Techniques are described for creating a container environment that implements direct communications between pods. This includes the creation of a management component (such as a control plane) of the container environment, the creation of nodes within an implementation component (such as a data plane) of the container environment, and the attaching of virtualized network interface cards (VNICs) to each node. This also includes creating a custom resource for each node, where the custom resource stores internet protocol (IP) addresses assigned to the node and stored within the VNICs for the node. Pods implemented within these nodes obtain an IP address from the VNICs for their respective node and communicate with each other utilizing the IP addresses via virtual communication devices and the VNICs.
1 . A computer-implemented method, comprising:
creating, by a computer system, a management component within a container environment, the management component including a control plane that instructs a data plane of the container environment to perform work;
creating, by the computer system, a node within the data plane of the container environment, the node including a physical or virtual machine that hosts and runs one or more pods within the container environment, each of the one or more pods representing a group of one or more containers having shared resources;
creating, by the computer system within the management component of the container environment, a custom resource mapped to the node;
attaching, by the computer system, one or more virtualized network interface cards (VNICs) to the node;
storing, at the custom resource, by the computer system, a plurality of Internet Protocol (IP) addresses that are assigned to the node and are associated with the one or more VNICs;
configuring, for a pod executing on the node, a virtual communication device for network communications and a point-to-point device for communications between the pod and the node;
assigning, by the computer system, to the virtual communication device of the pod, one of the plurality of IP addresses stored at the custom resource; and
communicating, by the pod using the assigned IP address, network traffic via the virtual communication device and the one or more VNICs attached to the node to at least one other pod.
2 . The computer-implemented method of claim 1 , further comprising:
retrieving, by the computer system, the plurality of internet protocol addresses assigned to the node; and
storing, by the computer system, the plurality of internet protocol addresses assigned to the node within the virtualized network interface card.
3 . The computer-implemented method of claim 1 , further comprising:
creating, by the computer system, the pod within the node, the pod including a virtual communication device; and
assigning, by the computer system, one of the plurality of internet protocol addresses to the virtual communication device of the pod.
4 . The computer-implemented method of claim 1 , further comprising storing within the custom resource, by the computer system, an indication of a virtualized network interface card attached to the node within the container environment.
5 . The computer-implemented method of claim 1 , further comprising storing within the custom resource, by the computer system, an indication of a subnet to which the plurality of internet protocol addresses belongs.
6 . The computer-implemented method of claim 1 , further comprising:
setting, by the computer system, one or more flags within the management component that identify the management component as implementing native pod networking,
wherein creating the custom resource, by the computer system, is in response to identifying the one or more flags.
7 . The computer-implemented method of claim 1 , further comprising:
creating, by the computer system, a daemonset within the management component; and
updating, by the computer system, the node utilizing the daemonset.
8 . The computer-implemented method of claim 1 , further comprising creating, by the computer system, a proxymux within the management component.
9 . The computer-implemented method of claim 1 , further comprising creating, by the computer system, an agent within the node that communicates with the management component.
10 . The computer-implemented method of claim 1 , comprising mapping, by the computer system, the custom resource to the node.
11 . A system comprising:
one or more memories configured to store computer-executable instructions; and
one or more processors configured to execute the computer-executable instructions to at least:
create a management component within a container environment, the management component including a control plane that instructs a data plane of the container environment to perform work;
create a node within the data plane of the container environment, the node including a physical or virtual machine that hosts and runs one or more pods within the container environment, each of the one or more pods representing a group of one or more containers having shared resources;
create, within the management component of the container environment, a custom resource mapped to the node;
attach one or more virtualized network interface cards (VNICs) to the node;
store, at the custom resource, by the computer system, a plurality of Internet Protocol (IP) addresses that are assigned to the node and are associated with the one or more VNICs;
configure, for a pod executing on the node, a virtual communication device for network communications and a point-to-point device for communications between the pod and the node;
assign to the virtual communication device of the pod, one of the plurality of IP addresses stored at the custom resource; and
communicate, using the assigned IP address, network traffic via the virtual communication device and the one or more VNICs attached to the node to at least one other pod.
12 . The system of claim 11 , wherein the one or more processors are further configured to:
retrieve the plurality of internet protocol addresses assigned to the node; and
store the plurality of internet protocol addresses assigned to the node within the virtualized network interface card.
13 . The system of claim 11 , wherein the one or more processors are further configured to:
create the pod within the node, the pod including a virtual communication device; and
assign one of the plurality of internet protocol addresses to the virtual communication device of the pod.
14 . The system of claim 11 , wherein the one or more processors are further configured to store within the custom resource an indication of a virtualized network interface card attached to the node within the container environment.
15 . The system of claim 11 , wherein the one or more processors are further configured to store within the custom resource an indication of a subnet to which the plurality of internet protocol addresses belongs.
16 . The system of claim 11 , wherein the one or more processors are further configured to:
set one or more flags within the management component that identify the management component as implementing the native pod networking, wherein the custom resource is created, by the computer system, in response to identifying the one or more flags.
17 . The system of claim 11 , wherein the one or more processors are further configured to:
create a daemonset within the management component; and
update the node utilizing the daemonset.
18 . The system of claim 11 , wherein the one or more processors are further configured to create a proxymux within the management component.
19 . The system of claim 11 , wherein the one or more processors are further configured to create an agent within the node that communicates with the management component.
20 . A non-transitory computer-readable medium storing a set of instructions, the set of instructions when executed by one or more processors cause processing to be performed comprising:
creating, by a computer system, a management component within a container environment, the management component including a control plane that instructs a data plane of the container environment to perform work;
creating, by the computer system, a node within the data plane of the container environment, the node including a physical or virtual machine that hosts and runs one or more pods within the container environment, each of the one or more pods representing a group of one or more containers having shared resources;
creating, by the computer system within the management component of the container environment, a custom resource mapped to the node;
attaching, by the computer system, one or more virtualized network interface cards (VNICs) to the node;
storing, at the custom resource, by the computer system, a plurality of Internet Protocol (IP) addresses that are assigned to the node and are associated with the one or more VNICs;
configuring, for a pod executing on the node, a virtual communication device for network communications and a point-to-point device for communications between the pod and the node;
assigning, by the computer system, to the virtual communication device of the pod, one of the plurality of IP addresses stored at the custom resource; and
communicating, by the pod using the assigned IP address, network traffic via the virtual communication device and the one or more VNICs attached to the node to at least one other pod.