1. Configure Private Cloud

Configure components

PulsarCoordinator

PulsarCoordinator manages an entire pulsar cluster using the underlying APIs of ZooKeeperCluster/BookKeeperCluster/PulsarBroker/PulsarProxy. It doesn’t create these resources but only reference these resources using labels. It provides cluster-wide high level configurations and reconciliations.

To provision a PulsarCoordinator instance, you need to create it through the PulsarCoordinator:

apiVersion: k8s.streamnative.io/v1alpha1
kind: PulsarCoordinator
metadata:
  name: <PulsarCoordinator name>
  namespace: <namespace>
spec:
  image: <PulsarCoordinator image version>
  • [1] metadata.name: Required. The PulsarCoordinator instance name.
  • [2] metadata.namespace: Required. The namespace where the PulsarCoordinator instance is installed.
  • [3] spec.image: Required. The version of the PulsarCoordinator instance image.

ZooKeeper

ZooKeeperCluster manages a set of zookeeper nodes of the same zookeeper cluster. To provision zookeeper nodes, you need to create it through the ZooKeeperCluster CR:

apiVersion: zookeeper.streamnative.io/v1alpha1
kind: ZooKeeperCluster
metadata:
  name: <ZooKeeperCluster name>
  namespace: <namespace>
  labels:
    k8s.streamnative.io/coordinator-name: <Your PulsarCoordinator name>
spec:
  image: <ZooKeeperCluster image version>
	replicas: <ZooKeeperCluster replica count>
  pod:
    resources:
      requests:
        cpu: <ZooKeeperCluster cpu requests size>
        memory: <ZooKeeperCluster memory requests size>
    securityContext:
      runAsNonRoot: true
  persistence:
    data:
      accessModes:
        - ReadWriteOnce
      resources:
        requests:
          storage: <ZooKeeperCluster data requests storage size>
    dataLog:
      accessModes:
        - ReadWriteOnce
      resources:
        requests:
          storage: <ZooKeeperCluster dataLog requests storage size>
  • [1] metadata.name: Required. The ZooKeeperCluster instance name.
  • [2] metadata.namespace: Required. The namespace where the ZooKeeperCluster instance is installed.
  • [3] metadata.labels.k8s.streamnative.io/coordinator-name: Required. The PulsarCoordinator instance name. The ZooKeeperCluster instance connects to the PulsarCoordinator instance to watch some configurations.
  • [4] spec.image: Required. The version of the ZooKeeperCluster instance image.
  • [5] spec.replicas: Required. The number of ZooKeeperCluster instances to be deployed.
  • [6] spec.pod.resources.requests.cpu: Optional. The minimum amount of required CPU resources.
  • [7] spec.pod.resources.requests.memory: Optional. The minimum amount of required memory resources.
  • [6] spec.pod.persistence.data.resources.requests.storage: Optional. The minimum amount of required storage.
  • [7] spec.pod.persistence.dataLog.resources.requests.storage: Optional. The minimum amount of required storage for data logs.

BookKeeper

BookKeeperCluster manages a set of bookie and recovery nodes of the same bookkeeper cluster. To provision bookie nodes, you need to create it through the BookKeeperCluster CR:

apiVersion: bookkeeper.streamnative.io/v1alpha1
kind: BookKeeperCluster
metadata:
  name: <BookKeeperCluster name>
  namespace: <namespace>
  labels:
    k8s.streamnative.io/coordinator-name: <Your PulsarCoordinator name>
spec:
  image: <BookKeeperCluster image version>
  replicas: <BookKeeperCluster replica count>
  zkServers: <ZooKeeperCluster connection address>
  pod:
    resources:
      requests:
        cpu: <BookKeeperCluster cpu requests size>
        memory: <BookKeeperCluster memory requests size>
    securityContext:
      runAsNonRoot: true
  storage:
    journal:
      volumeClaimTemplate:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: <BookKeeperCluster journal requests storage size>
    ledger:
      volumeClaimTemplate:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: <BookKeeperCluster ledger requests storage size>
  • [1] metadata.name: Required. The BookKeeperCluster instance name.
  • [2] metadata.namespace: Required. The namespace where the BookKeeperCluster instance is installed.
  • [3] metadata.labels.k8s.streamnative.io/coordinator-name: Required. The PulsarCoordinator instance name. The BookKeeperCluster instance connects to the PulsarCoordinator instance to watch some configurations.
  • [4] spec.image: Required. The version of the BookKeeperCluster instance image.
  • [5] spec.replicas: Required. The number of the BookKeeperCluster instances to be deployed.
  • [6] spec.zkServers: Required. The IP address of the ZooKeeperCluster instance. The BookKeeperCluster instance communicates with the ZooKeeperCluster instance using this IP address.
  • [7] spec.pod.resources.requests.cpu: Optional. The minimum amount of required CPU resources.
  • [8] spec.pod.resources.requests.memory: Optional. The minimum amount of required memory resources.
  • [9] spec.pod.storage.journal.volumeClaimTemplate.resources.requests.storage: Optional. The BookKeeperCluster instance journal storage requested store size.
  • [10] spec.pod.storage.ledger.volumeClaimTemplate.resources.requests.storage: Optional. The BookKeeperCluster instance ledger storage requested store size.

Pulsar Broker

PulsarBroker manages a set of brokers nodes of the same broker cluster. To provision brokers nodes, you need to create it through the PulsarBroker CR:

  • [1] metadata.name: Required. The PulsarBroker instance name.
  • [2] metadata.namespace: Required. The namespace where the PulsarBroker instance is installed.
  • [3] metadata.labels.k8s.streamnative.io/coordinator-name: Required. The PulsarCoordinator instance name. The PulsarBroker instance connects to the PulsarCoordinator instance to watch some configurations.
  • [4] spec.image: Required. The version of the PulsarBroker instance image.
  • [5] spec.replicas: Required. The number of the PulsarBroker instanced to be deployed.
  • [6] spec.zkServers: Required. The IP address of the ZooKeeperCluster instance. The PulsarBroker instance communicates with the ZooKeeperCluster instance using this IP address.
  • [7] spec.pod.resources.requests.cpu: Optional. The minimum amount of required CPU resources.
  • [8] spec.pod.resources.requests.memory: Optional. The minimum amount of required memory resources.

Pulsar Proxy

PulsarProxy manages a set of proxy nodes of the same proxy cluster. To provision proxy nodes, you need to create it through the `PulsarProxy`` CR:

apiVersion: pulsar.streamnative.io/v1alpha1
kind: PulsarProxy
metadata:
  name: <PulsarProxy name>
  namespace: <namespace>
	labels:
    k8s.streamnative.io/coordinator-name: <Your PulsarCoordinator name>
spec:
  image: <PulsarProxy image version>
	replicas: <PulsarProxy replica count>
	brokerAddress: <PulsarBroker connection address>
  pod:
    resources:
      requests:
        cpu: <PulsarProxy cpu requests size>
        memory: <PulsarProxy memory requests size>
    securityContext:
      runAsNonRoot: true
  • [1] metadata.name: Required. The PulsarProxy instance name.
  • [2] metadata.namespace : Required. The namespace where the PulsarProxy instance is installed.
  • [3] metadata.labels.k8s.streamnative.io/coordinator-name: Required. The PulsarCoordinator instance name. The PulsarProxy instance connects to the PulsarCoordinator instance to watch some configurations.
  • [4] spec.image: Required. The version of the PulsarProxy instance image.
  • [5] spec.replicas: Required. The number of the PulsarProxy instances to be deployed.
  • [6] spec.brokerAddress: Required. The IP address of the PulsarBroker instance. The PulsarProxy instance communicates with the PulsarBroker instance using this IP address.
  • [7] spec.pod.resources.requests.cpu: Optional. The minimum amount of required CPU resources.
  • [8] spec.pod.resources.requests.memory: Optional. The minimum amount of required memory resources.

Console

Console manages the Pulsar cluster management console instance. To provision console instance, you need to create it through the Console CR:

apiVersion: k8s.streamnative.io/v1alpha1
kind: Console
metadata:
  name: <Console name>
  namespace: <namespace>
  labels:
    k8s.streamnative.io/coordinator-name: private-cloud
spec:
  image: <Console image version>
  webServiceUrl: <Pulsar Broker web service address>
  • [1] metadata.name: Required. The Console instance name.
  • [2] metadata.namespace : Required. The namespace where the PulsarProxy instance is installed.
  • [3] metadata.labels.k8s.streamnative.io/coordinator-name: Required. The PulsarCoordinator instance name. The PulsarProxy instance connects to the PulsarCoordinator instance to watch some configurations.
  • [4] spec.image: Required. The version of the Console instance image.
  • [5] spec.webServiceUrl: Required. The web service address of the PulsarBroker instance.
Previous
Storage