- Crossplane is an open source Kubernetes add-on that enables platform teams to assemble infrastructure from multiple vendors.
- Expose higher level self-service APIs for application teams to consume, without having to write any code.
- Provisioned and managed by kubectl, GitOps, or any tools that can talk with the Kubernetes API.
For macOS / Linux / Windows use the following:
- Kubernetes cluster
- Kind
- Minikube, minimum version v0.28+
- etc.
- Helm, minimum version v3.0.0+.
- Create namespace.
kubectl create namespace crossplane-system
- Add Helm Chart.
helm repo add crossplane-stable https://charts.crossplane.io/stable
helm repo update
- Install crossplane using helm.
helm install crossplane --namespace crossplane-system crossplane-stable/crossplane
- Check the status.
helm list -n crossplane-system
kubectl get all -n crossplane-system
- Install Crossplane CLI using script.
curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh
- Install GCP provider version 0.18.0 (latest) using crossplane CLI.
kubectl crossplane install provider crossplane/provider-gcp:v0.18.0
- Check the status.
kubectl get pkg
NOTE: Wait until it becomes healthy
- Run the script.
./gcp-sa-script.sh
Note: Change the PROJECT_ID and SA_NAME according to usage
- Use the following command to create kubernetes secret from service account JSON file.
kubectl create secret generic gcp-creds -n crossplane-system --from-file=creds=./creds.json
- We will create the ProviderConfig object to configure credentials for GCP Provider.
- Run the provider.sh script
./provider.sh
Note: Change the PROJECT_ID according to usage
- Create VPC Network
kubectl apply -f network.yaml
- Create subnetwork
kubectl apply -f subnetwork.yaml
- Create GKE Cluster
kubectl apply -f cluster.yaml
kubectl apply -f nodepool.yaml
- Crossplane official Document: https://crossplane.io/