I'm working on Google Cloud Datastore with Go SDK, and hitting a GQL query error - "Your Datastore does not have the composite index (developer-supplied) required for this query." I'm aware that I need to create the composite index. But according to Google Datastore document, it assumes that the application is up and running as an GAE, while in my case we run it on GKE and Go SDK to work with Datastore.
So my question is, do I need to have an GAE instance just for creating an composite index?
You don't need a GAE instance to create an index.
See the section in the doc you linked on "Deploying or deleting indexes". You'll need to create an
index.yaml
file (see this page for examples) and then deploy it using thegcloud datastore create-indexes
command.