Closed aceeric closed 2 years ago
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
For folks running 1.24+ your quickstart docs don't work - it's required to manually create a service-account-token secret.
service-account-token
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"}'
kubectl -n kube-system get secret headlamp-admin -ojsonpath='{.data.token}{"\n"}'
I just tested and it worked for me...
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.
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:
Then:
kubectl -n kube-system get secret headlamp-admin -ojsonpath='{.data.token}{"\n"}'
I just tested and it worked for me...