Cloud-oriented development is now becoming the norm, there is an urgent need to integrate cloud resources from different sources and types. Whether it is the most basic object storage, cloud database, or load balancing, it is all faced with the challenges of hybrid cloud, multi-cloud and other complex environments. KubeVela is perfect to satisfy the needs.
KubeVela efficiently and securely integrates different types of cloud resources through resource binding capabilities in cloud resource Components and Traits. At present, you can directly use the default components of AliCloud Kubernetes(ACK), AliCloud Object Storage Service (OSS) and AliCloud Relational Database Service (RDS). At the same time, more new cloud resources will gradually become the default option under the support of the community in the future. You can use cloud resources of various manufacturers in a standardized and unified way.
This tutorial will talk about how to provision and consume Cloud Resources by Terraform.
⚠️ This section requires your platform engineers have already enabled add-on 'terraform/provider-alicloud'.
|Orchestration Type||Cloud Provider||Cloud Resource||Description|
|Terraform||Alibaba Cloud||ACK||Terraform configuration for Alibaba Cloud ACK cluster|
|EIP||Terraform configuration for Alibaba Cloud EIP object|
|OSS||Terraform configuration for Alibaba Cloud OSS object|
|RDS||Terraform configuration for Alibaba Cloud RDS object|
All supported Terraform cloud resources can be seen in the list above. You can also filter them by command by
vela components --label type=terraform.
Use the following Application to provision an OSS bucket:
alibaba-oss component will create an OSS bucket named
vela-website-0911, with private acl, with connection information stored in a secreted named
description, whether it's compulsory, and default value.
Apply the above application, then check the status:
After the phase becomes
healthy, you can then check the OSS bucket in Alibaba Cloud console or by ossutil
Let's deploy the application below to provision Alibaba Cloud OSS and RDS cloud resources, and consume them by the web component.
sample-db will generate secret
db-conn with these keys, and the component
sample-oss will generate secret
oss-conn. These secrets are binded to the Envs of component
express-server by trait
Service Binding. Then the component can consume instances of OSS and RDS.
Deploy and verify the application.