Kubernetes Web UI

2020-04-13  本文已影响0人  HaythamXu

指路牌

环境

参考资料

kubernetes.io
github-kubernetes/dashboard

步骤

获取Kubernetes Dashboard UI

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml

最新命令参考官网

创建账号

apiVersion: v1
kind: ServiceAccount
metadata:
  name: admin-user
  namespace: kubernetes-dashboard
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: admin-user
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: ServiceAccount
  name: admin-user
  namespace: kubernetes-dashboard
kubectl apply -f dashboard-adminuser.yaml 
kubectl apply -f dashboard-clusterrolebinding.yaml
Name:         admin-user-token-v57nw
Namespace:    kubernetes-dashboard
Labels:       <none>
Annotations:  kubernetes.io/service-account.name: admin-user
              kubernetes.io/service-account.uid: 0303243c-4040-4a58-8a47-849ee9ba79c1

Type:  kubernetes.io/service-account-token

Data
====
ca.crt:     1066 bytes
namespace:  20 bytes
token:      !! HERE IS TOKEN !!

获取后最好单独保存一下
最新步骤参考官网

启动

kubectl proxy

后记

流程不是很复杂, 但是官方把流程分别写在了两个不同的地方,此处仅整理简化,文档随时会更新,请以官方为准,2020-04-13

我的博客即将同步至腾讯云+社区,邀请大家一同入驻:https://cloud.tencent.com/developer/support-plan?invite_code=31w7xws35pa8w

上一篇下一篇

猜你喜欢

热点阅读