Skip to content

Deployment and Maintenance / Helm Deployment

This document mainly introduces how to deploy DataFlux Func via Helm. Helm currently 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 make sure that the environment meets the following conditions.

1.1 System Requirements

The cluster running DataFlux Func must meet the following requirements:

  • Kubernetes > 1.14
  • Helm >= 3.8
  • Network bandwidth >= 10Mbps
  • Memory capacity >= 4GB
  • CPU cores >= 2
  • When using an external MySQL, the MySQL version must be 5.7 or higher, enable the innodb_large_prefix parameter, and the database encoding must be utf8mb4
  • When using an 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

2.1 Get Cluster Storage Class

Execute the command:

Bash
1
kubectl get sc

Output as follows:

Text Only
1
2
NAME         PROVISIONER                                     RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
nfs-client   cluster.local/nfs-subdir-external-provisioner   Delete          Immediate           true                   77d

2.2 Check Helm Version

Execute the command:

Bash
1
helm version

2.3 Perform Installation

Bash
1
2
3
helm upgrade -i {Release Name} oci://pubrepo.dataflux-func.com/dataflux-func/func -n {Namespace} --create-namespace  \
    --set storage.pvc.enabled=true,storage.pvc.storageClass="{Storage Class}" \
    --set ingress.enabled=true,ingress.hostName="{Host Name}"

{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 ingress domain name, installation successful allows access

Helm deployment by default installs MySQL and Redis. You can also use external MySQL and Redis. Detailed deployment methods are found in the README document within the charts package

2.4 Verify Installation

Execute the command:

Bash
1
helm ls -n {Namespace}

STATUS as deployed indicates success

You can also access the specified {Host Name} via a browser.

2.5 Initialize System

Access the set ingress domain via a browser, you can initialize with default configurations, customize your settings, or save and initialize the database with defaults.

setup-page.png

3. Func Upgrade

3.1 Get values configuration

Execute the command:

Bash
1
2
helm get values {Release Name}  -n {Namespace} -o yaml > values.yaml
cat values.yaml

3.2 Get Current Func Version

Execute the command:

Bash
1
helm ls -n {Namespace}

3.3 Upgrade Func

Execute the command:

Bash
1
2
3
helm upgrade {Release Name} oci://pubrepo.dataflux-func.com/dataflux-func/func \
    -n {Namespace}  \
    -f values.yaml

3.4 Verify Upgrade Results

Execute the command:

Bash
1
helm ls -n {Namespace}

4. Other Issues

4.1 Browser Returns 502

If Helm status shows deployed, troubleshoot according to the following steps:

Check If Ingress Was Created Successfully

Check ingress information:

Bash
1
kubectl get ing -n {Namespace}

Check Pod Status

Generally caused by pvc creation failure, solve based on actual situation

Check pod status:

Bash
1
kubectl get pods -n {Namespace}

Output as follows:

Text Only
1
2
3
4
5
6
7
8
9
NAME                                READY   STATUS    RESTARTS   AGE
func-mysql-575d576db7-zclcr         1/1     Running   0          13m
func-redis-fc8f8b95f-c27b2          1/1     Running   0          13m
func-server-7d44fc4dc6-d4gp8        1/1     Running   0          13m
func-worker-0-cb64778bc-q6vts       1/1     Running   2          13m
func-worker-1-6-597668777f-lnmbb    1/1     Running   2          13m
func-worker-7-8f976bfd9-fz7jf       1/1     Running   2          13m
func-worker-8-9-656fdb9bd9-rcbph    1/1     Running   1          13m
func-worker-beat-67c995968c-znq2r   1/1     Running   1          13m

Check PVC status:

Bash
1
kubectl get pvc -n {Namespace}

Output as follows:

Text Only
1
2
3
func-mysql       Pening    pvc-0a3db9c5-0b60-428b-9b19-4ff827d155fe   50G    RWX    nfs-client    15m
func-redis       Pening    pvc-cfceb581-c711-4e1d-9ae9-8063ca1ee1a9   10G    RWX    nfs-client    15m
func-resources   Bound     pvc-0cc6f1df-666c-4512-bea9-baa40461c81c   10G    RWX    nfs-client    15m

4.2 Error «cannot re-use a name that is still in use»

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 either delete the old {Release Name} before installation or change the {Release Name}.

4.3 Error «Connection to Connector Timed Out»

If you find the error «Connection to Connector Timed Out» when creating a connector, please restart all pods related to func.

Below are func-related deployments:

  • func-server
  • func-worker-0
  • func-worker-1-6
  • func-worker-7
  • func-worker-8-9
  • func-worker-beat

The func of func-server is {Release Name}, which changes with {Release Name}