Creating a Pod Subnet (VCN-Native Pod)
The instructions in this topic create a pod subnet named "pod" in the VCN that provides the private IP addresses for pods running on the control plane nodes. The number of IP addresses in this subnet should be equal to or greater than the number of IP addresses in the control plane subnet. The pod subnet must be a private subnet.
The pod subnet supports communication between pods and direct access to individual pods using private pod IP addresses. The pod subnet must be private. The pod subnet enables pods to communicate with other pods on the same worker node, with pods on other worker nodes, with OCI services (through a service gateway) and with the internet (through a NAT gateway).
Create the following resources in the order listed:
-
Pod security list
-
Pod subnet
Create a Pod Security List
Create a security list. See Creating a Security List. For Terraform input, see Example Terraform Scripts (VCN-Native Pod).
The security rules shown in the following table define traffic that is allowed to contact pods directly. Use these security rules as part of network security groups (NSGs) or in security lists. We recommend using NSGs.
The security rules apply to all pods in all the worker nodes connected to the pod subnet specified for a node pool.
Route incoming requests to pods based on routing policies specified by routing rules and route tables. See the route tables defined in Creating a VCN (VCN-Native Pod).
For this example, use the following input for the pod subnet security list.
Console property |
CLI property |
---|---|
|
|
One egress security rule:
|
One egress security rule:
|
Six ingress security rules: |
Six ingress security rules:
|
Ingress Rule 1
|
Ingress Rule 1
|
Ingress Rule 2
|
Ingress Rule 2
|
Ingress Rule 3
|
Ingress Rule 3
|
Ingress Rule 4
|
Ingress Rule 4
|
Ingress Rule 5
This ingress is optional. This port is open for an end user application. This rule could be different based on what applications are deployed. |
Ingress Rule 5
This ingress is optional. This port is open for an end user application. This rule could be different based on what applications are deployed. |
Ingress Rule 6
|
Ingress Rule 6
|
Create the Pod Subnet
Create a subnet. See Creating a Subnet. For Terraform input, see Example Terraform Scripts (VCN-Native Pod).
For this example, use the following input to create the pod subnet. Use the OCID of the VCN that was created in Creating a VCN (VCN-Native Pod). Create the pod subnet in the same compartment where you created the VCN.
The name of this subnet must be exactly "pod".
Console property |
CLI property |
---|---|
|
|