Mael Fosso
Mael Fosso

Reputation: 400

Skaffold dev with remote docker context

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?

Upvotes: 0

Views: 424

Answers (1)

Brian de Alwis
Brian de Alwis

Reputation: 2964

Minikube uses its own Docker installation to power its cluster. This daemon runs in Minikube's VM (or container, if using the docker driver) and is completely independent from the host's Docker daemon (your Desktop). You can access to Minikube's daemon by setting the environment returned by minikube docker-env.

Upvotes: 1

Related Questions