headlamp-k8s / headlamp

A Kubernetes web UI that is fully-featured, user-friendly and extensible
https://headlamp.dev
Apache License 2.0
2.22k stars 156 forks source link

Kubernetes 1.24+ #687

Closed aceeric closed 2 years ago

aceeric commented 2 years ago

Current situation

Regarding this doc page

In Kubernetes 1.24+ you don't automatically get service account secrets and tokens. See: https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.24.md#no-really-you-must-read-this-before-you-upgrade

Impact

For folks running 1.24+ your quickstart docs don't work - it's required to manually create a service-account-token secret.

Ideal future situation

Since the following approach should backward-compatible, you could add this to your quick-start YAML manifest:

apiVersion: v1
kind: Secret
metadata:
  name: headlamp-admin
  namespace: kube-system
  annotations:
    kubernetes.io/service-account.name: headlamp-admin
type: kubernetes.io/service-account-token

Then: kubectl -n kube-system get secret headlamp-admin -ojsonpath='{.data.token}{"\n"}'

I just tested and it worked for me...

illume commented 2 years ago

Hey hey. Thanks @aceeric for the issue report and suggestion about the extra yaml snippet.

I think @yolossn did something like this for the recent minikube addon. I'll make a PR.