Note from the ouput of the above step the name of the image. It should be in this format, gcr.io/MY-GCP-PROJECT-NAME/gce-machine-controller:VERSION-dev.
From the same terminal in which you will create your cluster using gcp-deployer, run export MACHINE_CONTROLLER_IMAGE=gcr.io/MY-GCP-PROJECT-NAME/gce-machine-controller:VERSION-dev. Note that the value should be equal to the name of the image you noted in the output from the previous step.
Follow the steps listed at gcp-deployer and create a new cluster.
Run the following command to ensure that new images are fetched for every new gce-machine-controller container, kubectl patch deployment clusterapi -p "{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"gce-machine-controller\",\"imagePullPolicy\":\"Always\"}]}}}}".
Running a Custom GCE Machine Controller
Make a change to gce-machine-controller. For example, edit main.go and insert the following print statement glog.Error("Hello World!") below logs.InitLogs().
From this folder, run make dev_push.
Run kubectl patch deployment clusterapi -p "{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"gce-machine-controller\",\"env\":[{\"name\":\"DATE\",\"value\":\"$(date +'%s')\"}]}]}}}}". This command inserts or updates an environment variable named DATE which triggers a new deployment.
Run the following, kubectl get pods -o json | jq '.items[].status.containerStatuses[] | select(.name=="gce-machine-controller")'. Validate the the hash in the imageID field matches the image you built above.
Run the following, it will store, in ${POD_NAME}, the name of your main clusterapi pod, POD_NAME=$(kubectl get pods -o json | jq '.items[] | select(.status.containerStatuses[].name=="gce-machine-controller") | .metadata.name' --raw-output).
Run kubectl logs --namespace=default ${POD_NAME} -c gce-machine-controller. Look for the output or change that you added to gce-machine-controller.