Skip to content

Latest commit

 

History

History
55 lines (48 loc) · 1.88 KB

README.md

File metadata and controls

55 lines (48 loc) · 1.88 KB

Crossplane Concepts

  1. Managed Resources
  2. Compositions : Collection of managed resources (kind of main.tf )
  3. Composite resource Definition (xrd): Exposing the API (Kind of variables.tf)
  4. Composite resources (xr): Kind of terraform.tfvars or using the API to call the compositions. 'xr' is global whereas claim is namespace based.
  5. package: packaging the configurations in OCI image.

How to install crossplane and setup provider

  1. We will use up to install Upbound Universal Crossplane(UXP) you can use helm as well
    curl -sL "https://cli.upbound.io" | sh
    sudo mv up /usr/local/bin/
    up --version
    up uxp install
    k get pods -n upbound-system  #To verify
  2. Install AWS Provider
    k apply -f ./install/provider_aws_install.yaml
    k get provider                #To verify
  3. Create a Kubernetes secret with AWS credentials
    k create secret generic aws-secret -n upbound-system --from-file=creds=./install/aws-credentials.txt
  4. Create a ProviderConfig Kubernetes configuration file to attach the AWS credentials to the installed official provider.
    k apply -f ./install/provider_aws_config.yaml
    kubectl get providerconfig    #To verify

How to implement compositions

  1. Apply Compositions and xrd so that the resources and custom api are availble

    k apply -f ./compositions_vpc_subnet/composition.yaml
    k apply -f ./compositions_vpc_subnet/xrd.yaml
  2. create composite resource / claim

    k apply -f xr.yaml

How to package and push

  1. Packaging the configuration as a OCI Image
    kubectl crossplane build configuration -f ./compositions_vpc_subnet/ --name="crossplane-aws-vpc-subnet"
  2. Push the image
      kubectl crossplane push configuration abhiaws/crossplane-aws-vpc-subnet:v0.1.4