..Crossplane is an open source Kubernetes add-on that supercharges your Kubernetes clusters enabling you to provision and manage infrastructure, services, and applications from kubectl. (crossplane.io)
Crossplane is a CNCF sandbox project, open source, community driven solution and add-on for your kubernetes API to manage and compose infrastructure.
It uses a team centric approach with Open Application Model.
The idea is to use a kubernetes cluster as a single control panel. where there is freedom to provision resources in any cloud and link these services with the cluster itself. The cluster does not need to be in the same cloud as the services.
Basically a provider is configured in the cluster linked to a service account of a specific cloud.
Crossplane CRDs use this provider to deploy and link services across the cluster.
Each cloud service has its particularity and is defined through structures of compositions, definitions and namespaced k8s specifications.
The CRDs that define the crossplane providers services are called XRDs.
Crossplane has an external CLI and its own CRDs that are deployed in the cluster.
Since CRDs and XRDs are deployed, the provisioning operation no longer requires the local CLI. Just having kubectl configured needed to re-deploy the types of resources that are already configured.
Installation
Follows ansible to automate the installation of a crossplane + GCP Provider in a GKE cluster
Requirements
- GKE
- Google Cloud SDK (316.+)
- bq (2.0.62+)
- core (2020.10.23.+)
- gsutil (4.54.+)
- Kubernetes(1.16.+)
- kubectl(1.16.+)
- Helm(3.+)
- ansible (2.10.+)
- openshift python client (0.11.+)
- PyYAML (5.3.+)
Deploy
1 - Git clone the repo to bastion
- $ git clone https://gitlab.com/cedon/crossplane-gcp.git
2 - Check if roles/crossplane/defaults/main.yml is right for the environment you want to deploy
3 - Deploy with ansible command:
- $ ansible-playbook -i ./hosts -e \
'ansible_python_interpreter=/usr/bin/python3' crossplane.yml
\ --tags "install, gcp" -vvv
After the Deploy you must take care about the file creds.json. It will be located at the repo root, and has the service account credentials.
4 - Check Crossplane Installation
- $ kubectl get all -n crossplane-system
- $ kubectl crossplane --help
References
- Crossplane - https://crossplane.io
- Crossplane Install and Configure V1.0 - https://crossplane.io/docs/v1.0/getting-started/install-configure.html
- Crossplane Provision Infrastructure - https://crossplane.io/docs/v1.0/getting-started/provision-infrastructure.html
Top comments (2)
Have you heard of Upbound? They created Crossplane and are commercializing a Universal API to bring this concept to the masses.
Awesome!