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.

Ace
  • 125
  • 5

1 Answers1

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.

xavierc
  • 153
  • 5