Creating an OKE Worker Load Balancer Subnet

On Compute Cloud@Customer, part of configuring OKE requires creating a security list and a worker load balancer subnet.

Create the following resources in the order listed:

  1. Create a Worker Load Balancer Security List
  2. Create the Worker Load Balancer Subnet

Create a Worker Load Balancer Security List

Create a security list and a worker load balancer subnet. To create a security list, use the instructions in Creating a Security List. For Terraform input, see Example Terraform Scripts for Network Resources.

This security list defines traffic, such as applications, that's allowed to contact the worker load balancer.

For this example, use the following input for the worker load balancer subnet security list. These sources and destinations are examples; adjust these for your applications.

Note

When you create an external load balancer for your containerized applications (see Exposing Containerized Applications), remember to add that load balancer service front-end port to this security list.

Compute Cloud@Customer Console property

CLI property

  • Name: workerlb-seclist

  • --vcn-id: ocid1.vcn.oke_vcn_id

  • --display-name: workerlb-seclist

Two ingress security rules:

Two ingress security rules:

--ingress-security-rules

Ingress Rule 1

  • Stateless: clear the check box

  • Ingress CIDR: kube_client_cidr

  • IP Protocol: TCP

    • Destination Port Range: 80

  • Description: "Allow inbound traffic for applications."

Ingress Rule 1

  • isStateless: false

  • source: kube_client_cidr

  • sourceType: CIDR_BLOCK

  • protocol: 6

  • tcpOptions

    destinationPortRange

    • max: 80

    • min: 80

  • description: "Allow inbound traffic for applications."

Ingress Rule 2

  • Stateless: clear the check box

  • Ingress CIDR: kube_client_cidr

  • IP Protocol: TCP

    • Destination Port Range: 443

  • Description: "Allow inbound traffic for applications."

Ingress Rule 2

  • isStateless: false

  • source: kube_client_cidr

  • sourceType: CIDR_BLOCK

  • protocol: 6

  • tcpOptions

    destinationPortRange

    • max: 443

    • min: 443

  • description: "Allow inbound traffic for applications."

Create the Worker Load Balancer Subnet

To create a subnet, use the instructions in Creating a Subnet For Terraform input, see Example Terraform Scripts for Network Resources.

For this example, use the following input to create the worker load balancer subnet. Use the OCID of the VCN that was created in Creating an OKE VCN. Create the worker load balancer subnet in the same compartment where you created the VCN.

Compute Cloud@Customer Console property

CLI property

  • Name: service-lb

  • CIDR Block: workerlb_cidr

  • Route Table: Select "public" from the list

  • Public Subnet: check the box

  • DNS Hostnames:

    Use DNS Hostnames in this Subnet: check the box

    • DNS Label: servicelb

  • Security Lists: Select "workerlb-seclist" and "Default Security List for oketest-vcn" from the list

  • --vcn-id: ocid1.vcn.oke_vcn_id

  • --display-name: service-lb

  • --cidr-block: workerlb_cidr

  • --dns-label: servicelb

  • --prohibit-public-ip-on-vnic: false

  • --route-table-id: OCID of the "public" route table

  • --security-list-ids: OCIDs of the "workerlb-seclist" security list and the "Default Security List for oketest-vcn" security list

Next Step:

See Creating an OKE Control Plane Subnet.