k8s token 相关

kubernetes dashboard 查看的token不能使用的原因

在dashboard面板查看的token是bash64编码后的值
使用 kubectl get secret namespace-controller-token-4nfh7  -n kube-system -o jsonpath={".data.token"}得到的是也是token是bash64编码后的值
使用 kubectl get secret namespace-controller-token-4nfh7  -n kube-system -o jsonpath={".data.token"}| base64 -d 得到的是token的值
使用 kubectl -n kube-system describe $(kubectl -n kube-system get secret -n kube-system -o name | grep namespace) 得到的是token的值
posted @ 2022-07-22 10:44  tangshow  阅读(130)  评论(0编辑  收藏  举报