这里主要列举以下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-dashboardNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEdashboard-metrics-scraper ClusterIP 10.100.164.29 <none> 8000/TCP 11hkubernetes-dashboard NodePort 10.107.131.103 <none> 443:32136/TCP 11h
https://IP:Port
warningconfigmaps is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list configmaps in the namespace "default"closewarningpersistentvolumeclaims is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list persistentvolumeclaims in the namespace "default"closewarningsecrets is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list secrets in the namespace "default"closewarningservices is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list services in the namespace "default"closewarningingresses.extensions is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list ingresses.extensions in the namespace "default"closewarningdaemonsets.apps is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list daemonsets.apps in the namespace "default"closewarningpods is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list pods in the namespace "default"closewarningevents is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list events in the namespace "default"closewarningdeployments.apps is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list deployments.apps in the namespace "default"closewarningreplicasets.apps is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list replicasets.apps in the namespace "default"closewarningjobs.batch is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list jobs.batch in the namespace "default"closewarningcronjobs.batch is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list cronjobs.batch in the namespace "default"closewarningreplicationcontrollers is forbidden: User "system:serviceaccount:kube-system:kubernetes-dashboard" cannot list replicationcontrollers in the namespace "default"closewarningstatefulsets.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
责任编辑:姜华 来源: 今日头条 kubernetesk8s(责任编辑:时尚)
海外客商抢抓中国新春机遇 境外消费回流对进口消费产生一定带动作用
“BORDEAUX波尔多”案入选2019年度“知识产权司法保护十大典型案件”
《辐射4》新MOD加入DLSS2、FSR2.0和XeSS支持