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

"Forward port" is stuck pending when permissions are restricted using a ClusterRole #2946

Open
artiommocrenco-amdaris opened this issue Feb 24, 2025 · 4 comments
Labels
bug Something isn't working k8s K8s compatibility-related issues/features

Comments

@artiommocrenco-amdaris
Copy link

artiommocrenco-amdaris commented Feb 24, 2025

Describe the bug

"Forward port" is stuck pending when permissions are restricted using a similar ClusterRole:

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: developers-extended
rules:
  - apiGroups:
      - "*"
    resources:
      - "*"
    verbs:
      - list
      - get
      - watch
  - apiGroups:
      - ""
    resources:
      - pods/portforward
    verbs:
      - get
      - list
      - create

To Reproduce

Steps to reproduce the bug:

  1. Restrict a subject using ClusterRole from above (I was using service account and token)
  2. Find a service, try to "Forward port"
  3. The process is stuck, even after waiting several minutes

Expected results: port is forwarded or an error message is shown

Image

Image

Environment (please provide info about your environment):

  • Installation type: winget
  • Headlamp Version: 0.28.1
  • Other: Windows 11

Are you able to fix this issue?

No

Additional Context

Works using kubectl port-forward svc/myservice 8080:80 and in aptakube using the same kubeconfig in both cases, but doesn't work with Headlamp.

Works as expected with Headlamp using cluster admin kubeconfig (using TLS client auth).

@artiommocrenco-amdaris artiommocrenco-amdaris added the bug Something isn't working label Feb 24, 2025
@dosubot dosubot bot added the k8s K8s compatibility-related issues/features label Feb 24, 2025
@artiommocrenco-amdaris
Copy link
Author

#2936 could be related, as I was using a service account with a token

@anengineerdude
Copy link

Having issues as well the fixes in 0.28.1 related to port forward did not fix for me

@Davidr1963
Copy link

Having issues as well the fixes in 0.28.1 related to port forward did not work. It just get the Spinning wheel that it is trying.

@artiommocrenco-amdaris
Copy link
Author

still not working for me in 0.29.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working k8s K8s compatibility-related issues/features
Projects
Development

No branches or pull requests

3 participants