作者:玄明Hanko 2023-09-11 14:21:00
云计算
云原生
运维 之前部署过Dashboard v1.x的版本,后来Dashboard升级了,按照之前的部署方式部署后,总是出现无法访问的现象,后面又去Github找到最新版的Dashboard 部署方式,特此记录。
站在用户的角度思考问题,与客户深入沟通,找到张店网站设计与张店网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:成都做网站、网站建设、企业官网、英文网站、手机端网站、网站推广、域名注册、网络空间、企业邮箱。业务覆盖张店地区。
这里主要列举以下3个:
之前部署过dashboard v1.x的版本,后来dashboard升级了,按照之前的部署方式部署后,总是出现无法访问的现象,后面又去github找到最新版的dashboard 部署方式,特此记录。
$ kubectl apply -f
https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.3/aio/deploy/recommended.yaml
echo "151.101.108.133 raw.githubusercontent.com" >> /etc/hosts
注意:选择版本时要注意,一定要下载与自己k8s的版本对应dashboard,不然web界面会报404。也就是要看看版本中的"Compatibility"
各版本见官方项目地址:
https://github.com/kubernetes/dashboard github.com/kubernetes/dashboard
我将此服务改为NodePort方式进行部署,方便后续进行测试,镜像地址也修改为阿里云仓库的地址,配置文件地址:
点击直达
github.com/pythonTaotao/kubernetes/tree/master/dashboard
registry.cn-hangzhou.aliyuncs.com/kubernetes_ns/dashboard:v2.0.3
具体如何修改参见此文:
https://www.cnblogs.com/caoxb/p/www.cnblogs.com/caoxb/p/11244285.html
kubectl describe secrets -n kubernetes-dashboard admin-user-token | grep token | awk 'NR==3{print $2}'
[root@master ~]# kubectl get svc -n kubernetes-dashboard
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
dashboard-metrics-scraper ClusterIP 10.100.164.29 8000/TCP 11h
kubernetes-dashboard NodePort 10.107.131.103 443:32136/TCP 11h
https://IP:Port
warning
configmaps is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list configmaps in the namespace "default"
close
warning
persistentvolumeclaims is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list persistentvolumeclaims in the namespace "default"
close
warning
secrets is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list secrets in the namespace "default"
close
warning
services is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list services in the namespace "default"
close
warning
ingresses.extensions is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list ingresses.extensions in the namespace "default"
close
warning
daemonsets.apps is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list daemonsets.apps in the namespace "default"
close
warning
pods is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list pods in the namespace "default"
close
warning
events is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list events in the namespace "default"
close
warning
deployments.apps is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list deployments.apps in the namespace "default"
close
warning
replicasets.apps is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list replicasets.apps in the namespace "default"
close
warning
jobs.batch is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list jobs.batch in the namespace "default"
close
warning
cronjobs.batch is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list cronjobs.batch in the namespace "default"
close
warning
replicationcontrollers is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list replicationcontrollers in the namespace "default"
close
warning
statefulsets.apps is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list statefulsets.apps in the namespace "default"
解决办法安装dashboard-adminuser.yaml
kubectl apply -f https://hub.fastgit.org/pythonTaotao/kubernetes/blob/master/dashboard/dashboard-adminuser.yaml
当前文章:Kubernetes(K8S)管理,图形界面,Web UI
文章分享:http://www.csdahua.cn/qtweb/news36/244136.html
网站建设、网络推广公司-快上网,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 快上网