Skip to content

provider-exoscale

provider-exoscale is a Crossplane provider built with Upjet that exposes Exoscale compute, database (DBaaS), networking, and IAM resources as Kubernetes custom resources.

Source and full list of managed resources: github.com/exoscale/provider-exoscale · Upbound Marketplace

Prerequisites

Install Crossplane

helm repo add crossplane-stable https://charts.crossplane.io/stable
helm repo update

helm install crossplane crossplane-stable/crossplane \
  --namespace crossplane-system \
  --create-namespace

kubectl wait deployment crossplane \
  --namespace crossplane-system \
  --for=condition=Available \
  --timeout=120s

Install the Provider

export PROVIDER_EXOSCALE_VERSION=v0.1.0

cat <<EOF | kubectl apply -f -
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: provider-exoscale
spec:
  package: xpkg.upbound.io/exoscale/provider-exoscale:$PROVIDER_EXOSCALE_VERSION
EOF

kubectl wait provider/provider-exoscale \
  --for=condition=Healthy \
  --timeout=120s

Verify the installation:

kubectl get providers
kubectl get crds | grep exoscale

Configure

Create an IAM API Key in the Exoscale console, then store the credentials in a Kubernetes secret and create a ClusterProviderConfig:

export EXOSCALE_API_KEY=<your-api-key>
export EXOSCALE_API_SECRET=<your-api-secret>

kubectl create secret generic exoscale-credentials \
  --namespace crossplane-system \
  --from-literal=credentials="{\"key\": \"$EXOSCALE_API_KEY\", \"secret\": \"$EXOSCALE_API_SECRET\"}"

cat <<EOF | kubectl apply -f -
apiVersion: exoscale.m.exoscale.ch/v1beta1
kind: ClusterProviderConfig
metadata:
  name: default
spec:
  credentials:
    source: Secret
    secretRef:
      name: exoscale-credentials
      namespace: crossplane-system
      key: credentials
EOF

Usage

Once the provider is configured, you can manage Exoscale resources with standard Kubernetes manifests. The following example provisions a compute instance:

cat <<EOF | kubectl apply -f -
apiVersion: compute.exoscale.m.exoscale.ch/v1alpha1
kind: Instance
metadata:
  name: my-instance
  namespace: crossplane-system
spec:
  forProvider:
    zone: ch-gva-2
    name: my-instance
    type: standard.medium
    diskSize: 10
EOF

kubectl wait instance.compute.exoscale.m.exoscale.ch/my-instance \
  --namespace crossplane-system \
  --for=condition=Ready \
  --timeout=120s

Monitor all managed resources:

watch kubectl get managed -A

You can find a simple hello world in the readme of the github project and ready-to-use example manifests for every supported resource are available in the examples/namespaced/ directory of the repository.

Last updated on