[Kubernetes] Add dashboard

Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
pull/439/head
Kang HuaiShuai 2020-01-09 16:57:38 +08:00
parent 386b1e4cf6
commit e77c9ecbab
No known key found for this signature in database
GPG Key ID: 0A380828B1C243A7
5 changed files with 54 additions and 2 deletions

View File

@ -112,6 +112,7 @@ module.exports = {
"setup/kubeadm", "setup/kubeadm",
"setup/docker-desktop", "setup/docker-desktop",
"setup/systemd", "setup/systemd",
"setup/dashboard",
] ]
}, },
{ {

View File

@ -124,6 +124,7 @@
* [使 kubeadm kubernetes](kubernetes/setup/kubeadm.md) * [使 kubeadm kubernetes](kubernetes/setup/kubeadm.md)
* [ Docker Desktop 使](kubernetes/setup/docker-desktop.md) * [ Docker Desktop 使](kubernetes/setup/docker-desktop.md)
* [ kubernetes ](kubernetes/setup/systemd.md) * [ kubernetes ](kubernetes/setup/systemd.md)
* [ Dashboard](kubernetes/setup/dashboard.md)
* [Kubernetes kubectl](kubernetes/kubectl/README.md) * [Kubernetes kubectl](kubernetes/kubectl/README.md)
* [](cloud/README.md) * [](cloud/README.md)
* [](cloud/intro.md) * [](cloud/intro.md)
@ -160,8 +161,8 @@
* [MongoDB](appendix/repo/mongodb.md) * [MongoDB](appendix/repo/mongodb.md)
* [Redis](appendix/repo/redis.md) * [Redis](appendix/repo/redis.md)
* [Docker ](appendix/command/README.md) * [Docker ](appendix/command/README.md)
* [ (docker)](appendix/command/docker.md) * [ -- docker](appendix/command/docker.md)
* [ (dockerd)](appendix/command/dockerd.md) * [ -- dockerd](appendix/command/dockerd.md)
* [Dockerfile ](appendix/best_practices.md) * [Dockerfile ](appendix/best_practices.md)
* [ Docker](appendix/debug.md) * [ Docker](appendix/debug.md)
* [](appendix/resources.md) * [](appendix/resources.md)

View File

@ -0,0 +1,45 @@
# Kubernetes Dashboard
[Kubernetes Dashboard](https://github.com/kubernetes/dashboard) 是基于网页的 Kubernetes 用户界面。
![](https://d33wubrfki0l68.cloudfront.net/349824f68836152722dab89465835e604719caea/6e0b7/images/docs/ui-dashboard.png)
##
Dashboard
```bash
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml
```
## 访
访
```bash
$ kubectl proxy
```
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/ 即可访问。
##
Dashboard 使 Bearer
```bash
$ kubectl create sa dashboard-admin -n kube-system
$ kubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin
$ ADMIN_SECRET=$(kubectl get secrets -n kube-system | grep dashboard-admin | awk '{print $1}')
$ DASHBOARD_LOGIN_TOKEN=$(kubectl describe secret -n kube-system ${ADMIN_SECRET} | grep -E '^token' | awk '{print $2}')
echo ${DASHBOARD_LOGIN_TOKEN}
```
##
* [](https://kubernetes.io/zh/docs/tasks/access-application-cluster/web-ui-dashboard/)

View File

@ -181,3 +181,7 @@ $ kubectl taint nodes --all node-role.kubernetes.io/master-
# #
# $ kubectl taint nodes NODE_NAME node-role.kubernetes.io/master=true:NoSchedule # $ kubectl taint nodes NODE_NAME node-role.kubernetes.io/master=true:NoSchedule
``` ```
##
* [](https://kubernetes.io/zh/docs/setup/independent/create-cluster-kubeadm/)

View File

@ -3,5 +3,6 @@ DOCKER_COMPOSE_VERSION=1.24.1
DOCKER_MACHINE_VERSION=0.16.1 DOCKER_MACHINE_VERSION=0.16.1
ETCD_VERSION=3.4.0 ETCD_VERSION=3.4.0
KUBERNETES_VERSION=1.14.3 KUBERNETES_VERSION=1.14.3
KUBERNETES_DASHBOARD=2.0.0-beta8
UBUNTU=18.04 UBUNTU=18.04
DEBIAN=9 DEBIAN=9