Configuring Load Balancer Service Annotations

This feature is available for Customer-Controlled Clusters only.

In Customer-Controlled Clusters, you can configure annotations for load balancer services for individual event broker services. Load balancer service annotations allow you to customize the behavior of the Kubernetes load balancer service objects that provide network access to your event broker services, such as specifying static load balancer IP addresses or configuring cloud provider-specific settings.

Your datacenter may have default load balancer service annotations configured at the datacenter level. If datacenter defaults exist, they are shown as a reference when you configure annotations for an event broker service. You can use the datacenter defaults as a starting point, extend them with additional annotations, override specific keys, or configure your own annotations independently.

Considerations for Using Load Balancer Service Annotations

Be aware of the following considerations when using load balancer service annotations:

  • Annotation changes are applied to the Kubernetes load balancer service objects without restarting the pods hosting the event broker service.

  • Some load balancer annotation changes, such as IP address reassignments, may cause a brief connectivity interruption while the load balancer controller reconciles the change. This is expected behavior.

  • You should always use Cluster Manager or the Solace Cloud APIs to manage load balancer service annotations. If you modify load balancer service annotations directly using kubectl or other tools, your changes will be overwritten on the next event broker service reconciliation.

  • When you clone an event broker service, the load balancer service-level annotations are not copied to the new event broker service. This prevents IP address conflicts when cloning an event broker service with IP-pinning annotations.

  • Service-level annotations are preserved when you upgrade or upscale your event broker service.

Understanding Private and Public Load Balancer Service Objects

Each event broker service in a Customer-Controlled Cluster has two Kubernetes load balancer service objects:

  • Private — Provides connectivity for private endpoints within your cluster or private network.

  • Public — Provides connectivity for public endpoints accessible from outside your cluster.

You can configure load balancer service annotations separately for each load balancer service object, allowing different network configurations for private and public access.

Merging Annotations

When you configure event broker service-level annotations, they are merged with any datacenter-level defaults at reconciliation time, such as during an event broker service upgrade. The merge follows these rules:

  • Event broker service-level annotations override datacenter-level defaults when the same key exists in both.

  • Datacenter-level annotations are inherited for any keys not specified at the event broker service-level.

  • If you remove an event broker service-level annotation, the datacenter default for that key is restored on the next reconciliation.

  • An empty string is a valid event broker service-level value and explicitly overrides the datacenter default for that key.

The following table shows how annotations are resolved in different scenarios:

Datacenter Annotation Event Broker Service Annotation Effective Result

key-a: dc-value

(not set)

key-a: dc-value

(not set)

key-b: svc-value

key-b: svc-value

key-c: dc-value

key-c: svc-value

key-c: svc-value (service wins)

key-d: dc-value

key-d: "" (empty string)

key-d: "" (empty string applied)

key-e: dc-value

(deleted after previously being set)

key-e: dc-value (restored)

Event broker services do not pick up datacenter-level annotation changes automatically. Event broker services only apply datacenter-level annotation changes on their next reconciliation, such as when you upgrade the event broker service.

Adding Load Balancer Service Annotations When Creating an Event Broker Service

You can configure Kubernetes load balancer service annotations when you create an event broker service in a Customer-Controlled Cluster. To add load balancer service annotations during event broker service creation, perform these steps:

The Cloud Console does not validate service annotations added during event broker service creation. Any annotation errors cause service creation to fail.

You can validate annotations before committing them to an event broker service by adding annotations to an existing event broker service.

  1. When you create your event broker service, expand Advanced Connection Options.

  2. In the Service Annotations section, any current datacenter-level defaults are shown in the Inherited from datacenter sections as read-only reference labels. Note that your current selection in the Port Configuration section affects the scope of annotations you see in the Service Annotations section:

    • Private: Private load balancer annotations are visible

    • Public Internet: Public load balancer annotations are visible.

    • Hybrid: Private Address and Public Internet: Both load balancer annotation types are visible.

  3. Under Your annotations, in the annotation type (private or public) you want to add an annotation to, click Add Annotation to open an annotation/key and value field.

  4. Complete the annotation/key and value fields with applicable values for your load balancer. For more information, see Common Annotation Keys by Distribution.

  5. Repeat for each annotation you want to add.

  6. Click Create Service.

Editing Service Annotations for an Existing Event Broker Service

You can add, modify, or remove load balancer service annotations for an existing event broker service in a Customer-Controlled Cluster. The Cloud Console validates annotations you add to an existing event broker service and provides feedback about any errors or warnings before changes are applied. To edit service annotations, perform these steps:

  1. Log in to the Solace Cloud Console if you have not done so yet. The URL to access the Cloud Console differs based on your authentication scheme. For more information, see Logging In to the Solace Cloud Console.
  2. On the navigation bar, select Cluster Manager .
  3. Select the event broker service that you want to configure. If the event broker service is not listed, make sure you have the right environment selected. For more information, see Selecting Environments.
  4. On the Service Details page, click the Manage tab.
  5. On the Management Settings menu, select Network Access.
  6. On the Service Annotations card, click Edit.
  7. In the Edit service annotations dialog, the current datacenter-level defaults are shown as read-only reference labels under the scope (public/private) they apply to. You can:
    • Click Add Annotation to add a new annotation to the Private or Public scope.
    • Edit the key or value of an existing annotation.
    • Click Delete to remove an annotation. Removing a service-level annotation restores the datacenter default for that key.
  8. Click Apply changes to check your annotation changes against your cluster.

    The validation results are displayed inline. If there are errors, you must correct them before you can apply the changes. Warnings are informational and do not block the apply operation.

  9. If validation fails, correct any validation errors and click Apply changes again to save your changes.

Annotation changes are applied without restarting the event broker service. However, some annotation changes, such as load balancer IP reassignments, may cause a brief interruption at the load balancer level while the controller reconciles the change.

Understanding Load Balancer Annotation Validation

The Cloud Console validates service annotations you add to event broker services. During event broker service creation, any service annotation errors block event broker service creation. Annotations added when editing an existing event broker service are validated and the console allows you to correct mistakes before applying them.

  • Annotation keys must follow Kubernetes naming rules. Keys using the reserved prefixes kubernetes.io/ or k8s.io/ are rejected.

  • Values must be valid UTF-8 strings without control characters.

  • You can configure a maximum of 50 annotations per section (private or public), with a combined size limit of 256 KB.

  • The same key with the same value in both private and public sections is rejected as redundant.

  • Solace Cloud validates your annotations against your actual cluster using a dry-run operation. This catches errors that would be rejected by your cluster's admission webhooks, such as invalid load balancer pool names or IP address conflicts.

Validation Results

Validation returns errors or warnings:

  • Errors block the apply operation (create service or apply edits). You must correct the issue before you can save your changes.

  • Warnings are informational and allow you to proceed. For example, a warning is returned if you use the same key with different values in the private and public sections (which may be intentional).

Common Validation Errors

The following table describes common validation errors and how to resolve them:

Error Resolution

Invalid annotation key syntax

Ensure the key follows Kubernetes naming rules: alphanumeric characters, hyphens, underscores, and dots; must start and end with an alphanumeric character; name portion limited to 63 characters; optional prefix limited to 253 characters.

Reserved prefix not allowed

Keys with kubernetes.io/ or k8s.io/ prefixes are reserved by Kubernetes. Use a different key.

Duplicate key in section

Each key can appear only once per section. Remove the duplicate entry.

Same key and value in both sections

Having the same key with the same value in both Private and Public sections is considered redundant. Remove from one section or use different values.

IP address already in use

For IP-pinning annotations (such as metallb.universe.tf/loadBalancerIPs), the IP address may already be assigned to another service in the datacenter. Use a different IP address.

Cluster validation failed

Your cluster's admission webhooks rejected the annotation. Check that the value is valid for your load balancer controller and cluster configuration.

Common Annotation Keys by Distribution

The annotations available for your cluster depend on your load balancer controller and its configuration. Consult your load balancer controller documentation for a complete list of supported annotations.

The following table lists commonly used Kubernetes load balancer service annotations for each supported distribution. This is a reference only; the annotation editor accepts any valid annotation key. You are responsible for using the correct annotations for your cluster's load balancer controller.

Distribution Annotation Key Description

MetalLB (RKE2, OpenShift)

metallb.universe.tf/loadBalancerIPs

Request a specific IP address for the Service

MetalLB (RKE2, OpenShift)

metallb.universe.tf/ip-allocated-from-pool

Allocate an IP from a named address pool

MetalLB (RKE2, OpenShift)

metallb.universe.tf/allow-shared-ip

Allow IP sharing between Services using a shared key

AWS EKS

service.beta.kubernetes.io/aws-load-balancer-type

Load balancer type: nlb, external, or elb

AWS EKS

service.beta.kubernetes.io/aws-load-balancer-scheme

Traffic routing: internet-facing or internal

AWS EKS

service.beta.kubernetes.io/aws-load-balancer-subnets

Comma-separated subnet IDs for load balancer placement

Azure AKS

service.beta.kubernetes.io/azure-load-balancer-internal

Create an internal load balancer (true or false)

Azure AKS

service.beta.kubernetes.io/azure-dns-label-name

DNS label prefix for the load balancer

Azure AKS

service.beta.kubernetes.io/azure-pip-name

Name of an existing static public IP to use

Google GKE

networking.gke.io/load-balancer-type

Load balancer type: External or Internal

Google GKE

cloud.google.com/network-tier

Network tier: Premium or Standard