Does Kubernetes always use a single image for deployments?

2/23/2018

I have the following for one of my deployment files:

  containers:
  - name: ouroboros 
    image: [my-user]/ouroboros
    ports:
    - containerPort: 8080

I want other teammates to be able to develop locally on minikube, but it seems like the image that's used is set in stone. I have a small shell script that uses sed to replace [my-user] with another DockerHub profile, but that still seems like a weird way to allow multiple people to work on our services locally.

Are there any alternative configs I can use for deciding which Docker image to use locally?

-- abrarisme
docker
image
kubernetes

1 Answer

2/23/2018

If you run eval $(minikube docker-env) command, your local docker dommand will be actualy run on the docker that is powering minikube. That means that if you use pullPolicy: if NotPresent and set that env, you can use docker build to update that image to a localy built development version (with pullPolicy: Always it would still pull from docker hub).

-- Radek 'Goblin' Pieczonka
Source: StackOverflow