This reference platform Configuration
for Cloud Native applications and platform services is a
starting point to build, run, and operate your own internal cloud platform and offer a self-service
console and API to your internal teams.
It provides platform APIs to provision fully configured workload clusters, with secure networking and a complete set of platform services that provide the foundation for running cloud native applications. This is a good example of how a platform team may provide a complete platform for cloud native applications to run on, which includes continuous deployment, monitoring, metrics, logging, etc.
The application team simply has to request a "cloud native platform" cluster through this declarative platform API and they'll be ready to deploy their workloads to a complete platform in no time.
- Sign up for Upbound Cloud.
- Create an
Organization
for your teams.
- Create a
Platform
in Upbound Cloud (e.g. dev, staging, or prod). - Connect
kubectl
to yourPlatform
instance.
curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh
cp kubectl-crossplane /usr/local/bin
PLATFORM_CONFIG=registry.upbound.io/upbound/platform-ref-cloud-native:v0.0.1
kubectl crossplane install configuration ${PLATFORM_CONFIG}
kubectl get pkg
Set up your GCP account keyfile by following the instructions on: https://crossplane.io/docs/v1.0/getting-started/install-configure.html#select-provider
Ensure that the following roles are added to your service account:
roles/compute.networkAdmin
roles/container.admin
roles/iam.serviceAccountUser
Then create the secret using the given creds.json
file:
kubectl create secret generic gcp-creds -n crossplane-system --from-file=key=./creds.json
Create the ProviderConfig
, ensuring to set the projectID
to your specific GCP project:
kubectl apply -f examples/provider-default-gcp.yaml
- Browse the available self-service APIs (XRDs) in your team
Workspace
- Provision a
Cluster
using the custom generated GUI for your PlatformConfiguration
- View status / details in your
Workspace
GUI console
There are 2 options to delete resources created through the Workspace
GUI:
- From the
Workspace
GUI using the ellipsis menu in the resource view. - Using
kubectl delete -n team1 <claim-name>
.
Verify all underlying resources have been cleanly deleted:
kubectl get managed
kubectl delete configurations.pkg.crossplane.io platform-ref-cloud-native
kubectl delete providers.pkg.crossplane.io provider-gcp
kubectl delete providers.pkg.crossplane.io provider-helm
Cluster
- provision a fully configured Kubernetes cluster- definition.yaml
- composition.yaml includes (transitively):
GKECluster
NodePool
Network
Subnetwork
HelmReleases
for Prometheus, Jaeger, Fluentd, Rook, and Flux platform services.
Network
- fabric for aCluster
to securely connect the control plane, pods, and services- definition.yaml
- composition.yaml includes:
Create a Repository
called platform-ref-cloud-native
in your Upbound Cloud Organization
.
Set these to match your settings:
UPBOUND_ORG=acme
UPBOUND_ACCOUNT_EMAIL=me@acme.io
REPO=platform-ref-cloud-native
VERSION_TAG=v0.0.1
REGISTRY=registry.upbound.io
PLATFORM_CONFIG=${REGISTRY:+$REGISTRY/}${UPBOUND_ORG}/${REPO}:${VERSION_TAG}
Clone the GitHub repo.
git clone https://github.com/upbound/platform-ref-cloud-native.git
cd platform-ref-cloud-native
Login to your container registry.
docker login ${REGISTRY} -u ${UPBOUND_ACCOUNT_EMAIL}
Build package.
kubectl crossplane build configuration --name package.xpkg --ignore "examples/*,hack/*"
Push package to registry.
kubectl crossplane push configuration ${PLATFORM_CONFIG} -f package.xpkg
Install package into an Upbound Platform
instance.
kubectl crossplane install configuration ${PLATFORM_CONFIG}
To learn more see Configuration Packages.
If you're interested in building your own reference platform for your company, we'd love to hear from you and chat. You can setup some time with us at info@upbound.io.
For Crossplane questions, drop by slack.crossplane.io, and say hi!