OpenMCF logoOpenMCF

Loading...

OpenStack Load Balancer Member

Deploys an Octavia pool member in OpenStack, representing a backend server that receives traffic from a load balancer pool. Each member defines an IP address, port, and optional weight for weighted load distribution, with support for cross-subnet routing when the backend resides on a different subnet than the VIP.

What Gets Created

When you deploy an OpenStackLoadBalancerMember resource, OpenMCF provisions:

  • Octavia Pool Member — a loadbalancer.Member (Pulumi) / openstack_lb_member_v2 (Terraform) resource that registers a backend server in the specified pool. The member is identified by its address and port, and participates in the pool's load-balancing algorithm. When weight is set, the member receives a proportional share of traffic. When subnetId is set, Octavia performs L3 routing to reach the backend on a different subnet.

Prerequisites

  • OpenStack credentials configured via environment variables or OpenMCF provider config
  • An Octavia pool to add the member to (provide the pool UUID or reference an OpenStackLoadBalancerPool resource)
  • A backend server with a reachable IP address and listening port
  • A subnet (optional) if the backend server is on a different subnet than the load balancer VIP

Quick Start

Create a file member.yaml:

apiVersion: openstack.openmcf.org/v1
kind: OpenStackLoadBalancerMember
metadata:
  name: web-backend-1
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    openmcf.org/stack.jobId: dev.OpenstackLoadBalancerMember.web-backend-1
    openmcf.org/stack.module.source: github.com/plantonhq/openmcf//apis/org/openmcf/provider/openstack/openstackloadbalancermember/v1/iac/pulumi/module
spec:
  poolId: 4a0e3c5b-2f1d-4e6a-8b9c-0d1e2f3a4b5c
  address: "10.0.0.10"
  protocolPort: 8080

Deploy:

openmcf apply -f member.yaml

This registers a backend server at 10.0.0.10:8080 in the specified Octavia pool with default weight (1).

Configuration Reference

Required Fields

FieldTypeDescriptionValidation
poolIdStringValueOrRefThe Octavia pool to add this member to. ForceNew: changing this recreates the member. Can reference OpenStackLoadBalancerPool resource via valueFrom.Required
addressstringIP address of the backend server that receives forwarded traffic. ForceNew: changing this recreates the member.Required, non-empty
protocolPortint32Port on the backend server that accepts traffic. ForceNew: changing this recreates the member.Required, 1-65535

Optional Fields

FieldTypeDefaultDescription
subnetIdStringValueOrRef—Subnet where the member resides. Used by Octavia for L3 routing when the member is on a different subnet than the VIP. ForceNew: changing this recreates the member. Can reference OpenStackSubnet resource via valueFrom.
weightint321 (set by Octavia)Weight for weighted load balancing. A member with weight 0 receives no traffic (drain mode). Valid range: 0-256. When omitted, Octavia assigns a default weight of 1.
adminStateUpbooltrueAdministrative state of the member. When false, the member is removed from the pool's rotation without deleting it.
tagsstring[][]Tags applied to the member in OpenStack for filtering and organization. Must be unique within this resource.
regionstringprovider defaultOverrides the region from the provider configuration for this member.

Examples

Basic Member with Direct IP

A minimal member that registers a single backend server in an Octavia pool:

apiVersion: openstack.openmcf.org/v1
kind: OpenStackLoadBalancerMember
metadata:
  name: web-backend-1
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    openmcf.org/stack.jobId: dev.OpenstackLoadBalancerMember.web-backend-1
    openmcf.org/stack.module.source: github.com/plantonhq/openmcf//apis/org/openmcf/provider/openstack/openstackloadbalancermember/v1/iac/pulumi/module
spec:
  poolId: 4a0e3c5b-2f1d-4e6a-8b9c-0d1e2f3a4b5c
  address: "10.0.0.10"
  protocolPort: 8080

Weighted Members with Cross-Subnet Routing

Two members with different weights on a backend subnet separate from the VIP subnet. The higher-weighted member receives proportionally more traffic:

apiVersion: openstack.openmcf.org/v1
kind: OpenStackLoadBalancerMember
metadata:
  name: app-backend-primary
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    openmcf.org/stack.jobId: prod.OpenstackLoadBalancerMember.app-backend-primary
    openmcf.org/stack.module.source: github.com/plantonhq/openmcf//apis/org/openmcf/provider/openstack/openstackloadbalancermember/v1/iac/pulumi/module
spec:
  poolId: 4a0e3c5b-2f1d-4e6a-8b9c-0d1e2f3a4b5c
  address: "10.1.0.10"
  protocolPort: 8080
  weight: 10
  subnetId: b2c3d4e5-f6a7-8901-bcde-f12345678901
  tags:
    - production
    - primary
---
apiVersion: openstack.openmcf.org/v1
kind: OpenStackLoadBalancerMember
metadata:
  name: app-backend-secondary
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    openmcf.org/stack.jobId: prod.OpenstackLoadBalancerMember.app-backend-secondary
    openmcf.org/stack.module.source: github.com/plantonhq/openmcf//apis/org/openmcf/provider/openstack/openstackloadbalancermember/v1/iac/pulumi/module
spec:
  poolId: 4a0e3c5b-2f1d-4e6a-8b9c-0d1e2f3a4b5c
  address: "10.1.0.11"
  protocolPort: 8080
  weight: 5
  subnetId: b2c3d4e5-f6a7-8901-bcde-f12345678901
  tags:
    - production
    - secondary

With these weights, app-backend-primary receives approximately twice the traffic of app-backend-secondary when the pool uses the ROUND_ROBIN algorithm.

Draining a Member for Maintenance

Set weight to 0 to stop sending new traffic to a member while allowing existing connections to complete. Set adminStateUp to false to fully remove the member from rotation:

apiVersion: openstack.openmcf.org/v1
kind: OpenStackLoadBalancerMember
metadata:
  name: maintenance-backend
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    openmcf.org/stack.jobId: prod.OpenstackLoadBalancerMember.maintenance-backend
    openmcf.org/stack.module.source: github.com/plantonhq/openmcf//apis/org/openmcf/provider/openstack/openstackloadbalancermember/v1/iac/pulumi/module
spec:
  poolId: 4a0e3c5b-2f1d-4e6a-8b9c-0d1e2f3a4b5c
  address: "10.0.0.12"
  protocolPort: 8080
  weight: 0
  adminStateUp: false
  tags:
    - maintenance

Using Foreign Key References

Reference other OpenMCF-managed resources instead of hardcoding UUIDs:

apiVersion: openstack.openmcf.org/v1
kind: OpenStackLoadBalancerMember
metadata:
  name: ref-backend
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    openmcf.org/stack.jobId: prod.OpenstackLoadBalancerMember.ref-backend
    openmcf.org/stack.module.source: github.com/plantonhq/openmcf//apis/org/openmcf/provider/openstack/openstackloadbalancermember/v1/iac/pulumi/module
spec:
  poolId:
    valueFrom:
      kind: OpenStackLoadBalancerPool
      name: web-pool
      field: status.outputs.pool_id
  address: "10.0.0.10"
  protocolPort: 8080
  weight: 10
  subnetId:
    valueFrom:
      kind: OpenStackSubnet
      name: backend-subnet
      field: status.outputs.subnet_id

Stack Outputs

After deployment, the following outputs are available in status.outputs:

OutputTypeDescription
member_idstringUUID of the created Octavia pool member
namestringName of the member, derived from metadata.name
addressstringIP address of the backend server
protocol_portint32Port on the backend server
weightint32Weight of the member in the load-balancing algorithm
regionstringOpenStack region where the member was created

Related Components

  • OpenStackLoadBalancerPool — the pool this member belongs to; provides the poolId foreign key
  • OpenStackSubnet — optional subnet for cross-subnet routing; provides the subnetId foreign key
  • OpenStackLoadBalancerListener — listener that routes traffic to the pool containing this member
  • OpenStackLoadBalancer — top-level load balancer resource that owns the VIP
  • OpenStackLoadBalancerMonitor — health monitor attached to the pool that determines member health

Next article

OpenStack Load Balancer Monitor

OpenStack Load Balancer Monitor Deploys an Octavia health monitor that periodically probes pool members to determine their health status. Unhealthy members are automatically removed from the pool's traffic rotation until they recover. Monitors support HTTP, HTTPS, PING, TCP, TLS-HELLO, and UDP-CONNECT check types. What Gets Created When you deploy an OpenStackLoadBalancerMonitor resource, OpenMCF provisions: Octavia Health Monitor — a loadbalancer.Monitor resource attached to the specified...
Read next article
Presets
1 ready-to-deploy configurationView presets →