You have two options to install Crossplane:
- Either you deploy your Crossplane manifests it through an existing cluster (Minikube, bare-metal, on premise or any other desired cloud provider,...)
- or through Upbound Enterprise, which is a kind of managed Kubernetes cluster, which solves the chicken-egg problem.
kubectl create namespace crossplane-system
helm repo add crossplane-master https://charts.crossplane.io/master/
helm repo update
helm search repo crossplane-master
Choose the crossplane-master/crossplane
chart and install it.
helm upgrade --install crossplane crossplane-stable/crossplane --namespace crossplane-system --create-namespace --wait
You can also use the dev version (which didn't worked for me)
helm search repo crossplane-master --devel
helm install crossplane --namespace crossplane-system crossplane-master/crossplane --devel --version <version>
helm list -n crossplane-system
kubectl get all -n crossplane-system
You can either choose a specific version:
curl -sL https://raw.githubusercontent.com/crossplane/crossplane/release-0.14/install.sh | sh
or
or using the most recent one:
curl -sL https://raw.githubusercontent.com/crossplane/crossplane/release-1.5/install.sh | CHANNEL=master sh
(be careful with the master channel: at the time I was writing this it was not working for me)
Move CLI to your bin directory (the instructions are also at the end of the previous installation process:
sudo mv kubectl-crossplane /usr/local/bin
Now install the provider onto your cluster:
kubectl crossplane install provider crossplane/provider-civo:main
Obtain a token:
Civo -> Account -> Settings -> Preferences -> Security -> Create a new token
Then encode it in base64:
echo “your API key” | base64
or if you wanna have it in your shell ENV
export CIVO_TOKEN=YOUR_PROVIDER_TOKEN
export CIVO_TOKEN_ENCODED=$(echo $CIVO_TOKEN | base64)
echo $CIVO_TOKEN_PROVIDED
fill in your provider token at the provider.yml
Create a secret and a ProviderConfig:
apiVersion: v1
kind: Secret
metadata:
namespace: crossplane-system
name: provider-civo-secret
type: Opaque
data:
credentials: $CIVO_TOKEN_ENCODED
---
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: provider-civo
spec:
package: crossplane/provider-civo:main
---
apiVersion: civo.crossplane.io/v1alpha1
kind: ProviderConfig
metadata:
name: provider-civo
spec:
region: fra1
credentials:
source: Secret
secretRef:
namespace: crossplane-system
name: provider-civo-secret
key: credentials
kubectl apply -f ./cluster-civo-provider-config.yaml
kind: CivoKubernetes
apiVersion: cluster.civo.crossplane.io/v1alpha1
metadata:
name: example-civo-cluster
spec:
name: test-cluster-two
instances: 3
size: g3.k3s.small
applications: # list of applications to deploy
- "argo-cd"
- "prometheus-operator"
connectionDetails:
connectionSecretNamePrefix: "cluster-details"
connectionSecretNamespace: "default"
providerConfigRef:
name: civo-provider
with
kubectl apply -f cluster-civo.yml
Upbound is a Kubernetes operator that allows you to deploy your cluster with a single command.
There are two ways to deploy your cluster:
Either you have a
- pre-existing Crossplane running in a cluster and attach the Upbound operator to it
- you are using the paid version of Upbound Enterprise, which creates and hosts the Crossplane cluster for you.
in both ways ou create an Upbound account and install the UpBound CLI. Follow the instructions after the installation.
curl -sL https://cli.upbound.io | sh
Now you need a cluster to run the UpBound CLI. Create one with Civo
civo kuberes create ADD_YOUR_NEEDS
After CLI installation you can use the following command to install the Upbound CRDs into your cluster:
up uxp install
After that you connect the Upbound account to your cluster with the following command: (that command is also visible in your UpBound account)
up login --profile=vonhier --account=vonhier
or use the token based loginup controlplane attach $NAME_YOUR_UPBOUND_CONTROLPLANE --profile=vonhier | up uxp connect -
If successful confirm the installation with the following command:
kubectl -n upbound-system get pods -w