Distributed logs

Creating a distributed logs cluster

The distributed logs CR represent a distributed logs cluster. When a cluster is configured to use a distributed logs cluster it will forward all logs to the distributed logs cluster.

Kind: SGDistributedLogs

listKind: SGDistributedLogsList

plural: sgdistributedlogs

singular: sgdistributedlogs


Property Required Updatable Type Default Description
persistentVolume string
Pod’s persistent volume configuration
nonProductionOptions array

Persistent volume

Property Required Updatable Type Default Description
size string
Size of the PersistentVolume to be created for the pod of the cluster for distributed logs. Size must be specified either in Mebibytes, Gibibytes or Tebibytes (multiples of 2^20, 2^30 or 2^40, respectively).
storageClass string default storage class
Name of an existing StorageClass in the K8s cluster, that will be used to create the PersistentVolumes for the instances of this cluster.

Non Production options

The following options should NOT be enabled in a production environment.

Property Required Updatable Type Default Description
disableClusterPodAntiAffinity boolean false

It is a best practice, on non-containerized environments, when running production workloads, to run each database server on a different server (virtual or physical), i.e., not to co-locate more than one database server per host.

The same best practice applies to databases on containers. By default, StackGres will not allow to run more than one StackGres or Distributed Logs pod on a given K8s node. Set this property to true to allow more than one StackGres pod per node.


apiVersion: stackgres.io/v1beta1
kind: SGDistributedLogs
  name: distributedlogs
    size: 10Gi