K8s Web UI (Dashboard)

注意以下创建后的关键步骤: kubectl proxy --address=‘0.0.0.0’ --accept-hosts=’^*$’

坑1

只使用kubectl proxy 只能在localhost 本机访问。(必须加上–address 和 --accept-hosts)

创建过程: https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/
kubectl proxy 使用: https://blog.csdn.net/cuipengchong/article/details/72459299

下面文章关于非localhost机器登陆不了dashboard 部分帮了我大忙,大大的鸣谢 ~~~ (可以在yaml 文件直接设置nodePort ,多机器只能从运行的那台机器IP和端口访问是个坑。还有记得访问时前面是https)

https://www.cnblogs.com/RainingNight/p/deploying-k8s-dashboard-ui.html

因为证书问题过期 ,默认浏览器都不允许访问,请用火狐浏览器访问,然后选择例外

以下获取对应用户的证书token

kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk ‘{print $1}’)

猜你喜欢

转载自blog.csdn.net/xiunai78/article/details/89001320