After attempting to innitialize cluster/kube-up via php using the following code from my local virtual host:
$old_path = getcwd();
chdir('/Users/username/kubernetes');
$output = shell_exec('cluster/kube-up.sh');
chdir($old_path);
print_r("<pre>$output</pre>") ;
I received the following error:
Can't find gcloud in PATH. Do you wish to install the Google Cloud SDK? [Y/n]
I have gcloud available in my bash_profile. I am also running MAMP and included the path variable in /Applications/MAMP/Library/bin/envvars_* and envvars-std -
I am still getting this prompt. Any ideas?
I managed to bypass this by doing the following:
In the script, I inserted the following code:
export PATH="/Users/username/google-cloud-sdk/bin:$PATH"
cluster/kube-up.sh
This then ran kube-up.sh creating a cluster with values I had set in kubernetes/cluster/gceconfig-default.sh
using php.