Crossplane
The guide Deploy Cloud Services shows how to provision cloud resources by Terraform in CLI and VelaUX. This tutorial will talk about how to provision Cloud Resources by Crossplane.
Let’s take cloud provider AWS as an example.
vela addon enable crossplane-aws
Apply the application below. You can get AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY per https://aws.amazon.com/blogs/security/wheres-my-secret-access-key/.
apiVersion: core.oam.dev/v1beta1kind: Applicationmetadata:name: awsnamespace: vela-systemspec:components:- name: awstype: crossplane-awsproperties:name: awsAWS_ACCESS_KEY_ID: xxxAWS_SECRET_ACCESS_KEY: yyy
Let’s provision a S3 bucket. Please apply the application below.
apiVersion: core.oam.dev/v1beta1kind: Applicationmetadata:name: s3-pocspec:components:- name: devtype: crossplane-aws-s3properties:name: kubevela-test-0714acl: privatelocationConstraint: us-east-1
After the application gets running, you can check the bucket by AWS cli or console.
$ vela lsAPP COMPONENT TYPE TRAITS PHASE HEALTHY STATUS CREATED-TIMEs3-poc dev crossplane-aws-s3 running healthy 2022-06-16 15:37:15 +0800 CST$ aws s3 ls2022-06-16 15:37:17 kubevela-test-0714
All Crossplane cloud resources are defined as ComponentDefinitions and are about to be delivered in Crossplane provider addons, like crossplane-aws. If your requirements are not met by the addons, you can define your own component type per the instructions on how to define customized component.
Last updated on Feb 9, 2023 by dependabot[bot]