- Operating StreamNative Platform
- Deploy
Deploy StreamNative Platform on native Kubernetes clusters
After creating a Kubernetes cluster, you can deploy StreamNative Platform.
Prerequisites
- kubectl: v1.16 or higher
- Helm: v3.0 or higher
- Kubernetes server v1.16 or higher
- cert-manager operator: v1.0.0 or higher
- Vault operator: v1.5.0 or higher
- Function Mesh operator: v0.1.7 (recommended)
- Pulsar operator: v0.9.0 (recommended)
Install StreamNative Platform
This section describes how to install StreamNative Platform in online mode.
Install StreamNative Platform using original images within operators
Note
By default, the helm upgrade --install command installs the latest operators. If you want to install a specific operator, use the --version option to specify the operator image version. For details about the version relationship between operator images and StreamNative Platform 1.9.0, see StreamNative Platform version matrix.
This section describes how to install StreamNative Platform using original images within the operators.
Install the StreamNative repositories.
helm repo add streamnative https://charts.streamnative.io helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com helm repo add jetstack https://charts.jetstack.io helm repo add function-mesh http://charts.functionmesh.io/ helm repo updateCreate a Kubernetes namespace.
kubectl create namespace <k8s_namespace>Install the Vault operator.
The Vault operator creates and maintains highly-available Vault clusters on Kubernetes, allowing you to easily deploy and manage Vault clusters for your applications.
helm upgrade --install vault-operator banzaicloud-stable/vault-operator -n <k8s_namespace>Install the cert-manager.
The cert-manager is a native Kubernetes certificate management controller. It helps issue certificates from HashiCorp Vault. The cert-manager ensures that certificates are valid and up-to-date, and attempts to renew certificates at a configured time before expiry.
The cert-manager requires a number of CRD resources to be installed into your cluster as part of installation. To automatically install and manage the CRDs as part of your Helm release, you must add the
--set installCRDs=trueflag to your Helm installation command.helm upgrade --install cert-manager jetstack/cert-manager -n <k8s_namespace> --set installCRDs=trueInstall the Pulsar operator.
helm upgrade --install pulsar-operator streamnative/pulsar-operator -n <k8s_namespace>Install the Function Mesh operator.
Function Mesh is a serverless and purpose-built framework for orchestrating multiple Pulsar Functions and Pulsar IO connectors for stream processing applications.
helm upgrade --install function-mesh-operator function-mesh/function-mesh-operator -n <k8s_namespace>
Install StreamNative Platform using customized images
This section describes how to install StreamNative Platform using customized images.
Install the StreamNative repositories.
helm repo add streamnative https://charts.streamnative.io helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com helm repo add jetstack https://charts.jetstack.io helm repo add function-mesh http://charts.functionmesh.io/ helm repo updateCreate a Kubernetes namespace.
kubectl create namespace <k8s_namespace>Install the Vault operator.
The Vault operator creates and maintains highly-available Vault clusters on Kubernetes, allowing you to easily deploy and manage Vault clusters for your applications.
a. Inspect the chart used for installing the Vault operator and save the contents of
values.yamlfile as a local YAML file.This example saves the
values.yamlfile asvalue_vault-operator.yamlfile.helm inspect values banzaicloud-stable/vault-operator > value_vault-operator.yamlb. Update the image setting in the
value_vault-operator.yamlfile.You can specify the location and version of the image using the
image.bankVaultsRepositoryandimage.tagparameters. This example specifies the Vault image published to the Docker Hub by Banzai Cloud.image: bankVaultsRepository: banzaicloud/bank-vaults repository: banzaicloud/vault-operator # tag: "" pullPolicy: IfNotPresent imagePullSecrets: [] # global.imagePullSecrets is also supportedc. Install the Vault operator with the customized image.
helm upgrade --install -f value_vault-operator.yaml vault-operator banzaicloud-stable/vault-operator -n <k8s_namespace>Install the cert-manager.
The cert-manager is a native Kubernetes certificate management controller. It helps issue certificates from HashiCorp Vault. The cert-manager ensures that certificates are valid and up-to-date, and attempts to renew certificates at a configured time before expiry.
The cert-manager requires a number of CRD resources to be installed into your cluster as part of installation. To automatically install and manage the CRDs as part of your Helm release, you must add the
--set installCRDs=trueflag to your Helm installation command.a. Inspect the chart used for installing the cert-manager and save the contents of
values.yamlfile as a local YAML file.This example saves the
values.yamlfile asvalue_cert-manager.yamlfile.helm inspect values jetstack/cert-manager > value_cert-manager.yamlb. Update the image settings in the
value_cert-manager.yamlfile.You can specify the location and version of images using the
image.repositoryandimage.tagparameters. StreamNative mirrors the cert-manager images to the Docker Hub. This example specifies the cert-manager images published to the Docker Hub by StreamNative.image: repository: quay.io/jetstack/cert-manager-controller tag: v1.4.0 pullPolicy: IfNotPresent image: repository: quay.io/jetstack/cert-manager-webhook tag: v1.4.0 pullPolicy: IfNotPresent image: repository: quay.io/jetstack/cert-manager-cainjector tag: v1.4.0 pullPolicy: IfNotPresentc. Install the cert-manager with the customized images.
helm upgrade --install -f value_cert-manager.yaml cert-manager jetstack/cert-manager -n <k8s_namespace> --set installCRDs=trueInstall the Pulsar operator.
a. Inspect the chart used for installing the Pulsar operator and save the contents of
values.yamlfile as a local YAML file.This example saves the
values.yamlfile asvalue_pulsar-operator.yamlfile.helm inspect values streamnative/pulsar-operator > value_pulsar-operator.yamlb. Update the image setting in the
value_pulsar-operator.yamlfile.You can specify the location and version of images using the
images.repositoryandimages.tagparameters. This example specifies the images for ZooKeeper, BookKeeper, and Pulsar published to the Docker Hub by StreamNative.images: zookeeper: repository: docker.cloudsmith.io/streamnative/operators/zookeeper-operator tag: v0.9.0 pullPolicy: IfNotPresent bookkeeper: repository: docker.cloudsmith.io/streamnative/operators/bookkeeper-operator tag: v0.9.0 pullPolicy: IfNotPresent pulsar: repository: docker.cloudsmith.io/streamnative/operators/pulsar-operator tag: v0.9.0 pullPolicy: IfNotPresentc. Install the Pulsar operator with the customized YAML file.
helm upgrade --install pulsar-operator -f value_pulsar-operator.yaml streamnative/pulsar-operator -n <k8s_namespace>Install the Function Mesh operator.
Function Mesh is a serverless and purpose-built framework for orchestrating multiple Pulsar Functions and Pulsar IO connectors for stream processing applications.
a. Inspect the chart used for installing the Function Mesh operator and save the contents of
values.yamlfile as a local YAML file.This example saves the
values.yamlfile asvalue_function-mesh-operator.yamlfile.helm inspect values function-mesh/function-mesh-operator > value_function-mesh-operator.yamlb. Update the image setting in the
value_function-mesh-operator.yamlfile.You can specify the location and version of the image using the
operatorImageparameter. This example specifies the FunctionMesh image published to the Docker Hub by StreamNative.# operatorImage is Function Mesh Operator image operatorImage: streamnative/function-mesh:v0.1.6-rc1 imagePullPolicy: IfNotPresent imagePullSecrets: []c. Install the Function Mesh operator with the customized YAML file.
helm upgrade --install function-mesh -f value_function-mesh-operator.yaml function-mesh/function-mesh-operator -n <k8s_namespace>
Deploy Pulsar clusters
To deploy a Pulsar cluster, follow these steps.
Create a Kubernetes namespace for your Pulsar cluster.
kubectl create namespace <k8s_namespace>Define a Pulsar cluster configuration file.
Apply the YAML file to create a Pulsar cluster.
helm install -f /path/to/pulsar/file.yaml <release_name> streamnative/sn-platform --set initialize=true -n <k8s_namespace>(Optional) Update your Pulsar cluster.
You can update your Pulsar cluster by updating the YAML file and then execute the
helm upgradecommand.helm upgrade -f /path/to/pulsar/file.yaml <release_name> streamnative/sn-platform -n <k8s_namespace>
Uninstallation
This section describes how to uninstall Pulsar cluster and StreamNative Platform.
Execute the following command to uninstall the Pulsar cluster.
helm uninstall <release_name> -n <k8s_namespace>Execute the following commands to uninstall StreamNative Platform.
helm uninstall vault-operator -n <k8s_namespace> helm uninstall cert-manager -n <k8s_namespace> helm uninstall pulsar-operator -n <k8s_namespace> helm uninstall function-mesh-operator -n <k8s_namespace>
Note
If you want to delete the PVCs or the Secret, you need to delete them together. Otherwise, you will fail to reinstall the StreamNative Platform. It is recommended that you exercise caution when deleting the PVCs or the Secret because some of your significant information cannot be restored once you have deleted them.