Skaffold dev with remote docker context

  docker, kubernetes, minikube, skaffold

I am working on a web application with all the infrastructure based on Kubernetes. In my local environment, I am using Skaffold.
I have two computers (Desktop and Laptop) with 8Gb of RAM each. By starting minikube (virtualbox driver) and skaffold dev the Deskop is freezing.

So I decided to use the Laptop for coding and the Desktop for running minikube and everything related.

I successfully managed to set up kubeconfig on the laptop to have a context with the minikube server.

Actually, The issue is skaffold.
When I run skaffold dev, it fails because minikube of the Deskop doesn’t see the images build by skaffold on my laptop. kubectl get po returns ImagePullBackOff.
That is because skaffold uses the local docker to build the image.
The question is how to make skaffold use the docker install in my Desktop?
I changed the docker context of my laptop so that it’s linked to the Desktop context but it’s still not working, skaffold is still using the default docker context installed in my laptop.

How to make the images build by Skaffold being available on my Desktop?
Is it possible for Skaffold to use a remote docker context? If yes, how?

Source: Docker Questions

LEAVE A COMMENT