skaffold diagnose fails when Minikube is current cluster/context and is in stopped state.

Created on 29 Jun 2020  Â·  8Comments  Â·  Source: GoogleContainerTools/skaffold

Setup:

  • Have Minikube set up as a current cluster and context
  • Pause it
  • Make sure no Docker is running
  • Go to a valid Skaffold supported project
  • Run skaffold" diagnose --yaml-only
  • Results in an unexpected error:
creating runner: creating builder: getting docker client: getting minikube env: running [minikube docker-env --shell none]
 - stdout: "* The control plane node must be running for this command\n  - To fix this, run: \"minikube start\"\n"
 - stderr: ""
 - cause: exit status 69

The same sequence works with any other cluster, started/stopped Minikube and doesn't require Docker to be present.

This issue results in a unsupported builders UI for Cloud Code.

arediagnose ide kinbug prioritp1

All 8 comments

Can't reproduce with minikube v1.9.2 and skaffold master branch

Can't reproduce either with minikube v1.11.0 or older versions of Skaffold. @ivanporty which version of minikube are you using?

v1.10.1

It seems my Minikube was in some paused/stopped non-standard mode although what it printed hints to stopped more.

$ /usr/local/bin/minikube status
minikube
type: Control Plane
host: Stopped
kubelet: Stopped
apiserver: Stopped
kubeconfig: Stopped

ivanporty-macbookpro2:untitled ivanporty$ pwd
/Users/ivanporty/Documents/code/hacks/cloudrun/untitled
ivanporty-macbookpro2:untitled ivanporty$ "/Users/ivanporty/Library/Application Support/cloud-code/bin/versions/8409c589921e86c7502501bcf008deaea7066f73286b757f4c2f083cea56fc28/skaffold" diagnose --yaml-only
creating runner: creating builder: getting docker client: getting minikube env: running [minikube docker-env --shell none]
 - stdout: "* The control plane node must be running for this command\n  - To fix this, run: \"minikube start\"\n"
 - stderr: ""
 - cause: exit status 69

After I stop explicitly, it started working.

$ /usr/local/bin/minikube stop
✋  Stopping "minikube" in hyperkit ...
🛑  Node "minikube" stopped.
ivanporty-macbookpro2:untitled ivanporty$ "/Users/ivanporty/Library/Application Support/cloud-code/bin/versions/8409c589921e86c7502501bcf008deaea7066f73286b757f4c2f083cea56fc28/skaffold" diagnose --yaml-only
apiVersion: skaffold/v2beta5
kind: Config
build:
  artifacts:
  - image: java-hello-world
...

Once stopped and restarted, it doesn't reproduce anymore, although I would not expect skaffold diagnose to fail anyway.

I can't reproduce the error. However, I was able to make skaffold hang for multiple seconds with those commands:

minikube start
eval $(minikube -p minikube docker-env)
minikube stop
skaffold diagnose --yaml-only

I saw same with dev command as well while Minikube was in this mysterious state:

Screen Shot 2020-06-30 at 11 31 36 AM

OK, I found out how to reproduce that "mysterious" state:

Start minikube and then reboot your machine. The k8s context will still be set to minikube (unlike when you manually run minikube stop) so skaffold diagnose --yaml-only will indeed fail.

@ivanporty Got a fix

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ahmad-musleh picture ahmad-musleh  Â·  3Comments

strikeout picture strikeout  Â·  4Comments

heroic picture heroic  Â·  4Comments

Hudsonzp picture Hudsonzp  Â·  4Comments

garvincasimir picture garvincasimir  Â·  4Comments