侧边栏壁纸
博主头像
枕头下放双臭袜子博主等级

今我何功德,曾不事农桑

  • 累计撰写 162 篇文章
  • 累计创建 30 个标签
  • 累计收到 0 条评论
k8s

k8s-dashboard-chrome-visit

枕头下放双臭袜子
2020-05-12 / 0 评论 / 0 点赞 / 445 阅读 / 0 字 / 正在检测是否收录...

搭建k8s集群过程中使用了dashboard,但是却无法使用chrome、Edge 10等浏览器访问,只有火狐一家行,为了不再多装个软件,那就解决一下这个问题吧。
image.png

#生成证书
mkdir key && cd key
openssl genrsa -out dashboard.key 2048 
openssl req -new -out dashboard.csr -key dashboard.key -subj '/CN=192.168.246.200'
openssl x509 -req -in dashboard.csr -signkey dashboard.key -out dashboard.crt 
#删除原有的证书secret
kubectl delete secret kubernetes-dashboard-certs -n kube-system
#创建新的证书secret
kubectl create secret generic kubernetes-dashboard-certs --from-file=dashboard.key --from-file=dashboard.crt -n kube-system

#删除原有的dashboard的pod
# kubectl delete deployment kubernetes-dashboard --namespace=kube-system 
# kubectl delete service kubernetes-dashboard  --namespace=kube-system 
# kubectl delete role kubernetes-dashboard-minimal --namespace=kube-system 
# kubectl delete rolebinding kubernetes-dashboard-minimal --namespace=kube-system
# kubectl delete sa kubernetes-dashboard --namespace=kube-system 
# kubectl delete secret kubernetes-dashboard-certs --namespace=kube-system

# 创建dashboard-pod
# kubectl apply -f kubernetes-dashboard.yaml

image.png

参考来源:
https://www.jianshu.com/p/8021285cc37d

0

评论