0

I have achieved vast amount of automation in terms of creating projects, creating kubernetes engine and other IaaS elements, by using GCP APIs from Python GCP Client.

But I am not very positive on deploying docker container workloads to the provisioned cluster. The GCP documents point to kubectl apply -f config.yaml, but this entails using command line tools by first switching to project etc...

This is exactly what I am trying to get away from. Is there a google API that lets us accomplish this?

And no, I do not want third party deployment automation tools for various reasons.

3
  • Umm, what exactly is wrong with doing it the way Google recommends? Nov 18, 2018 at 16:40
  • @MichaelHampton The idea is to codify IaaS deployment with configuration driven by yaml. We do not want to use cmd line tools. APIs are much more maintainable.
    – Ace
    Nov 18, 2018 at 17:45
  • Well, in that case, you use the API. Nov 18, 2018 at 18:33

1 Answer 1

0

kubectl commands hit the kubernetes API endpoint, where as gcloud commands hit the Google API endpoint. Docker images are implemented through the Kubernetes API. There are ways to accomplish this using python, however you will need to know the master's endpoint IP in advance. You will also need to authenticate to the cluster. This is the official python client library found on the official kubernetes website.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .