Deployment and Maintenance / Helm Deployment
This document mainly introduces how to deploy DataFlux Func via Helm. Currently, Helm only supports the GSE version, and older versions can be directly upgraded to the GSE version.
1. System and Environment Requirements
Before installing DataFlux Func, please ensure that the environment meets the following conditions.
1.1 System Requirements
The cluster running DataFlux Func needs to meet the following conditions:
- Kubernetes > 1.14
- Helm >= 3.0
- Network bandwidth >= 10Mbps
- Memory capacity >= 4GB
- CPU cores >= 2
- When using external MySQL, the MySQL version must be 5.7 or higher, enable the
innodb_large_prefix
parameter, and the database encoding must beutf8mb4
- When using external Redis, the Redis version must be 5.0 or higher, with at least 1 GB of available memory, non-cluster version
DataFlux Func storage should preferably use shared storage; hostPath has drawbacks
2. Command-Line Deployment
Helm can deploy Func via the command line.
2.1 Obtain Cluster Storage Class
Execute the command:
Bash | |
---|---|
1 |
|
Output as follows:
Text Only | |
---|---|
1 2 |
|
2.2 Check Helm Version
Execute the command:
Bash | |
---|---|
1 |
|
2.3 Perform Installation
Bash | |
---|---|
1 2 3 |
|
{Release Name} is the Helm alias, {Namespace} will be created if it does not exist, {Storage Class} is the storage class name from step one, {Host Name} is the domain name for ingress, and you can access it after successful installation.
Helm deployment by default installs MySQL and Redis. You can also use external MySQL and Redis. For detailed deployment methods, see the README document in the charts package.
2.4 Verify Installation
Execute the command:
Bash | |
---|---|
1 |
|
STATUS as deployed indicates success
You can also access the specified {Host Name} via a browser.
2.5 Initialize System
Access the configured ingress domain via a browser, you can initialize using the default configuration or customize your own configuration. You can also save the default settings and initialize the database.
3. Rancher Visual Deployment
Helm can deploy Func via a visual interface.
3.1 Deployment Prerequisites
- The cluster has been registered on the Rancher container management platform.
- Rancher users have permissions to manage the application market.
3.2 Add Chart Repository
Log in to the Rancher platform, Applications & Application Market / Chart Repository
, create a repository, and set the repository address to https://pubrepo.dataflux-func.com/chartrepo/func
3.3 Configuration and Installation
Select «Charts
/ Func
»
Click Install
Set Namespace
Set Storage
Set Access Method
3.4 Verify Installation
Select «Applications & Application Market / Installed Applications»
3.5 Initialize System
Steps are the same as «Command-Line Deployment / Initialize System»
4. Upgrade Func
For Func deployed via Helm, please use the following method for upgrades.
4.1 Obtain values Configuration
Execute the command:
Bash | |
---|---|
1 2 |
|
4.2 Obtain Current Func Version
Execute the command:
Bash | |
---|---|
1 |
|
4.3 Perform Upgrade
Execute the command:
Bash | |
---|---|
1 2 3 |
|
4.4 Verify Upgrade Results
Execute the command:
Bash | |
---|---|
1 |
|
5. Common Issues
Below are common issues that may occur when deploying Func via Helm.
5.1 Browser Returns 502
If the Helm status shows deployed
, follow these steps for troubleshooting:
Check If Ingress Was Successfully Created
View ingress information:
Bash | |
---|---|
1 |
|
Check Pod Status
Generally caused by failed creation of pvc
; solve problems based on actual situations.
View pod status:
Bash | |
---|---|
1 |
|
Output as follows:
Text Only | |
---|---|
1 2 3 4 5 6 7 8 9 |
|
View PVC status:
Bash | |
---|---|
1 |
|
Output as follows:
Text Only | |
---|---|
1 2 3 |
|
5.2 Occurrence of 「cannot re-use a name that is still in use」 Error
If you encounter the error 「cannot re-use a name that is still in use」 during deployment, it means that there is already a {Release Name}
in the current namespace.
You can delete the old {Release Name}
before installation or change the {Release Name}
.
5.3 Occurrence of 「Timeout Connecting to Connector」 Error
If you find the error 「Timeout connecting to connector」 while creating a connector, please restart all pods related to func.
The following are func-related deployments:
- func-server
- func-worker-XXX
- func-worker-beat
The func-server's func is {Release Name}, which changes with the modification of {Release Name}