Skip to main content
Annotations are Kubernetes metadata fields attached to objects to configure behavior beyond the standard spec. For Gcore Load Balancers in Managed Kubernetes clusters, annotations control type, flavor, IP addressing, listener limits, pool routing, logging, and DDoS protection. All Gcore Load Balancer annotations use the loadbalancer.gcore.com/ prefix. When an annotation is not set, the value falls back to the cluster configuration defaults. Apply annotations either with kubectl or in the Kubernetes service manifest under the annotations field:

Available annotations

The following annotations apply to Load Balancers created in Gcore Managed Kubernetes.

Load Balancer configuration

These annotations set the Load Balancer type, flavor, shared name, and custom metadata.

IP address configuration

These annotations assign and manage floating and reserved IP addresses for the Load Balancer.

Listener configuration

These annotations set connection limits and timeout values for Load Balancer listeners.

Pool configuration

These annotations control node selection, proxy protocol, and timeout settings for Load Balancer pools.

Logging configuration

To enable pushing logs to Logging as a Service, both logging-topic-name and logging-destination-region-id annotations must be set.

DDoS protection

This annotation attaches an Advanced DDoS Protection profile to the Load Balancer.

Examples

The following manifests illustrate common annotation configurations.

DDoS protection profile

To assign an Advanced DDoS Protection profile to the Load Balancer, add the ddos-profile annotation to the Service manifest:
Replace the sample values (65, 272, and 40) with the appropriate values for the project.

Logging configuration

Enable Load Balancer logging by adding both logging annotations to the Service manifest:
Replace my-logs and 15 with the appropriate LaaS topic name and destination region ID for the project.

Internal Load Balancer with floating IP

This manifest creates an internal Load Balancer and assigns a new floating IP automatically: