简体   繁体   中英

Can a Google Container Engine node access Datastore?

I've built systems on top of Google's App Engine and leveraged Google's Datastore, but for my new project I'm considering a containerized solution (using Google's Container Engine). Does anyone with experience using both technologies together know:

  1. if this is possible to use Container Engine with Datastore?
  2. if it's easy to set up a local containerized dev environment with gcd?
  3. if there are some serious headaches I should consider before going down this route?
  1. Absolutely! You can run any code you want in Container Engine, and if you add the datastore scope to your cluster when you create it, authentication to the Datastore API will be automatic if you're using Datastore's client libraries or tools.

  2. I'm not familiar with the local gcd environment, so I can't help much here. Testing Docker containers locally before pushing them to the cloud works great, so the only question will be making sure the gcd dev environment can be exposed to your local containerized app.

  3. The dev environment is the one issue I'm not sure of. Using Datastore from Container Engine should work fine.

  1. What I have done is just created a service account and use the json key to access datastore when I am working locally. It seems to work pretty well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM