Deploy and manage ACK applications by packaging Kubernetes resources into reusable Helm Charts.
Create a Helm application
This example deploys a Dify application from the ACK console. Your cluster must have at least 2 vCPU cores and 4 GB of memory available.
-
Create the Container Network File System (CNFS) and Network Attached Storage (NAS) StorageClasses for Dify.
-
Log on to the ACK console and navigate to the Clusters page. Click your target cluster, then choose from the left navigation pane.
-
On the StorageClasses page, click Create from YAML. Paste the following YAML into the template, then click Create.
If a resource with the same name already exists, the CNFS and NAS StorageClasses are already created. Proceed to deploy the application. Creating a NAS file system incurs fees. See NAS billing.
apiVersion: storage.alibabacloud.com/v1beta1 kind: ContainerNetworkFileSystem metadata: name: cnfs-nas-filesystem spec: description: "cnfs" type: nas reclaimPolicy: Retain # Only Retain is supported. Deleting the CNFS will not delete the backend NAS instance. --- apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: alibabacloud-cnfs-nas mountOptions: - nolock,tcp,noresvport - vers=3 parameters: volumeAs: subpath # Each persistent volume claim (PVC) will create a separate subdirectory in the NAS file system. containerNetworkFileSystem: cnfs-nas-filesystem # Associates with the CNFS instance defined above. path: "/" provisioner: nasplugin.csi.alibabacloud.com reclaimPolicy: Retain allowVolumeExpansion: true # Optional: Set to true to allow volume expansion for directory quotas.
-
-
Deploy the Dify application.
On the cluster details page, choose from the left navigation pane. On the Helm page, click Deploy.
-
Basic Information: In the Chart section, search for and select
ack-dify. -
Parameters: For Chart Version, select the latest version.
-
-
Access the Dify application.
-
Expose the
ack-difyservice to the public Internet.Public access is for demonstration only. In production, use access control to secure your application data.
Navigate to and select the
dify-systemnamespace. Find the service namedack-dify, click Update, configure the following, and click OK.-
Service Type : click SLB .
-
Access Method: select Public Access.
-
VSwitch: select the appropriate vSwitches for the availability zones in your Virtual Private Cloud (VPC).
-
-
Access the Dify application.
Copy the External IP address and open it in your browser to access Dify.
-
Manage Helm applications
Manage deployed applications on the Helm page in the console.
|
Action |
Description |
|
View |
Click the application name or Details to view resources, YAML manifest, and release history. |
|
Update |
Click Update. In the Update Release panel, modify the parameters as needed, then click OK. Important
Updates may cause service restarts or functional issues. Assess the impact before making changes and update during off-peak hours. |
|
Delete |
Click Delete. In the Delete dialog box, select Clear Release Records, then click OK to delete the application and its resources, such as Services and Deployments. Deleting the Dify application does not delete backend NAS resources. Manually delete the NAS file system. Important
If you do not select Clear Release Records, the application name is preserved. Deploying another application with the same name will fail. |
FAQ
How do I deploy a third-party application using the Helm CLI?
If ACK Charts do not meet your needs, use the Helm CLI to deploy applications.
-
Connect to your cluster.
Cloud-based
Connect clusters with kubectl on Workbench or CloudShell.
The Alibaba Cloud browser-based CLI includes Helm pre-installed. No additional setup is required.
Local machine
-
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
-
Add a Chart repository.
Replace
REPO_NAMEwith the repository alias andREPO_URLwith the its URL .helm repo add REPO_NAME REPO_URL -
Update your local repository information.
helm repo update -
Deploy the third-party application.
Replace
APP_NAMEwith your application name andCHART_NAMEwith the chart name.helm install APP_NAME REPO_NAME/CHART_NAME
See the official Helm documentation for more commands.
Why can't I delete a Helm application?
Symptoms
-
In the console, the Helm application remains in the "Uninstalling" state for a long time.
-
The
helm uninstallcommand fails with an error like:no matches for kind "***" in version "***" ensure CRDs are installed first
Cause
This typically occurs after a cluster upgrade removes an API version used by a Helm chart resource. Uninstall fails because the specified API version no longer exists.
See Deprecated API Migration Guide for deprecated APIs in each Kubernetes version.
Solution
-
Use the helm-mapkubeapis plugin to map deprecated APIs to supported versions, then delete the application.
Replace
RELEASE_NAMEandNAMESPACEwith the name and namespace of your Helm application.helm plugin install https://github.com/helm/helm-mapkubeapis helm mapkubeapis RELEASE_NAME -n NAMESPACEA
...completed successfullymessage confirms the API versions are mapped. -
Uninstall the application again.
helm uninstall RELEASE_NAME -n NAMESPACEThe output
release "***" uninstalledconfirms the Helm application is deleted.
References
-
Migrate from Helm V2 to Helm V3 for improved security and latest features.
-
Container Registry Enterprise Edition supports pushing and pulling Helm Charts.