Skip to main content
Version: release-0.9

Configure cluster parameters

From v0.6.0, KubeBlocks supports kbcli cluster configure and kbcli cluster edit-config to configure parameters. The difference is that KubeBlocks configures parameters automatically with kbcli cluster configure but kbcli cluster edit-config provides a visualized way for you to edit parameters directly.

There are 3 types of parameters:

  1. Environment parameters, such as GC-related parameters, PULSAR_MEM, and PULSAR_GC, changes will apply to all components;
  2. Configuration parameters, such as zookeeper or bookies.conf configuration files, can be changed through env and changes restart the pod;
  3. Dynamic parameters, such as configuration files in brokers.conf, broker supports two types of change modes: a. Parameter change requires a restart, such as zookeeperSessionExpiredPolicy; b. For parameters that support dynamic parameters, you can obtain a list of all dynamic parameters with pulsar-admin brokers list-dynamic-config.
note

pulsar-admin is a management tool built in the Pulsar cluster. You can log in to the corresponding pod with kubectl exec -it <pod-name> -- bash (pod-name can be checked by kubectl get pods command, and you can choose any pod with the word broker in its name ), and there are corresponding commands in the /pulsar/bin path of the pod. For more information about pulsar-admin, please refer to the official documentation.

KubeBlocks supports configuring cluster parameters by configuration file.

  1. Modify the Pulsar broker.conf file, in this case, it is pulsar-broker-broker-config.

    kubectl edit cm pulsar-broker-broker-config -n demo
  2. Check whether the configuration is done.

    kubectl get pod -l app.kubernetes.io/name=pulsar-broker -n dmo
note

Just in case you cannot find the configuration file of your cluster, you can use switch to the kbcli tab to view the current configuration file of a cluster.