Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows + minikube + skaffold + non-elevated shell = fail #3073

Open
balopat opened this issue Oct 16, 2019 · 4 comments
Open

Windows + minikube + skaffold + non-elevated shell = fail #3073

balopat opened this issue Oct 16, 2019 · 4 comments
Labels
area/build area/deploy kind/bug Something isn't working platform/minikube platform/windows priority/p3 agreed that this would be good to have, but no one is available at the moment.

Comments

@balopat
Copy link
Contributor

balopat commented Oct 16, 2019

Expected behavior

When skaffold detects that minikube's docker daemon can't be resolved (as the warning shows as well) it should either:

  • fail when build.local.push = false is setup
  • force build.local.push =true when it is not setup

Actual behavior

Skaffold fails to find the minikube docker daemon and hence creates a deployment inside minikube that relies on a non-existent image (as it is not pushed):

C:\Users\balintp\dev\proj\skaffold\examples\getting-started>skaffold dev
time="2019-10-16T15:16:04-07:00" level=warning msg="Could not get minikube docker env, falling back to local docker daemon: getting minikube env: Running [minikube docker-env --shell none]: stdout , stderr: X The docker host is currently not running\n, err: exit st
atus 69: exit status 69"
Generating tags...
 - gcr.io/k8s-skaffold/skaffold-example -> gcr.io/k8s-skaffold/skaffold-example:v0.40.0-58-gd4bd5978-dirty
Tags generated in 413.9981ms
Starting build...
Found [minikube] context, using local docker daemon.
Building [gcr.io/k8s-skaffold/skaffold-example]...
Sending build context to Docker daemon  3.072kB
Step 1/6 : FROM golang:1.12.9-alpine3.10 as builder
 ---> e0d646523991
Step 2/6 : COPY main.go .
 ---> Using cache
 ---> 2015d9353f14
Step 3/6 : RUN go build -o /app main.go
 ---> Using cache
 ---> 0597b5dcee83
Step 4/6 : FROM alpine:3.10
 ---> 961769676411
Step 5/6 : CMD ["./app"]
 ---> Using cache
 ---> a42bf125a1f1
Step 6/6 : COPY --from=builder /app .
 ---> Using cache
 ---> 1cf52c839515
Successfully built 1cf52c839515
Successfully tagged gcr.io/k8s-skaffold/skaffold-example:v0.40.0-58-gd4bd5978-dirty
Build complete in 840.0648ms
Starting test...
Test complete in 1.0005ms
Starting deploy...
kubectl client version: 1.14
pod/getting-started created
Deploy complete in 2.2762852s
Watching for changes...
rpc error: code = Unknown desc = Error response from daemon: manifest for gcr.io/k8s-skaffold/skaffold-example:1cf52c83951577b49c247f19583544e0686629c14245777fd91502cf6488c2e0 not found
Back-off pulling image "gcr.io/k8s-skaffold/skaffold-example:1cf52c83951577b49c247f19583544e0686629c14245777fd91502cf6488c2e0"
rpc error: code = Unknown desc = Error response from daemon: manifest for gcr.io/k8s-skaffold/skaffold-example:1cf52c83951577b49c247f19583544e0686629c14245777fd91502cf6488c2e0 not found

Information

  • Skaffold version: master (0.40+)
  • Operating system: Windows 10 Enterprise
  • Contents of skaffold.yaml: getting started example

Steps to reproduce the behavior

Run Skaffold in a non-admin powershell window against a hyperv minikube instance (that needs admin rights):

  1. getting-started example
  2. skaffold dev
@balopat balopat added area/build area/deploy kind/bug Something isn't working platform/minikube priority/p2 May take a couple of releases labels Oct 16, 2019
@dgageot dgageot assigned dgageot and unassigned dgageot Oct 18, 2019
@nkubala
Copy link
Contributor

nkubala commented Apr 24, 2020

I wonder if this is still an issue 🤔

@nkubala nkubala added priority/p3 agreed that this would be good to have, but no one is available at the moment. and removed priority/p2 May take a couple of releases labels Apr 24, 2020
@dgageot
Copy link
Contributor

dgageot commented Jul 1, 2020

I'm going to close this one. Not sure this is still an issue. Since then, Skaffold now fails on a failed minikube docker-env

@dgageot dgageot closed this as completed Jul 1, 2020
@survivant
Copy link

I have the same problem today

PS C:\windows\system32> minikube version
minikube version: v1.12.3
commit: 2243b4b97c131e3244c5f014faedca0d846599f5-dirty

minikube start --vm-driver=hyperv

skaffold build -p dev
creating runner: creating builder: getting docker client: getting minikube env: running [minikube docker-env --shell none]

  • stdout: "* The control plane node "" does not exist.\n - To fix this, run: "minikube start"\n"
  • stderr: "E0901 08:14:22.467557 24084 main.go:111] libmachine: [stderr =====>] : Hyper-V\Get-VM : Vous ne disposez pas de l'autorisation requise pour effectuer cette t\x83che. Contactez l'administrateur de la strat\x82gie d'autorisation pour l'ordinateur\xffBID00112.\r\nAu caract\x8are Ligne:1 : 3\r\n+ ( H
    yper-V\Get-VM minikube ).state\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : NotSpecified: (:) [Get-VM], VirtualizationException\r\n + FullyQualifiedErrorId : Unspecified,Microsoft.HyperV.PowerShell.Commands.GetVM\r\n \r\n\n"
  • cause: exit status 69

works if I launch skaffold from a "Administrator Powershell"

@briandealwis briandealwis reopened this Sep 1, 2020
@briandealwis
Copy link
Member

@gsquared94 this seems a motivator to make our KubeContext into a proper struct and move the minikube docker-env into the minikube detection. That way if minikube docker-env fails, then we downgrade the a normal non-local cluster KubeContext. WDYT?

@nkubala nkubala added this to the Icebox [P2+] milestone Sep 1, 2020
@nkubala nkubala removed this from the Icebox [P2+] milestone May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build area/deploy kind/bug Something isn't working platform/minikube platform/windows priority/p3 agreed that this would be good to have, but no one is available at the moment.
Projects
None yet
Development

No branches or pull requests

5 participants