Appendix

Cluster Labels

Kubernetes clusters can have one or more labels applied to them, to control how your cluster is configured, and what gets installed into it.

Labels can only be applied to a cluster when it is created.

Available cluster labels

Label

Type

Default Value

Accepted Values / Examples

Description

master_lb_floating_ip_enabled

Boolean

false

true or false

Assign a floating IP to the Kubernetes API load balancer, to allow access to the Kubernetes API via the public Internet.

api_master_lb_allowed_cidrs

IPv4/IPv6 CIDR

0.0.0.0/0

192.0.2.1/32

Specify a set of CIDR ranges that should be allowed to access the Kubernetes API.

Multiple values can be defined (see Specifying multiple label values).

extra_network_name

String

null

Network Name

Optional additional network to attach to cluster worker nodes.

Useful for allowing access to external networks from the workers.

csi_cinder_reclaim_policy

Enumeration

Retain

Retain or Delete

Policy for reclaiming dynamically created persistent volumes.

For more information, see Persistent Volume Retention.

csi_cinder_fstype

Enumeration

ext4

ext4

Filesystem type for persistent volumes.

csi_cinder_allow_volume_expansion

Boolean

true

true or false

Allows for expansion of volumes by editing the corresponding PersistentVolumeClaim object.

kube_dashboard_enabled

Boolean

true

true or false

Install the Kubernetes Dashboard into the cluster.

monitoring_enabled

Boolean

false

true or false

Deploy a Prometheus monitoring stack into the cluster.

Applying labels when creating a cluster

Labels may be set on a cluster at creation time either via the API or in the dashboard.

When running openstack coe cluster create, set the --labels option to define custom labels.

Each label should be provided in a comma-separated list of key-value pairs.

Note

Make sure to also define the --merge-labels option when defining custom labels.

Here is an example of setting a few custom labels:

openstack coe cluster create my-cluster-name \
--cluster-template kubernetes-v1.28.9-20240416 \
...
--merge-labels \
--labels csi_cinder_reclaim_policy=Retain,kube_dashboard_enabled=true,master_lb_floating_ip_enabled=false

Note

It is not possible to modify labels on a cluster in-place after it has been created.

Specifying multiple label values

Some labels can have multiple values set for them.

Using the CLI, you can specify multiple copies of the label key-value pair, each with their own unique value.

For example, to define multiple CIDRs for api_master_lb_allowed_cidrs:

openstack coe cluster create my-cluster-name \
--cluster-template kubernetes-v1.28.9-20240416 \
...
--merge-labels \
--labels master_lb_floating_ip_enabled=true,api_master_lb_allowed_cidrs=192.0.2.1/32,api_master_lb_allowed_cidrs=192.0.2.2/32