Alibaba Cloud Deployment Guide¶
1 Preface¶
1.1 Document Description¶
This document describes the complete steps for deploying Guance on Alibaba Cloud, starting from resource planning and configuration, through deployment, to running.
Note:
- This document uses dataflux.cn as the primary domain name example; replace it with the actual domain name during deployment.
1.2 Keywords¶
| Term | Description |
|---|---|
| Launcher | A web application used to deploy and install Guance. The installation and upgrade of Guance are completed by following the guided steps provided by the Launcher service. |
| Operations Machine | An operations machine with kubectl installed, on the same network as the target Kubernetes cluster. |
| Installation Machine | A machine that accesses the Launcher service via a browser to complete the guided installation of Guance. |
| kubectl | The command-line client tool for Kubernetes, installed on the Operations Machine. |
1.3 Deployment Step Architecture¶
2 Resource Preparation¶
3 Infrastructure Deployment¶
3.1 Deployment Notes¶
RDS, NAS storage must be created as required, in the same VPC network within the same region. ECS, SLB, and NAT Gateways are automatically created by ACK and do not need to be created separately. In other words, steps 1, 2, and 3 in the deployment step diagram do not need to be performed separately.
3.2 Steps 1, 2, 3: ACK Service Creation¶
3.2.1 Cluster Configuration¶
Go to Container Service for Kubernetes and create a Kubernetes cluster. Select Standard Managed Cluster. Key points for cluster configuration:
- Must be in the same region as the previously created RDS, ECS, and other resources.
- Select the Configure SNAT option (ACK automatically creates and configures a NAT Gateway to allow the cluster to access the internet).
- Select the Public Access option (allows accessing the cluster API over the internet; if you manage the cluster from within the internal network, this option can be left unchecked).
- When enabling the ACK service, temporarily select flexvolume as the storage driver; the CSI driver is not supported in this document.
3.2.2 Worker Configuration¶
Mainly select the ECS specification and quantity. The specification can be created according to the configuration list requirements, or evaluated based on actual conditions, but must not be lower than the minimum configuration requirements. The quantity must be at least 3, or more.
3.2.3 Component Configuration¶
For component configuration, you must select the Install Ingress Component option and choose the Public Network type. ACK will automatically create a public-facing SLB. After installation, resolve the domain name to the public IP of this SLB.
3.3 Steps 4, 5: Dynamic Storage Configuration¶
Create a NAS file system in advance and obtain the nas_server_url.
3.3.1 Dynamic Storage Installation¶
The container storage feature of Alibaba Cloud Container Service for Kubernetes (ACK) is based on the Kubernetes Container Storage Interface (CSI). It deeply integrates with Alibaba Cloud storage services such as Cloud Disk (EBS), File Storage (NAS and CPFS), Object Storage (OSS), and local disks, and is fully compatible with native Kubernetes storage services like EmptyDir, HostPath, Secret, and ConfigMap. This section provides an overview of ACK CSI storage, supported features, usage authorization, and usage limits. The console will install CSI-Plugin and CSI-Provisioner components by default.
- Verify the Plugins
- Run the following command to check if the CSI-Plugin component is deployed successfully.
- Run the following command to check if the CSI-Provisioner component is deployed successfully.
- Create StorageClass
Create and copy the following content into the alicloud-nas-subpath.yaml file.
alicloud-nas-subpath.yaml
Replace {{ nas_server_url }} with the Server URL of the previously created NAS storage. Run the following command on the Operations Machine:
When creating an Alibaba Cloud Kubernetes cluster prior to version 1.16, if the storage plugin is set to Flexvolume, the console installs the Flexvolume and Disk-Controller components by default, but does not install the alicloud-nas-controller component by default.
- Install the alicloud-nas-controller component
Download nas_controller.yaml Run the following command on the Operations Machine:
- Verify the Plugin
Run the following command to check if the Disk-Controller component is deployed successfully.
- Create StorageClass
Create and copy the following content into the storage_class.yaml file.
storage_class.yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: alicloud-nas
annotations:
storageclass.beta.kubernetes.io/is-default-class: "true"
storageclass.kubernetes.io/is-default-class: "true"
mountOptions:
- nolock,tcp,noresvport
- vers=3
parameters:
server: "{{ nas_server_url }}:/k8s/"
driver: flexvolume
provisioner: alicloud/nas
reclaimPolicy: Delete
Replace {{ nas_server_url }} with the Server URL of the previously created NAS storage. Run the following command on the Operations Machine:
3.3.2 Verify Deployment¶
3.3.2.1 Create a PVC and Check the Status¶
Run the following command to create a PVC:
$ cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: cfs-pvc001
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: alicloud-nas
EOF
3.3.2.2 Check the PVC¶
$ kubectl get pvc | grep cfs-pvc001
cfs-pvc001 Bound pvc-a17a0e50-04d2-4ee0-908d-bacd8d53aaa4 1Gi RWO alicloud-nas 3d7h
Boundindicates successful deployment.
3.4 Step 6: Cache Service¶
- The default built-in cache service can be used.
- If you do not use the default built-in cache service, configure Redis according to the following requirements:
- Redis version: 6.0, supports standalone mode, proxy mode, and master-slave mode Redis clusters.
- Configure a Redis password.
- Add the internal IPs of the automatically created ECS instances to the Redis whitelist.
3.5 Step 7: GuanceDB for Metrics¶
3.6 Step 8: OpenSearch¶
- Create an administrator account.
- Install the Chinese word segmentation plugin.
- Add the internal IPs of the automatically created ECS instances from ACK to the OpenSearch whitelist.
3.7 Step 9: RDS¶
- Create an administrator account (must be an administrator account; this account will be used later during installation and initialization to create and initialize each application database).
- Modify the parameter configuration in the console: set innodb_large_prefix to ON (not required for MySQL 8+).
- Add the internal IPs of the automatically created ECS instances from ACK to the RDS whitelist.
4 kubectl Installation and Configuration¶
4.1 Install kubectl¶
kubectl is a command-line client tool for Kubernetes. It is used to deploy applications, inspect and manage cluster resources, etc. Our Launcher uses this command-line tool to deploy applications. For specific installation instructions, refer to the official documentation:
https://kubernetes.io/docs/tasks/tools/install-kubectl/
4.2 Configure kubeconfig¶
For kubectl to manage the cluster, you need to place the cluster's kubeconfig content into the $HOME/.kube/config file. The kubeconfig content can be found in the Basic Information section of the cluster.
Whether to use the public access or internal network access kubeconfig depends on whether your operations machine is connected to the cluster's internal network.
5 Start Installation¶
After completing the operations, refer to the manual Start Installation.




