UXP enables platform teams to define new custom resources with schemas of your choosing. We call these "composite resources" (XRs). Composite resources compose a provider's managed resources -- high fidelity infrastructure primitives, like an SQL instance or a firewall rule. In this page we'll walk through installing a UXP Configuration.
UXP uses two special Crossplane resources to define and configure XRs:
CompositeResourceDefinition(XRD) defines a new kind of XR , including its schema. An XRD may optionally offer a claim (XRC).
Compositionspecifies which resources a XR will be composed of, and how they should be configured. You can create multiple
Compositionoptions for each composite resource.
XRDs and Compositions may be packaged and installed as a configuration. A
configuration is a package of composition configuration that can easily be
installed to UXP by creating a declarative
Configuration resource, or
kubectl crossplane install configuration.
In the examples below we will install a configuration that defines a new
CompositePostgreSQLInstance XR and
PostgreSQLInstance XRC that takes a
storageGB parameter, and creates a connection
Secret with keys for
endpoint. Let's get started!
# Install kubectl.# Other operating systems and architectures are available at the link above.curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"# Install the kubectl crossplane plugin.curl -sL "https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh" | sh
You'll also need an AWS account for this guide, but you can follow similar examples for other major clouds in the upstream Crossplane documentation.
First we'll install the configuration for AWS. If you prefer to see how this configuration package is constructed skip ahead to build a configuration.
# For Amazon Web Services, including all the required network plumbing.kubectl crossplane install configuration "registry.upbound.io/upbound/getting-started:latest"# Wait until the configuration and its dependencies are installed.kubectl get pkg
Using an AWS account with permissions to manage RDS databases:
# Write your credentialsAWS_PROFILE=default && echo -e "[default]\naws_access_key_id = $(aws configure get aws_access_key_id --profile $AWS_PROFILE)\naws_secret_access_key = $(aws configure get aws_secret_access_key --profile $AWS_PROFILE)" > creds.conf# Save your credentials as a secretkubectl create secret generic aws-creds -n upbound-system --from-file=creds=./creds.conf
We will create the following
ProviderConfig object to configure credentials
for AWS Provider:
apiVersion: aws.crossplane.io/v1beta1kind: ProviderConfigmetadata:name: defaultspec:credentials:source: SecretsecretRef:namespace: upbound-systemname: aws-credskey: creds
kubectl apply -f https://raw.githubusercontent.com/upbound/universal-crossplane/main/docs/getting-started/providerconfig.yaml
You have now configured UXP with support for managing a
Your app teams can now provision one using