Installing Connectware on Kubernetes
When you have chosen whether to use Connectware LTS or regular you are ready to install in your target cluster.
To install Connectware on Kubernetes, you must complete the following tasks:
- Add the Helm chart repository.
- Create a values.yaml file.
- Install Connectware.
- Verify the installation.
- Log in for the first time.
Prerequisites for installing Connectware on Kubernetes
Before you start with the Connectware installation, make sure that you meet the following prerequisites:
- Your Connectware license key is valid.
- Helm version 3 is installed on your system.
- The Kubernetes command line tool kubectl is configured and has access to the target installation.
- Your Kubernetes cluster fulfills the cluster requirements.
- You have chosen a Kubernetes namespace as target for your installation (e.g. cybus).
- You have chosen a name for your installation (e.g. connectware).
Adding the Helm chart repository
To use the Connectware Helm chart, add the Connectware Helm chart repository.
Example
helm repo add <local-repo> https://repository.cybus.io/repository/connectware-helm
Code-Sprache: YAML (yaml)
Setting up the values.yaml file
The values.yaml file is the configuration file for an application that is deployed through Helm. The values.yaml file allows you to configure your Connectware installation. For example, edit deployment parameters, manage resources, and update your Connectware to a new version.
In this documentation, we will focus on a basic Kubernetes configuration and commonly used parameters.
Note: We recommend that you store the values.yaml file in a version control system.
Creating a copy of the default values.yaml file
A Helm chart contains a default configuration. It is likely that you only need to customize some of the configuration parameters. We recommend that you create a copy of the default values.yaml file named default-values.yaml and a new, empty values.yaml file to customize specific parameters.
- Enter the following code to extract the default values and store them in a file named default-values.yaml.
Example
helm show values cybus/connectware > default-values.yaml
Code-Sprache: YAML (yaml)
Creating a values.yaml file
When you have created the default-values.yaml file, you can create the values.yaml file to add your custom configuration parameters.
- Enter the following code. Substitute the editor vi with your preferred editor.
Example
vi values.yaml
Code-Sprache: YAML (yaml)
Specifying the license key
To install Connectware, you need a valid license key.
- In the values.yaml file, specify the license key in the Helm value
global.licenseKey
.
Example
global:
licensekey: cY9HiVZJs8aJHG1NVOiAcrqC_ # example value
Code-Sprache: YAML (yaml)
Specifying the broker cluster secret
You must specify a secret for the broker cluster. The cluster secret value is used to secure your broker cluster, just like a password.
Important: Treat the broker cluster secret with the same level of care as a password.
- In the values.yaml file, specify the broker cluster secret in the Helm value
global.broker.clusterSecret
.
Example
global:
licensekey: cY9HiVZJs8aJHG1NVOiAcrqC_ # example value
broker:
clusterSecret: Uhoo:RahShie6goh # example value
Code-Sprache: YAML (yaml)
Allowing immutable labels
For a fresh Connectware installation, we recommend that you set best-practice labels on immutable workload objects like StatefulSet volumes.
- In the values.yaml file, set the Helm value
global.setImmutableLabels
totrue
.
Example
global:
licensekey: cY9HiVZJs8aJHG1NVOiAcrqC_ # example value
broker:
clusterSecret: Uhoo:RahShie6goh # example value
setImmutableLabels: true
Code-Sprache: YAML (yaml)
Specifying the broker cluster replica count (optional)
By default, Connectware uses three nodes for the broker cluster that moves data. You can specify a custom number of broker nodes. For example, increase the broker nodes to handle higher data loads or decrease the broker nodes for a testing environment.
- In the values.yaml file, specify the number of broker nodes in the Helm value
global.broker.replicaCount
.
Example
global:
licensekey: cY9HiVZJs8aJHG1NVOiAcrqC_ # example value
broker:
clusterSecret: Uhoo:RahShie6goh # example value
replicaCount: 5
setImmutableLabels: true
clusterSecret: ahciaruighai_t2G # example value
Code-Sprache: YAML (yaml)
Activating a separate control-plane broker (optional)
By default, Connectware uses the same broker for data payload processing and control-plane communication. You can use a separate control-plane broker. This might be useful for production environments, as it provides higher resilience and better manageability in cases of the data broker becomes slow to respond due to high load.
- In the values.yaml file, set the Helm value
global.controlPlaneBroker.enabled
totrue
. - Specify a broker cluster secret in the Helm value
global.controlPlaneBroker.clusterSecret
.
Important: Treat the broker cluster secret with the same level of care as a password.
Example
global:
licensekey: cY9HiVZJs8aJHG1NVOiAcrqC_ # example value
broker:
clusterSecret: Uhoo:RahShie6goh # example value
setImmutableLabels: true
controlPlaneBroker:
enabled: true
clusterSecret: ahciaruighai_t2G # example value
Code-Sprache: YAML (yaml)
Tip: You can activate/deactivate this option within a scheduled maintenance window.
Specifying which StorageClass Connectware should use (optional)
A broker cluster can contain several Kubernetes StorageClasses. You can specify which StorageClass Connectware should use.
- In the values.yaml file, specify the StorageClass in the Helm value
global.storage.storageClassName
.
Example
global:
licensekey: cY9HiVZJs8aJHG1NVOiAcrqC_ # example value
broker:
clusterSecret: Uhoo:RahShie6goh # example value
setImmutableLabels: true
storage:
storageClassName: gp2 # example value
Code-Sprache: YAML (yaml)
There are several configuration parameters to control the StorageClass of each volume that Connectware uses.
Specifying CPU and memory resources (optional)
By default, Connectware is configured for high-performance systems and according to the guaranteed Quality of Service (QoS) class. However, you can use the Kubernetes resource management values requests and limits to specify the CPU and memory resources that Connectware is allowed to use.
Important: Adjusting CPU and memory resources can impact the performance and availability of Connectware. When you customize the settings for CPU and memory resources, make sure that you monitor the performance and make adjustments if necessary.
- In the values.yaml file, specify the CPU and memory limits and requests in the Helm value global.podResources. Specify the limits and requests as Kubernetes quantities.
- You can use the default values shipped with Connectware as a starting point. You can find these in your default-values.yaml file you created earlier.
Example
global:
licensekey: cY9HiVZJs8aJHG1NVOiAcrqC_ # example value
broker:
clusterSecret: Uhoo:RahShie6goh # example value
setImmutableLabels: true
podResources:
distributedProtocolMapper:
limits:
cpu: 2000m
memory: 3000Mi
requests:
cpu: 1500m
memory: 1500Mi
Code-Sprache: YAML (yaml)
Related links
- Quality of service for pods (Kubernetes documentation)
- Kubernetes resource management (Kubernetes documentation)
- Quantities (Kubernetes documentation)
Starting the Connectware installation
When you are done customizing your installation through your Helm values, you can deploy Connectware onto your Kubernetes cluster.
- Enter the following command:
helm install
- Specify the installation name. For example,
connectware
. - Specify the target namespace. For example,
cybus
.
Example
helm install <installation-name> cybus/connectware -f ./values.yaml -n <namespace> --create-namespace
Code-Sprache: YAML (yaml)
This deploys Connectware according to your kubectl configuration.
Verifying the Connectware installation
You can monitor the Connectware installation progress to verify that everything runs smoothly, to know when the installation is successful, or to investigate potential issues.
Monitoring the Connectware installation progress
The Connectware installation can take a few minutes. To monitor the installation process, do one of the following:
- To monitor the current status of the installation process, enter the following command:
kubectl get pods -n <namespace>
Code-Sprache: YAML (yaml)
- To monitor the continuous progress of the installation process, enter the following command:
while [ True ]; do clear; kubectl get pod -n <namespace>; sleep 5; done
Code-Sprache: YAML (yaml)
- To stop monitoring the continuous progress of the installation process , press Ctrl+C.
Pod stages during the Connectware installation
During the Connectware installation, the pods go through the following stages:
- Pending
- PodInitializing
- ContainerCreating
- Init:x/x
- Running
When pods reach the STATUS Running, they go through their individual startup before reporting as Ready. To be fully functional, all pods must reach the STATUS Running and report all their containers as ready. This is indicated by them showing the same number on both sides of the / in the column READY.
Example
$ kubectl get pod -n <namespace>
Code-Sprache: YAML (yaml)
NAME | READY | STATUS | RESTARTS | AGE |
---|---|---|---|---|
admin-web-app-7cd8ccfbc5-bvnzx | 1/1 | Running | 0 | 3h44m |
auth-server-5b8c899958-f9nl4 | 1/1 | Running | 0 | 3m3s |
broker-0 | 1/1 | Running | 0 | 3h44m |
broker-1 | 1/1 | Running | 0 | 2m1s |
connectware-7784b5f4c5-g8krn | 1/1 | Running | 0 | 21s |
container-manager-558d9c4cbf-m82bz | 1/1 | Running | 0 | 3h44m |
doc-server-55c77d4d4c-nwq5f | 1/1 | Running | 0 | 3h44m |
ingress-controller-6bcf66495c-l5dpk | 1/1 | Running | 0 | 18s |
postgresql-0 | 1/1 | Running | 0 | 3h44m |
protocol-mapper-67cfc6c848-qqtx9 | 1/1 | Running | 0 | 3h44m |
service-manager-f68ccb767-cftps | 1/1 | Running | 0 | 3h44m |
system-control-server-58f47c69bf-plzt5 | 1/1 | Running | 0 | 3h44m |
workbench-5c69654659-qwhgc | 1/1 | Running | 0 | 15s |
At this point Connectware is installed and started. You can now make additional configurations or verify the installation status in the Connectware Admin UI.
For more information on the Connectware Admin UI, see the Connectware documentation.
Troubleshooting pod stages
If a pod is in another state than expected or if it is stuck at a certain stage for more than three minutes, there might be an issue.
- To investigate the pod status, enter the following command:
kubectl describe pod <pod-name>
Code-Sprache: YAML (yaml)
For help on solving issues, see Troubleshooting Connectware on Kubernetes.
Need more help?
Can’t find the answer you’re looking for?
Don’t worry, we’re here to help.