Docker + Kubernetes build

2/10/2017

I am trying to use Docker + Kubernetes for my application management.

I have installed kubectl, kubeadm, kubelet (got the steps from google docs) for Kubernetes cluster.

Now cluster is having 2 node(1 Master, 1 Child)

I have a customize Dockerfile , how can it use it as a Kubernetes pods ?

If this is not possible, How to transmit the docker build to the Kubernetes child from master.

-- sitakant
containers
deployment
docker
docker-registry
kubernetes

2 Answers

2/10/2017

Dockerfiles create images which are used by pods, Kubernetes only uses your created docker image it doesn't build docker images for you. I think what you want to do is:

That should get you in the right direction but you will have to read up more :)

-- feelobot
Source: StackOverflow

2/10/2017

You could use a private Docker registriy outside or inside the cluster or work with local (pre-pulled) images.

  1. Outside the cluster you might want to look at these:

  2. Inside the cluster you might want to look at the Private Docker Registry in Kubernetes

  3. If you're not interested to use a registry, you could also build the image on every Kubernetes node so that Docker doesn't have to pull it. To avoid that Kubernetes tried to pull anyways you would then have to set the imagePullPolicy of your containers to Never. That's described within the official documentation.

-- pagid
Source: StackOverflow