You'll have tom push your image to Google Container Registry and then refer it form your pod manifest.
Make sure that your DOCKER_HOST is setup properly, your Google Container Engine is running the latest version kubernetes and you have Google Cloud SDK installed.
-
Setting environment variables
gcloud components update kubectl
gcloud config set project <your-project>
gcloud config set compute/zone <your-cluster-zone>
gcloud config set container/cluster <your-cluster-name>
gcloud container clusters get-credentials <your-cluster-name>
-
Tagging image
docker tag <your-image> gcr.io/<your-project>/<your-image>
-
Push it on the registry
gcloud docker push gcr.io/<your-project>/<your-image>
-
Pod manifest for your container: my-pod.yaml
id: my-pod
kind: Pod
apiVersion: v1
desiredState:
manifest:
containers:
- name: <container-name>
image: gcr.io/<your-project>/<your-image>
...
-
Schedule pod
kubectl create -f my-pod.yaml
- If you have multiple pods setup do this from step 4 for each of them. You can also have multiple definitions in a line using --- as delimiter