Publishing to Upbound Registry

    Publishing a Provider or Configuration you've created to Upbound Registry requires Crossplane v0.13+ running locally, and an Upbound Cloud account. For this guide, we're going to assume the account is part of an Organization, but a Personal Account would also work.

    Requirements

    Clone our Example Configuration

    For this guide, we've gone ahead and created an example Configuration for you. However, you can just as easily use one you've created. Go ahead and clone our AWS Example Configuration on GitHub by running git clone git@github.com:upbound/platform-ref-aws.git locally.

    Build a Crossplane Package

    Both Providers and Configurations can be built into a Crossplane Package that can be pushed to Upbound Cloud. Take our repository you just cloned and run the following commands inside of the directory:

    kubectl crossplane build configuration --name package.xpkg --ignore "examples/*,hack/*"

    This will create a Crossplane package file. If you run ls in your directory you should see the following contents:

    LICENSE README.md cluster/ crossplane.yaml database/ development.md docs/ examples/ hack/ kubectl network/ package.xpkg

    The .xpkg file is your Crossplane Configuration package which can be uploaded to the Upbound Registry.

    Create a Repository in Upbound Cloud

    Next, before we build the repository we just published, you'll need to create a new Repository in Upbound Cloud. Upbound Cloud Repositories act like DockerHub repositories and can accept any valid Crossplane package or, if they're set to be private, OCI image.

    Create repo gif

    Push to Your Repository

    Once you've created your Repository, all you have to do is push the package to it with the following commands:

    Upbound Cloud uses Docker to push packages to our Registry, so you'll have to login to our Docker server before continuing:

    docker login registry.upbound.io -u <UPBOUND CLOUD EMAIL ADDRESS>

    Create a version tag environment variable

    VERSION_TAG=v0.0.1

    Push the package to the repository (make sure to fill in your actual organization and repository name):

    kubectl crossplane push configuration registry.upbound.io/<ORGANIZATION>/<REPOSITORY_NAME>:${VERSION_TAG} -f package.xpkg

    To learn about some of these topics we covered in more detail, please see the resources below.