“Kubernetes-dashboard安装”的版本间的差异
跳到导航
跳到搜索
docker>Evan |
小 (导入1个版本) |
(没有差异)
|
2019年10月14日 (一) 13:48的最新版本
ins
1.安装是一定要FQ 2. docker pull k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.1 kubectl get pod --all-namespaces kubectl describe pod kubernetes-dashboard-54fb766c84-cnj98 --namespace=kube-system #开始安装 wget https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/alternative/kubernetes-dashboard.yaml kubectl create -f kubernetes-dashboard.yaml kubectl --namespace=kube-system get deployment kubernetes-dashboard NAME READY UP-TO-DATE AVAILABLE AGE kubernetes-dashboard 0/1 1 0 105s kubernetes-dashboard 1/1 1 1 21m #修改配置 evan@k8s-master:~$ kubectl --namespace=kube-system edit service kubernetes-dashboard service/kubernetes-dashboard edited type: ClusterIP --> type: NodePort evan@k8s-master:~$ kubectl --namespace=kube-system get service kubernetes-dashboard NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes-dashboard NodePort 10.102.158.92 <none> 80:30875/TCP 2m27s kubectl get secret --all-namespaces|grep dashboard kube-system kubernetes-dashboard-token-88d6q kubernetes.io/service-account-token 3 36m evan@k8s-master:~$ kubectl describe secret/kubernetes-dashboard-token-88d6q -n kube-system 有问题FQ delete 就行 kubectl delete -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/alternative/kubernetes-dashboard.yaml #权限配置 cat 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 apply -f dashboard-admin.yaml clusterrolebinding.rbac.authorization.k8s.io/kubernetes-dashboard created masterip:nodeport