部署Kubernetes - Kubernetes-Dashbo

2018-04-10  本文已影响0人  8411e9740257

参考

部署

  1. 获取镜像

    github: https://github.com/kubernets/kubernetes-dashboard

    docker pull kubernets/kubernetes-dashboard-amd64:v1.8.3
    docker tag kubernets/kubernetes-dashboard-amd64:v1.8.3 k8s.gcr.io/kubernetes-dashboard-amd64:v1.8.3
    docker rmi kubernets/kubernetes-dashboard-amd64:v1.8.3
    
  2. 部署Dashboard UI

    kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml

  3. 访问控制

    vim dashboard-admin.yaml

    apiVersion: rbac.authorization.k8s.io/v1beta1
    kind: ClusterRoleBinding
    metadata:
      name: kubernetes-dashboard
    labels:
      k8s-app: kubernetes-dashboard
    roleRef:
      apiGroup: rbac.authorization.k8s.io
      kind: ClusterRole
      name: cluster-admin
    subjects:
      - kind: ServiceAccount
      name: kubernetes-dashboard
      namespace: kube-system    
    

    kubectl create -f dashboard-admin.yaml

  4. 访问Dashboard UI

    kubectl proxy --address=0.0.0.0 --accept-hosts='^*$'

    http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

上一篇下一篇

猜你喜欢

热点阅读