run private docker images on Google Container Engine

0 votes

How do I run a docker image that I built locally on Google Container Engine?

Aug 30, 2018 in Kubernetes by Hannah
• 14,080 points

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Follow theses steps:

  1. Setup some 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>
  2. Tag your image

    docker tag <your-image><your-project>/<your-image>
  3. Push your image

    gcloud docker push<your-project>/<your-image>
  4. Create a pod manifest for your container: my-pod.yaml

    id: my-pod
    kind: Pod
    apiVersion: v1
        - name: <container-name>
  5. Schedule this pod

    kubectl create -f my-pod.yaml
  6. Repeat from step (4) for each pod you want to run. You can have multiple definitions in a single file using a line with --- as delimiter.

answered Aug 30, 2018 by Kalgi
• 36,220 points
0 votes

run docker login on minions before starting. 

  docker login --username=<> --password=<> --email=<> <DockerServer>
answered Aug 30, 2018 by Nilesh
• 6,900 points

Related Questions In Kubernetes

0 votes
1 answer

Accessing private Docker Hub repository from Kubernetes on Vagrant

In order to pull private dockerhub hosted ...READ MORE

answered Sep 18, 2018 in Kubernetes by DareDev
• 6,670 points
0 votes
1 answer

Can I run docker containers on different machines?

Yes, but you should also: create the relevant libnetworks in ...READ MORE

answered Oct 17, 2018 in Kubernetes by lina
• 8,100 points
0 votes
1 answer

Kubernetes HTTPS Ingress in Google Container Engine

n order to have HTTPs service exposed ...READ MORE

answered Nov 23, 2018 in Kubernetes by DareDev
• 6,670 points
0 votes
1 answer

Unable to run Kubernetes on rancher cluster

switch Docker to 1.12.x; Kubernetes doesn't support ...READ MORE

answered Aug 28, 2018 in Kubernetes by Kalgi
• 36,220 points
0 votes
1 answer
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
0 votes
1 answer
0 votes
1 answer

“403 Insufficient Permission” while creating a Kubernetes Cluster on Google Cloud instance

To run ./cluster/, you most likely need compute scope ...READ MORE

answered Aug 28, 2018 in Kubernetes by Kalgi
• 36,220 points

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.