kubernetes部署dashboard 1. 简介 Dashboard 是基于网页的 Kubernetes 用户界面。 你可以使用 Dashboard 将容器应用部署到 Kubernetes 集群中,也可以对容器应用排错,还能管理集群资源。 你可以使用 Dashboard 获取运行在集群中的应用的概览信息,也可以创建或者修改 Kubernetes 资源 (如 Deployment、Job、DaemonSet 等等)。 例如,你可以对 Deployment 实现弹性伸缩、发起滚动升级、重启 Pod 或者使用向导创建新的应用。
Dashboard 同时展示了 Kubernetes 集群中的资源状态信息和所有报错信息。
2. 版本兼容性 k8s和dashboard版本存在兼容性关系,版本配套可以到下面的网页查询:https://github.com/kubernetes/dashboard/releases/
以下是部分配套关系:
Kubernetes version
dashboard version
备注
1.18
v2.0.0
完全支持
1.19
v2.0.4
完全支持
1.20
v2.4.0
完全支持
1.21
v2.4.0
完全支持
1.23
v2.5.0
完全支持
1.24
v2.6.0
完全支持
1.25
v2.7.0
完全支持
1.27
v3.0.0-alpha0
完全支持
1.29
kubernetes-dashboard-7.5.0
完全支持
本文使用的k8s版本为1.23,使用dashboard v2.5.0版本 部署。
3. 安装 1 kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.5.0/aio/deploy/recommended.yaml
如果yaml无法下载,可以手动打开网页拷贝到文件中。以下是v2.5.0版本文件内容。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 apiVersion: v1 kind: Namespace metadata: name: kubernetes-dashboard --- apiVersion: v1 kind: ServiceAccount metadata: labels: k8s-app: kubernetes-dashboard name: kubernetes-dashboard namespace: kubernetes-dashboard --- kind: Service apiVersion: v1 metadata: labels: k8s-app: kubernetes-dashboard name: kubernetes-dashboard namespace: kubernetes-dashboard spec: ports: - port: 443 targetPort: 8443 selector: k8s-app: kubernetes-dashboard --- apiVersion: v1 kind: Secret metadata: labels: k8s-app: kubernetes-dashboard name: kubernetes-dashboard-certs namespace: kubernetes-dashboard type: Opaque --- apiVersion: v1 kind: Secret metadata: labels: k8s-app: kubernetes-dashboard name: kubernetes-dashboard-csrf namespace: kubernetes-dashboard type: Opaque data: csrf: "" --- apiVersion: v1 kind: Secret metadata: labels: k8s-app: kubernetes-dashboard name: kubernetes-dashboard-key-holder namespace: kubernetes-dashboard type: Opaque --- kind: ConfigMap apiVersion: v1 metadata: labels: k8s-app: kubernetes-dashboard name: kubernetes-dashboard-settings namespace: kubernetes-dashboard --- kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: labels: k8s-app: kubernetes-dashboard name: kubernetes-dashboard namespace: kubernetes-dashboard rules: - apiGroups: ["" ] resources: ["secrets" ] resourceNames: ["kubernetes-dashboard-key-holder" , "kubernetes-dashboard-certs" , "kubernetes-dashboard-csrf" ] verbs: ["get" , "update" , "delete" ] - apiGroups: ["" ] resources: ["configmaps" ] resourceNames: ["kubernetes-dashboard-settings" ] verbs: ["get" , "update" ] - apiGroups: ["" ] resources: ["services" ] resourceNames: ["heapster" , "dashboard-metrics-scraper" ] verbs: ["proxy" ] - apiGroups: ["" ] resources: ["services/proxy" ] resourceNames: ["heapster" , "http:heapster:" , "https:heapster:" , "dashboard-metrics-scraper" , "http:dashboard-metrics-scraper" ] verbs: ["get" ]--- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: labels: k8s-app: kubernetes-dashboard name: kubernetes-dashboard rules: - apiGroups: ["metrics.k8s.io" ] resources: ["pods" , "nodes" ] verbs: ["get" , "list" , "watch" ]--- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: labels: k8s-app: kubernetes-dashboard name: kubernetes-dashboard namespace: kubernetes-dashboard roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: kubernetes-dashboard subjects: - kind: ServiceAccount name: kubernetes-dashboard namespace: kubernetes-dashboard --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: kubernetes-dashboard roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: kubernetes-dashboard subjects: - kind: ServiceAccount name: kubernetes-dashboard namespace: kubernetes-dashboard --- kind: Deployment apiVersion: apps/v1 metadata: labels: k8s-app: kubernetes-dashboard name: kubernetes-dashboard namespace: kubernetes-dashboard spec: replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: k8s-app: kubernetes-dashboard template: metadata: labels: k8s-app: kubernetes-dashboard spec: securityContext: seccompProfile: type: RuntimeDefault containers: - name: kubernetes-dashboard image: kubernetesui/dashboard:v2.5.0 imagePullPolicy: Always ports: - containerPort: 8443 protocol: TCP args: - --auto-generate-certificates - --namespace=kubernetes-dashboard volumeMounts: - name: kubernetes-dashboard-certs mountPath: /certs - mountPath: /tmp name: tmp-volume livenessProbe: httpGet: scheme: HTTPS path: / port: 8443 initialDelaySeconds: 30 timeoutSeconds: 30 securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true runAsUser: 1001 runAsGroup: 2001 volumes: - name: kubernetes-dashboard-certs secret: secretName: kubernetes-dashboard-certs - name: tmp-volume emptyDir: {} serviceAccountName: kubernetes-dashboard nodeSelector: "kubernetes.io/os": linux tolerations: - key: node-role.kubernetes.io/master effect: NoSchedule --- kind: Service apiVersion: v1 metadata: labels: k8s-app: dashboard-metrics-scraper name: dashboard-metrics-scraper namespace: kubernetes-dashboard spec: ports: - port: 8000 targetPort: 8000 selector: k8s-app: dashboard-metrics-scraper --- kind: Deployment apiVersion: apps/v1 metadata: labels: k8s-app: dashboard-metrics-scraper name: dashboard-metrics-scraper namespace: kubernetes-dashboard spec: replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: k8s-app: dashboard-metrics-scraper template: metadata: labels: k8s-app: dashboard-metrics-scraper spec: securityContext: seccompProfile: type: RuntimeDefault containers: - name: dashboard-metrics-scraper image: kubernetesui/metrics-scraper:v1.0.7 ports: - containerPort: 8000 protocol: TCP livenessProbe: httpGet: scheme: HTTP path: / port: 8000 initialDelaySeconds: 30 timeoutSeconds: 30 volumeMounts: - mountPath: /tmp name: tmp-volume securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true runAsUser: 1001 runAsGroup: 2001 serviceAccountName: kubernetes-dashboard nodeSelector: "kubernetes.io/os": linux tolerations: - key: node-role.kubernetes.io/master effect: NoSchedule volumes: - name: tmp-volume emptyDir: {}
确保dashboard容器运行正常:
1 2 3 4 5 6 7 8 9 10 11 12 13 [root@k8s ~]# kubectl get pod -A NAMESPACE NAME READY STATUS RESTARTS AGE default nginx-6799fc88d8-lxqvx 1/1 Running 2 (3m53s ago) 3h1m kube-flannel kube-flannel-ds-7rfqc 1/1 Running 10 (2m12s ago) 3d21h kube-system coredns-6d8c4cb4d-8sfdr 1/1 Running 3 (2m8s ago) 178m kube-system coredns-6d8c4cb4d-vw7nz 1/1 Running 4 (113s ago) 178m kube-system etcd-k8s 1/1 Running 4 (2m13s ago) 170m kube-system kube-apiserver-k8s 1/1 Running 4 (2m3s ago) 170m kube-system kube-controller-manager-k8s 1/1 Running 3 (2m13s ago) 169m kube-system kube-proxy-97l68 1/1 Running 3 (2m13s ago) 178m kube-system kube-scheduler-k8s 1/1 Running 4 (2m13s ago) 170m kubernetes-dashboard dashboard-metrics-scraper-799d786dbf-rpcft 1/1 Running 3 (2m13s ago) 156m kubernetes-dashboard kubernetes-dashboard-546cbc58cd-2wcrz 1/1 Running 0 156m
4. 访问配置 4.1 开启远程访问 dashboard service默认为ClusterIP,需要配置为NodePort,外部才能访问。
1 2 3 4 5 6 7 [root@k8s ~]# kubectl get svc -A NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE default kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 3d22h default nginx NodePort 10.109.172.88 <none> 80:32409/TCP 3d22h kube-system kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP,9153/TCP 3d22h kubernetes-dashboard dashboard-metrics-scraper ClusterIP 10.102.9.117 <none> 8000/TCP 175m kubernetes-dashboard kubernetes-dashboard ClusterIP 10.97.21.53 <none> 443/TCP 175m
修改svc改为NodePort类型:
1 2 3 4 5 6 7 8 [root@k8s ~]# kubectl edit service kubernetes-dashboard -n kubernetes-dashboard [root@k8s ~]# kubectl get svc -A NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE default kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 3d22h default nginx NodePort 10.109.172.88 <none> 80:32409/TCP 3d22h kube-system kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP,9153/TCP 3d22h kubernetes-dashboard dashboard-metrics-scraper ClusterIP 10.102.9.117 <none> 8000/TCP 3h34m kubernetes-dashboard kubernetes-dashboard NodePort 10.97.21.53 <none> 443:31930/TCP 3h34m
这个时候就可以通过节点IP+31930端口访问dashboard了。dashboard需要使用https访问,自带的证书在最新的chrome、edge浏览器中不受信,切界面无法手动进行确认继续。使用firefox访问可以在界面操作确认继续。
备注:
在较新版本的 Chrome
或Edge
中访问一些未受信任的 HTTPS
页面时,会提示类似 NET::ERR_CERT_INVALID
的错误。以往旧版本中,我们可以选择跳过得以继续访问,但是新版本的 Chrome
中并不允许继续。当出现 “您的连接不是私密” 页面时,点击高级后,并直接输入 thisisunsafe
关键字并回车。
4.2 配置访问认证 dashboard 支持Token和Kubeconfig两种认证方式进行登录。
4.2.1 Token认证 创建Service Account 及 ClusterRoleBinding,创建auth.yaml文件,内容如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 apiVersion: v1 kind: ServiceAccount metadata: name: kubernetes-admin namespace: kubernetes-dashboard --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: kubernetes-admin roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-admin subjects: - kind: ServiceAccount name: kubernetes-admin namespace: kubernetes-dashboard
创建对应的资源:kubectl apply -f auth.yaml
获取访问所需要的Token:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 [root@k8s ~]# kubectl -n kubernetes-dashboard describe secret $(kubectl -n kubernetes-dashboard get secret | grep kubernetes-admin | awk '{print $1}') Name: admin-user-token-khrll Namespace: kubernetes-dashboard Labels: <none> Annotations: kubernetes.io/service-account.name: admin-user kubernetes.io/service-account.uid: 266c923b-ed2f-471b-a8fc-1dde3cc10205 Type: kubernetes.io/service-account-token Data ==== ca.crt: 1099 bytes namespace: 20 bytes token: eyJhbGciOiJSUzI1NiIsImtpZCI6InloSUtPM3R6cG9xVnkzNEx5STBmaTctRDRkWE9jX0Zfa0tKVjlBY3hhY2sifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJhZG1pbi11c2VyLXRva2VuLWtocmxsIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6ImFkbWluLXVzZXIiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiIyNjZjOTIzYi1lZDJmLTQ3MWItYThmYy0xZGRlM2NjMTAyMDUiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6a3ViZXJuZXRlcy1kYXNoYm9hcmQ6YWRtaW4tdXNlciJ9.nYgOBdscFaO3_JUHAC3hX5F-4Imx4RFAu1UA05tbufI6VgR5npJHPBCriNkseo02qaSsjlBwr7slzUcIALC4F16oTVrVHuuPMPSaqrqi-VjoEdd_ZB7vbX6qH7KbAabzmwW966PoXwOiARjraU2CMTmA9dFfk4MkSiwrySUxNUrwQ02isPMDIUxeF5RGESXff7kBzgNFkhwdEuLopmK9k6i0CyuM2ns3TpMO_2TcBlPkDViag1JxixatBJuz9x-OJS-Tnt5A1pmc9J-76MSH7fTRHu3sim2RIPq29QV5EXc4kwyAxha6fnNC3aCTiU9nsDR6E24qYK70ULJKVGxxIQ
4.2.2 kubeconfig认证 如果是使用kubeadmin部署的集群,默认会在下面路径生成一个kubeconfig文件:/etc/kubernetes/admin.conf
,下载该文件并编辑,在该文件将上面的toekn加入文件末尾。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 apiVersion: v1 clusters: - cluster: certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMvakNDQWVhZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJME1EWXhNVEUwTURJd00xb1hEVE0wTURZd09URTBNREl3TTFvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBT2RUCjFSU3FmM3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LdVhTdmRESm1uQ3psYnE2V2I5N29UdkVaTDJnMlJwMW5Ua1hTSU10Nk41bU1TNXVrYVMKbWVzPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== server: https://192.168.0.159:6443 name: kubernetes contexts: - context: cluster: kubernetes user: kubernetes-admin name: kubernetes-admin@kubernetes current-context: kubernetes-admin@kubernetes kind: Config preferences: {} users: - name: kubernetes-admin user: client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURJVENDQWdtZ0F3SUJBZ0lJWiszaHUzTDI2aGN3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TkRBMk1URXhOREF5TUROYUZ3MHlOVEEyTVRVd09EVTBNRFphTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0ZrCmJXbHVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTJ5amFFSi9kSTlDcUhuL2cKWm5CZXhOTG1NTmJRNWltd1pBSnBCTzFyT3A3ZE1JN2ZXZUlvRnN4SlpDUFpodU5SSFhhK29XYjQvM0hYMGl6QgpadGVSeEJUS1F2UkxkT0x5Qnk3SXUyS0JISmJNLzA0bE16cXBlVlVycll4YmkxZjJ1YXZaUXllZjJ1S3g2b1FPCjJPTTZ6RmMwbHNuSFhjYnpOamtWc0wzdElFZXBiVDJsNlFRVDlwOEI5OWs2alBCNDgwOGVPVGRDMEpSK25rTEEKRnhhN05qK2VBU3ZaTTQwbm5qK3BRdUVBWS9SZWF6UU1sTGhRN3hVV1p4WWtJQXZ6eU51Z1ZsazR3VjVrUk1maAplODZjaERKQ05ITERqR1FDdVR0QmluY3c2QWt1RWtMRmk5cnBLL2hrYVZQdFVaekxBNjFFdnZjUzZVVGNLS1BqCnNWT3AzUUlEQV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CIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJrdWJlcm5ldGVzLWFkbWluLXRva2VuLTc4NWN0Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6Imt1YmVybmV0ZXMtYWRtaW4iLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiJmMjA2YzUyOC1iMzkyLTQzNDItOWU1Ny02ZjM2YjRkZjgyZWYiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6a3ViZXJuZXRlcy1kYXNoYm9hcmQ6a3ViZXJuZXRlcy1hZG1pbiJ9.FvL4BtAbTGlBZfQcY72AnI2ynBswv7Ug12jczmRoGp1iSRLYPT9kmyEkT13SuggWxxuEDvwwwelgHZ5x6WOO6jSeqCyPwPoojVhszvd56gmiVs2g6Rlqpe2ZCNHY4UXcWg7XXF3FpoLv-760XgxAxy6DHFy_4D31el-DRVn-R3Qy-ji4a7wukQWTBpXo2DY-_ZWBpOeVPX6qjaRTEodBNve8_YU9rOA3HMH380jtfAyoBfT5igCED-15gNilj-IdoCEJWO3mersSzi_HY9OunOqs5ADuhCtdCMSMKUFibSyt_6qkRxvD7ws0d74rCZ2VUKzFMalX9yZ4i0n5sGlAsA
然后登录dashboard选择下载的kubeconfig文件即可进行登录。
5. 参考资料
artifacthub:https://artifacthub.io/packages/helm/k8s-dashboard/kubernetes-dashboard
github仓库:https://github.com/kubernetes/dashboard
部署和访问 Kubernetes 仪表板(Dashboard):https://kubernetes.io/zh-cn/docs/tasks/access-application-cluster/web-ui-dashboard/