Build, Publish, and Install Crossplane Package

About Crossplane Package

The crossplane.yaml file

apiVersion: meta.pkg.crossplane.io/v1
kind: Configuration
metadata:
name: my-test-configuration
annotations:
provider: kubernetes
spec:
crossplane:
version: ">=v1.0.0-0"
dependsOn:
- provider: quay.io/morningspace/provider-kubernetes-amd64
version: ">=v0.0.0-0"

Build Package

# To build a provider package
kubectl crossplane build provider
# To build a configuration package
kubectl crossplane build configuration
make build
make build.all

Publish Package

# To push a provider package
kubectl crossplane push provider $ORG_NAME/$PROVIDER_NAME:$PROVIDER_VERSION
# To push a configuration package
kubectl crossplane push configuration $ORG_NAME/$CONFIGURATION_NAME:$CONFIGURATION_VERSION
kubectl crossplane push configuration quay.io/morningspace/my-test-configuration:v0.0.1
make publish
PLATFORMS=linux_amd64 make publish

Push to Registry other than Docker Hub

apiVersion: meta.pkg.crossplane.io/v1alpha1
kind: Provider
metadata:
name: provider-kubernetes
annotations:
descriptionShort: |
The Crossplane Kubernetes provider enables management of Kubernetes Objects.
spec:
controller:
image: quay.io/morningspace/provider-kubernetes-controller-amd64:VERSION
# DOCKER_REGISTRY = crossplane
DOCKER_REGISTRY = quay.io/morningspace

Install Package

# To install a provider package
kubectl crossplane install provider $ORG_NAME/$PROVIDER_NAME:$PROVIDER_VERSION
# To install a configuration package
kubectl crossplane install configuration $ORG_NAME/$CONFIGURATION_NAME:$CONFIGURATION_VERSION
kubectl crossplane install configuration quay.io/morningspace/my-test-configuration:v0.0.1

Troubleshooting Tips

kubectl get crossplane
NAME                                                                INSTALLED   HEALTHY   PACKAGE                                                             AGE
provider.pkg.crossplane.io/morningspace-provider-kubernetes-amd64 True True quay.io/morningspace/provider-kubernetes-amd64:v0.0.0-29.ga50151c 6d
NAME HEALTHY REVISION IMAGE STATE DEP-FOUND DEP-INSTALLED AGE
providerrevision.pkg.crossplane.io/morningspace-provider-kubernetes-amd64-f098e786458d True 1 quay.io/morningspace/provider-kubernetes-amd64:v0.0.0-29.ga50151c Active 6d
NAME INSTALLED HEALTHY PACKAGE AGE
configuration.pkg.crossplane.io/morningspace-my-test-configuration True True quay.io/morningspace/my-test-configuration:v0.0.1 5d1h
NAME HEALTHY REVISION IMAGE STATE DEP-FOUND DEP-INSTALLED AGE
configurationrevision.pkg.crossplane.io/morningspace-my-test-configuration-6c6e494f5a22 True 1 quay.io/morningspace/my-test-configuration:v0.0.1 Active 1 1 5d1h
kubectl get lock -o yaml

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store