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
- An existing Kubernetes cluster
kubectlinstalled and configured- Helm installed
- An Exoscale account with API credentials
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=120sInstall 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=120sVerify the installation:
kubectl get providers
kubectl get crds | grep exoscaleConfigure
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
EOFUsage
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=120sMonitor all managed resources:
watch kubectl get managed -AYou 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.