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

Getting "panic: runtime error" when using minikube service in 1.25.2 #13736

Closed
purejgleason opened this issue Mar 1, 2022 · 12 comments · Fixed by #13756
Closed

Getting "panic: runtime error" when using minikube service in 1.25.2 #13736

purejgleason opened this issue Mar 1, 2022 · 12 comments · Fixed by #13756
Assignees
Labels
kind/support Categorizes issue or PR as a support question.

Comments

@purejgleason
Copy link

What Happened?

I create a new minikube cluster

minikube start --memory=8192 --cpus=4 -n 2

I create a namespace and deploytment/service...

kubectl create ns foo
kubectl apply -f test-app/app.yml
app.yml
apiVersion: v1
kind: ServiceAccount
metadata:
  namespace: foo
  name: test-app
---
apiVersion: v1
kind: Service
metadata:
  name: test-app
  namespace: foo
  labels:
    app: test-app
    service: test-app
spec:
  ports:
  - name: http
    port: 8000
    targetPort: 80
  selector:
    app: test-app
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-app
  namespace: foo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: test-app
      version: v1
  template:
    metadata:
      labels:
        app: test-app
        version: v1
    spec:
      serviceAccountName: test-app
      containers:
      - image: docker.io/kennethreitz/httpbin
        imagePullPolicy: Always
        name: test-app
        ports:
        - containerPort: 80

Next I start up as a service...

minikube service test-app -n foo --url

in 1.25.1 everything runs fine when I try from 1.25.2 I get...

minikube service test-app -n foo --url    
😿  service foo/test-app has no node port
panic: runtime error: index out of range [3] with length 3

goroutine 1 [running]:
k8s.io/minikube/cmd/minikube/cmd.glob..func35(0x70d4760?, {0xc000ec42c0?, 0x1, 0x4})
	/Users/.../Code/lib/minikube/cmd/minikube/cmd/service.go:138 +0x645
github.com/spf13/cobra.(*Command).execute(0x70d4760, {0xc000ec4280, 0x4, 0x4})
	/Users/.../go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:860 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0x70d4260)
	/Users/.../go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974 +0x3

Attach the log file

log.txt

Operating System

macOS (Default)

Driver

Docker

@purejgleason
Copy link
Author

Also tried compiling from master (and tag) and get the same thing.

@RA489
Copy link

RA489 commented Mar 3, 2022

/kind support

@k8s-ci-robot k8s-ci-robot added the kind/support Categorizes issue or PR as a support question. label Mar 3, 2022
@medyagh
Copy link
Member

medyagh commented Mar 4, 2022

sorry for this inconvenience, I am surprised our integration tests didn't catch this. does this happen only when --url is specified?

@medyagh
Copy link
Member

medyagh commented Mar 4, 2022

maybe could be side effect of this PR
#13367

@ckannon mind taking a look ?

@ckannon
Copy link
Contributor

ckannon commented Mar 4, 2022

/assign

@medyagh
Copy link
Member

medyagh commented Mar 9, 2022

here is the link to the binary from a PR that I think might fix this issue, do you mind trying it out ?

https://storage.googleapis.com/minikube-builds/13756/minikube-linux-amd64
https://storage.googleapis.com/minikube-builds/13756/minikube-darwin-amd64
https://storage.googleapis.com/minikube-builds/13756/minikube-windows-amd64.exe

@purejgleason
Copy link
Author

Built from source and everything looks to be working thank you.

@dgoldsmith
Copy link

The updated darwin binary referenced above works for me on Mac OS X 12.2.1 as well. I was running in to this same issue. I must have had an older version of minikube initially installed and after removing all Docker/Kubernetes bits from laptop to try again for a clean demo, I got minikube 1.25.2 and ran into the broken service tunnel. This patch makes it work again.

@joaquinjsb
Copy link

I'm having the same issue, are u guys gonna publish it as a beta or release it asap ?

thanks

@dhelfgen
Copy link

dhelfgen commented May 4, 2022

I'm having the same issue with windows. How do I use the exe-file? Just replace the exe-file in the installation?

edit: Nevermind, yeah thats how it works.

@edtshuma
Copy link

edtshuma commented Jun 17, 2022

here is the link to the binary from a PR that I think might fix this issue, do you mind trying it out ?

https://storage.googleapis.com/minikube-builds/13756/minikube-linux-amd64 https://storage.googleapis.com/minikube-builds/13756/minikube-darwin-amd64 https://storage.googleapis.com/minikube-builds/13756/minikube-windows-amd64.exe

hi @medyagh @ALL How do I use the exe . I have same issue on Windows 11 minikube install. I have downloaded but it seems its not a click to run type of file. Suggestion is to replace the existing file but I cannot find a similar file in the minikube install path.

Install Path : C:\Users\etshuma_acc\ .minikube (Installed as admin user)

The only reference I got that is similar to the file is :

image

@edtshuma
Copy link

I'm having the same issue with windows. How do I use the exe-file? Just replace the exe-file in the installation?

edit: Nevermind, yeah thats how it works.

@dhelfgen If you can assist at which path did you replace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants