I'm creating a container engine cluster using API python client for google cloud platform.I have done with container creation successfully, Now I need to apply some yaml configurations but before applying any kubernetes yaml configurations the cluster should be provisioned otherwise kubernetes API not available. I need to do both(Container creation & Apply yaml configs) things in a single request. How can i get the provision status of a cluster using api?
Here's what i have tried:
After cluster creation: From views.py:
print('Fetching Cluster configs ....')
cc = subprocess.call(
'gcloud container clusters get-credentials ' + deployment.deploymentName.lower() + ' --zone ' + deployment.region + ' --project ' + deployment.project,
shell=True)
print(cc)
while cc == 1:
cc = subprocess.call(
'gcloud container clusters get-credentials ' + deployment.deploymentName.lower() + ' --zone ' + deployment.region + ' --project ' + deployment.project,
shell=True)
print(cc)
Help me, please!
Thanks in Advance!