Astra Service Broker

How use Astra Service Broker

Follow me on GitHub

How To: Astra Service Broker

Following Christopher Bradfords blog post over at Datastax: Announcing the Astra Service Broker: Tradeoff-Free Cassandra in Kubernetes I was able to create a database on Astra in 6 commands using kubernetes and service account json object for my astra account. I had some challenges along the way but learned some great stuff today. Check out the setup requirements, create cluster command flow, and the 3 source documents below.

Environment Setup Requirements

brew install k3d
brew install kubernetes-service-catalog-client
brew install helm
helm repo add svc-cat
helm repo update

Create Cluster & Get Access Credentials

k3d cluster create
helm install catalog svc-cat/catalog --namespace catalog --create-namespace
kubectl create secret generic astra-creds --from-literal=username=unused --from-literal=password=`echo '[Astra Service Account Credential JSON]'| base64`
kubectl create -f astra-service-broker.yaml
kubectl apply -f astra-service-instance.yaml
kubectl apply -f astra-service-binding.yaml
kubectl get secrets devdb -o yaml

Contents of astra-service-broker.yaml

kind: ServiceBroker
  name: astra
        name: astra-creds

Contents of astra-service-instance.yaml

kind: ServiceInstance
  name: devdb
  namespace: default
    capacity_units: 1
    cloud_provider: GCP
    keyspace: petclinic
    region: us-east1
  serviceClassExternalName: astra-database
  servicePlanExternalName: developer

Contents of astra-service-binding.yaml

kind: ServiceBinding
  name: devdb
  externalID: b946701e-c773-4332-8935-8212e8bdb412
    name: devdb
  secretName: devdb

What’s Next

Check out my next article in this series: How To: Astra Multi Cloud where I show you how to use the concepts above to create a Production Cluster in Azure, AWS, and GCP!!

From the DevOps side this Astra Service Broker is just the tip of the iceberg. Check out Demo Spring Application which demonstrates how to role out an application using the database and security credentials exposed above. If you are looking for more information about the Astra Service Broker check out the documentation here.

How can I help you with Astra?


Find me over on the Astra Slack to ask me any questions about Astra. Also let’s chat if you have something kewl you did with Astra and you want me to feature it in my blog. Look below or to the right for more ways to find me.