Reputation: 491
I ran the command gcloud beta emulators bigtable start
but when I ran the command cbt listinstances
, I got the error below
Getting list of instances: rpc error: code = Unimplemented desc = unknown service google.bigtable.admin.v2.BigtableInstanceAdmin
How can I use cbt
command to connect my local bigtable emulator?
The emulator command https://cloud.google.com/sdk/gcloud/reference/beta/emulators/bigtable/start
The cbt command https://cloud.google.com/bigtable/docs/go/cbt-reference
Upvotes: 5
Views: 5147
Reputation: 1687
To summarize all the answers
# gcloud beta emulators bigtable start --host-port=0.0.0.0:8086
# $(gcloud alpha emulators bigtable env-init)
# cbt -project arbitrary-project -instance arbitrary-instance createtable test-table families=a,b
# cbt -project arbitrary-project -instance arbitrary-instance ls
test-table
Upvotes: 0
Reputation: 8119
once the emulator is running, you need to do the following:
export BIGTABLE_EMULATOR_HOST=localhost:8086
cbt -project test -instance localhost:8086 ls
Upvotes: 4
Reputation: 13
You can use the local emulator if you prefix cbt
:
cbt -project <PROJECT NAME> -instance localhost:8086
Hope this helps!
Upvotes: 0
Reputation: 994
The Cloud Bigtable emulator doesn't support any instance-level operations (CRUD for instances). You can use any arbitrary instance name when connecting to it and start by creating a table.
Upvotes: 2