k8s安装dashboard(未解决)

第一种,用helm安装

helm repo update
Hang tight while we grab the latest from your chart repositories...
...Skip local chart repository
...Successfully got an update from the "stable" chart repository
Update Complete.
[root@k8s-master templates]# helm repo list
NAME    URL
stable  https://kubernetes-charts.storage.googleapis.com
local   http://127.0.0.1:8879/charts
[root@k8s-master templates]# helm fetch stable/kubernetes-dashboard
[[email protected] templates]# ls
deployment.yaml  kubernetes-dashboard-1.10.1.tgz  service.yaml
[root@k8s-master templates]# tar -zvxf kubernetes-dashboard-1.10.1.tgz
kubernetes-dashboard/Chart.yaml
tar: kubernetes-dashboard/Chart.yaml:不可信的旧时间戳 1970-01-01 08:00:00
kubernetes-dashboard/values.yaml
tar: kubernetes-dashboard/values.yaml:不可信的旧时间戳 1970-01-01 08:00:00
kubernetes-dashboard/templates/NOTES.txt
tar: kubernetes-dashboard/templates/NOTES.txt:不可信的旧时间戳 1970-01-01 08:00:00
kubernetes-dashboard/templates/_helpers.tpl
tar: kubernetes-dashboard/templates/_helpers.tpl:不可信的旧时间戳 1970-01-01 08:00:00
kubernetes-dashboard/templates/clusterrole-readonly.yaml
tar: kubernetes-dashboard/templates/clusterrole-readonly.yaml:不可信的旧时间戳 1970-01-01 08:00:00
kubernetes-dashboard/templates/deployment.yaml
tar: kubernetes-dashboard/templates/deployment.yaml:不可信的旧时间戳 1970-01-01 08:00:00
kubernetes-dashboard/templates/ingress.yaml
tar: kubernetes-dashboard/templates/ingress.yaml:不可信的旧时间戳 1970-01-01 08:00:00
kubernetes-dashboard/templates/networkpolicy.yaml
tar: kubernetes-dashboard/templates/networkpolicy.yaml:不可信的旧时间戳 1970-01-01 08:00:00
kubernetes-dashboard/templates/pdb.yaml
tar: kubernetes-dashboard/templates/pdb.yaml:不可信的旧时间戳 1970-01-01 08:00:00
kubernetes-dashboard/templates/role.yaml
tar: kubernetes-dashboard/templates/role.yaml:不可信的旧时间戳 1970-01-01 08:00:00
kubernetes-dashboard/templates/rolebinding.yaml
tar: kubernetes-dashboard/templates/rolebinding.yaml:不可信的旧时间戳 1970-01-01 08:00:00
kubernetes-dashboard/templates/secret.yaml
tar: kubernetes-dashboard/templates/secret.yaml:不可信的旧时间戳 1970-01-01 08:00:00
kubernetes-dashboard/templates/serviceaccount.yaml
tar: kubernetes-dashboard/templates/serviceaccount.yaml:不可信的旧时间戳 1970-01-01 08:00:00
kubernetes-dashboard/templates/svc.yaml
tar: kubernetes-dashboard/templates/svc.yaml:不可信的旧时间戳 1970-01-01 08:00:00
kubernetes-dashboard/.helmignore
tar: kubernetes-dashboard/.helmignore:不可信的旧时间戳 1970-01-01 08:00:00
kubernetes-dashboard/README.md
tar: kubernetes-dashboard/README.md:不可信的旧时间戳 1970-01-01 08:00:00
[root@k8s-master templates]# cd kubernetes-dashboard/
[[email protected] kubernetes-dashboard]# ll
总用量 28
-rwxr-xr-x 1 root root   468 1月   1 1970 Chart.yaml
-rwxr-xr-x 1 root root 12858 1月   1 1970 README.md
drwxr-xr-x 2 root root   264 1月   6 21:50 templates
-rwxr-xr-x 1 root root  5470 1月   1 1970 values.yaml
[root@k8s-master kubernetes-dashboard]# vim kubernetes-dashboard.yaml
[[email protected] kubernetes-dashboard]# ll
总用量 32
-rwxr-xr-x 1 root root   468 1月   1 1970 Chart.yaml
-rw-r--r-- 1 root root   376 1月   6 21:58 kubernetes-dashboard.yaml
-rwxr-xr-x 1 root root 12858 1月   1 1970 README.md
drwxr-xr-x 2 root root   264 1月   6 21:50 templates
-rwxr-xr-x 1 root root  5470 1月   1 1970 values.yaml
[[email protected] kubernetes-dashboard]# helm install . \
> -n kubernetes-dashboard > --namespace kube-system > -f kubernetes-dashboard.yaml
NAME:   kubernetes-dashboard
LAST DEPLOYED: Mon Jan  6 22:03:50 2020
NAMESPACE: kube-system
STATUS: DEPLOYED

RESOURCES:
==> v1/Deployment
NAME                  READY  UP-TO-DATE  AVAILABLE  AGE
kubernetes-dashboard  0/1    1           0          0s

==> v1/Pod(related)
NAME                                  READY  STATUS             RESTARTS  AGE
kubernetes-dashboard-bfdf5fc85-vrgqg  0/1    ContainerCreating  0         0s

==> v1/Role
NAME                  AGE
kubernetes-dashboard  0s

==> v1/RoleBinding
NAME                  AGE
kubernetes-dashboard  0s

==> v1/Secret
NAME                  TYPE    DATA  AGE
kubernetes-dashboard  Opaque  0     0s

==> v1/Service
NAME                  TYPE       CLUSTER-IP    EXTERNAL-IP  PORT(S)  AGE
kubernetes-dashboard  ClusterIP  10.107.6.189  <none>       443/TCP  0s

==> v1/ServiceAccount
NAME                  SECRETS  AGE
kubernetes-dashboard  1        0s

==> v1beta1/Ingress
NAME                  HOSTS            ADDRESS  PORTS  AGE
kubernetes-dashboard  k8s.frognew.com  80, 443  0s

NOTES:
*********************************************************************************
*** PLEASE BE PATIENT: kubernetes-dashboard may take a few minutes to install ***
*********************************************************************************
From outside the cluster, the server URL(s) are:
     https://k8s.frognew.com
[[email protected] kubernetes-dashboard]# kubectl get svc -n kube-system
NAME                   TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                  AGE
kube-dns               ClusterIP   10.96.0.10       <none>        53/UDP,53/TCP,9153/TCP   17d
kubernetes-dashboard   ClusterIP   10.107.6.189     <none>        443/TCP                  110s
tiller-deploy          ClusterIP   10.102.114.107   <none>        44134/TCP                23h
[root@k8s-master kubernetes-dashboard]# kubectl edit kubernetes-dashboard -n kube-system
error: the server doesn‘t have a resource type "kubernetes-dashboard"
[root@k8s-master kubernetes-dashboard]# kubectl edit svc kubernetes-dashboard -n kube-system
service/kubernetes-dashboard edited
[root@k8s-master kubernetes-dashboard]# kubectl get svc -n kube-system
NAME                   TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                  AGE
kube-dns               ClusterIP   10.96.0.10       <none>        53/UDP,53/TCP,9153/TCP   17d
kubernetes-dashboard   NodePort    10.107.6.189     <none>        443:31961/TCP            3m39s
tiller-deploy          ClusterIP   10.102.114.107   <none>        44134/TCP                23h
[root@k8s-master kubernetes-dashboard]# kubectl -n kube-system get secret | grep kubernetes-dashboard-token
kubernetes-dashboard-token-qxxpr                 kubernetes.io/service-account-token   3      4m56s
[root@k8s-master kubernetes-dashboard]# kubectl -n kube-system get secret | grep kubernetes-dashboard
kubernetes-dashboard                             Opaque                                0      5m5s
kubernetes-dashboard-key-holder                  Opaque                                2      4m59s
kubernetes-dashboard-token-qxxpr                 kubernetes.io/service-account-token   3      5m5s
[root@k8s-master kubernetes-dashboard]# kubectl -n kube-system get secret | grep kubernetes-dashboard-token-qxxpr
kubernetes-dashboard-token-qxxpr                 kubernetes.io/service-account-token   3      5m13s
[root@k8s-master kubernetes-dashboard]# kubectl describe secret kubernetes-dashboard-token-qxxpr -n kube-system
Name:         kubernetes-dashboard-token-qxxpr
Namespace:    kube-system
Labels:       <none>
Annotations:  kubernetes.io/service-account.name: kubernetes-dashboard
              kubernetes.io/service-account.uid: 844c78bd-979b-478a-9c84-b5997706f8a4

Type:  kubernetes.io/service-account-token

Data
====
ca.crt:     1025 bytes
namespace:  11 bytes
token:      eyJhbGciOiJSUzI1NiIsImtpZCI6IktTaWpWSDJoem5WTzNZdExreU9sV2dqLVpTa1NzVHdZeE56clZuZ2JxQncifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJrdWJlcm5ldGVzLWRhc2hib2FyZC10b2tlbi1xeHhwciIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6Ijg0NGM3OGJkLTk3OWItNDc4YS05Yzg0LWI1OTk3NzA2ZjhhNCIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDprdWJlLXN5c3RlbTprdWJlcm5ldGVzLWRhc2hib2FyZCJ9.HZviLVDSTdZ-n4Q08tYR_z5EGE1tAbTJ4vm7MEQ1haCD4HtnEGwgvvZmAsISNz38VHWh5ASIJW6CVHbU6a3Q7YYAp4jTVB9GMGNXaKKMIIgzNoMz_r_Sts0CCBcziotaVKMFiH5zudPm6TdJViAaCwrmCUZEL-mRel5QEOfT0MPq9KNI-0smmC3L2wKPlgfTT6MLx1pv3F5hQ5quZqXa2XUSLlUNpg1p8Vzan0KMCoXmgnax-u7BniA5HCIBqv7MZ1Yobo6v8dp2nE9o23f8yebyWT_dxSvZ59kenCpYlpLFxKKAcnko2w6Cg2PcV-qJydU-Y2xcNYOpke15HgITig
[[email protected] kubernetes-dashboard]# ll
总用量 32
-rwxr-xr-x 1 root root   468 1月   1 1970 Chart.yaml
-rw-r--r-- 1 root root   376 1月   6 21:58 kubernetes-dashboard.yaml
-rwxr-xr-x 1 root root 12858 1月   1 1970 README.md
drwxr-xr-x 2 root root   264 1月   6 21:50 templates
-rwxr-xr-x 1 root root  5470 1月   1 1970 values.yaml
[root@k8s-master kubernetes-dashboard]# cat kubernetes-dashboard.yaml
image:
  repository: k8s.gcr.io/kubernetes-dashboard-amd64
  tag: v1.10.1
ingress:
  enabled: true
  hosts:
    - k8s.frognew.com
  annotations:
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
  tls:
    - secretName: frognew-com-tls-secret
      hosts:
      - k8s.frognew.com
  rbac:
    clusterAdminRole: true

但是登陆的时候会报错,权限不足,暂时还没有办法解决

第二种,直接下载yaml文件

[[email protected] kubernetes-dashboard]# wget https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml
--2020-01-06 22:57:43--  https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml
正在解析主机 raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.108.133
正在连接 raw.githubusercontent.com (raw.githubusercontent.com)|151.101.108.133|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:7568 (7.4K) [text/plain]
正在保存至: “recommended.yaml”

100%[=====================================================================================================================>] 7,568       1.32KB/s 用时 5.6s

2020-01-06 22:57:51 (1.32 KB/s) - 已保存 “recommended.yaml” [7568/7568])
[[email protected] kubernetes-dashboard]# kubectl apply -f recommended.yaml
namespace/kubernetes-dashboard created
serviceaccount/kubernetes-dashboard created
service/kubernetes-dashboard created
secret/kubernetes-dashboard-certs created
secret/kubernetes-dashboard-csrf created
secret/kubernetes-dashboard-key-holder created
configmap/kubernetes-dashboard-settings created
role.rbac.authorization.k8s.io/kubernetes-dashboard created
clusterrole.rbac.authorization.k8s.io/kubernetes-dashboard created
rolebinding.rbac.authorization.k8s.io/kubernetes-dashboard created
clusterrolebinding.rbac.authorization.k8s.io/kubernetes-dashboard created
deployment.apps/kubernetes-dashboard created
service/dashboard-metrics-scraper created
deployment.apps/dashboard-metrics-scraper created
[root@k8s-master kubernetes-dashboard]# kubectl describe secret -n kubernetes-dashboard $(kubectl get secret -n kubernetes-dashboard | grep dashboard-admin | awk ‘{print $1}‘)
Name:         default-token-cthh2
Namespace:    kubernetes-dashboard
Labels:       <none>
Annotations:  kubernetes.io/service-account.name: default
              kubernetes.io/service-account.uid: 48ff2cdb-321b-4775-8c87-28c3b6bafea8

Type:  kubernetes.io/service-account-token

Data
====
ca.crt:     1025 bytes
namespace:  20 bytes
token:      eyJhbGciOiJSUzI1NiIsImtpZCI6IktTaWpWSDJoem5WTzNZdExreU9sV2dqLVpTa1NzVHdZeE56clZuZ2JxQncifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJkZWZhdWx0LXRva2VuLWN0aGgyIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6ImRlZmF1bHQiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiI0OGZmMmNkYi0zMjFiLTQ3NzUtOGM4Ny0yOGMzYjZiYWZlYTgiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6a3ViZXJuZXRlcy1kYXNoYm9hcmQ6ZGVmYXVsdCJ9.dYWLwxww6uepIfdUPfI443pquM9pGm4XzVKwO-tGMz27YdrNvxM1KsKsOjKwRkOVu6Gs1MmJO8LzcKh___uGf-gJvSw14MO9ITVR2g61bK0bNUH8pEiDaQQIsWwEbKgdiiqAu3syUA-9sv4FRH3PAmTqDOgURVF9vHqg_-93UnKnq5dqqowt2-LttDWwFplp59Gq95HCsoPGsF22JajRT84Wp_lk8jKmC6PFSTh4Lt28jbOqnJchDobMr48_B_St31S0y8RAZGfMYe6HrRpy-EDMSbzXYQYmyBw-srIbNPiiH4sbv3qdc-90aiu6NTV1NCVOhyN-Po3B_u-ym8BBAg

Name:         kubernetes-dashboard-certs
Namespace:    kubernetes-dashboard
Labels:       k8s-app=kubernetes-dashboard
Annotations:
Type:         Opaque

Data
====

Name:         kubernetes-dashboard-csrf
Namespace:    kubernetes-dashboard
Labels:       k8s-app=kubernetes-dashboard
Annotations:
Type:         Opaque

Data
====
csrf:  0 bytes

Name:         kubernetes-dashboard-key-holder
Namespace:    kubernetes-dashboard
Labels:       k8s-app=kubernetes-dashboard
Annotations:
Type:         Opaque

Data
====

Name:         kubernetes-dashboard-token-2tsg8
Namespace:    kubernetes-dashboard
Labels:       <none>
Annotations:  kubernetes.io/service-account.name: kubernetes-dashboard
              kubernetes.io/service-account.uid: f0a47104-2a7f-4dc4-80e7-06cbc2ca2c77

Type:  kubernetes.io/service-account-token

Data
====
namespace:  20 bytes
token:      eyJhbGciOiJSUzI1NiIsImtpZCI6IktTaWpWSDJoem5WTzNZdExreU9sV2dqLVpTa1NzVHdZeE56clZuZ2JxQncifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJrdWJlcm5ldGVzLWRhc2hib2FyZC10b2tlbi0ydHNnOCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6ImYwYTQ3MTA0LTJhN2YtNGRjNC04MGU3LTA2Y2JjMmNhMmM3NyIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDprdWJlcm5ldGVzLWRhc2hib2FyZDprdWJlcm5ldGVzLWRhc2hib2FyZCJ9.rNDeHhXHzWk33wiE0MQlSZwxPb-CGyryFVhqTMzigs2znv59QZOab6Ztt1o6rU8TJyMfk1wnKJeKEJdyT2x4W6XdoAmSsIHkUKtSixQiazFeWp6rkWABPW_-Co2AKzciltUK5Xtgd6_L-KWodGFCc3t0B12GvdMet1On63-GgM6X8SUOVtE9_htEbTrEfyMV5AG1DfzsVpOJFv4V-qQUaxmSexlaCi59_nbzoBLz125_3K_1fHckXd4j9Jb9v5mQ4WRL4oddN7Sm7OQCLQjErKBSbfO5cnsJvuFEceoHPDS8mkT7fU4vFflillfuJfZarHs5vYQYgpqre3X-UmruVA
ca.crt:     1025 bytes
[root@k8s-master kubernetes-dashboard]#

发现还是有问题,看不了信息

原文地址:https://www.cnblogs.com/dalianpai/p/12159173.html

时间: 2024-10-08 04:40:26

k8s安装dashboard(未解决)的相关文章

k8s安装dashboard

1.Kubernetes Dashboard 是 k8s集群的?个 WEB UI管理?具,代码托管在 github 上,地址: https://github.com/kubernetes/dashboard 2.安装直接使用官方文件就行(如果地址失效去github 看一下) wget https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.

Ubuntu kylin 14.04 安装问题未解决

昨天安装了Ubuntu,然后开始玩.首先我登录的时候没有从切换到 tty1的文本界面输入帐号和密码登录,然后输入:sudo startx.然后开始进入X Windows,但是奇怪的是会发现壁纸显示出来了,但是其他的不现实.然后我启动终端,在终端中输入指令还是有效的.然后我又切回tty1,在tty1中输入:sudo shutdown -r now.在重启之后,我在登录界面上输入自己的密码,但是会在屏幕一闪变黑之后又回到登录界面.我在切换到tty1,并且输入帐号和密码显示是正确的.在tty1的界面下

[k8s]kubernetes dashboard的安装

之前一直使用的是命令行,但是又觉得如果连控制台都还没有动手实践过会不会有点low 1.安装dashboard 参阅官网的安装方法,https://github.com/kubernetes/dashboard,安装很简单,如果慢可以使用其它的镜像网站,我这里使用的是mirrorgooglecontainers/kubernetes-dashboard-amd64,然后重新打了k8s.gcr.io/kubernetes-dashboard-amd64的tag 2.暴露服务 [email prote

openSUSE13.1无法打开Yast的安装/移除软件管理软件的解决办法&#183;(未解决,临时方法)

没有发现解决方案: 可用 sudo /sbin/yast2 用命令行的GUI替代...虽然差不多 决定一会update一下试试 openSUSE13.1无法打开Yast的安装/移除软件管理软件的解决办法·(未解决,临时方法),布布扣,bubuko.com

Silverlight运行时提示未安装silverlight runtime 解决方法

出现该问题是由于电脑上安装的silverlight不是silverlight developer. 一般来说安装完VS之后是不会出现该问题. 但是一旦更改了silverlight中web service中TestPage的minRuntimeVersion版本,因为默认生成的版本号是silverlight sdk(根据创建项目时选择的是silverlight 4还是5来判断是哪个版本的SDK)的版本号.一旦修改的版本号比电脑安装的sdk版本高,则会在第一次运行时提示需要安装更新版本的silver

(未解决)WIN8下使用POWERSHELL安装python easy_install无法成功

按照https://pypi.python.org/pypi/setuptools#windows-8-powershell介绍的方法, 安装未成功.安装似乎没有启动, 也未安装成功. Windows 8 (Powershell) For best results, uninstall previous versions FIRST (see Uninstalling). Using Windows 8 or later, it's possible to install with one si

Kubernetes(K8s) 安装(使用kubeadm安装Kubernetes集群)

概述: 这篇文章是为了介绍使用kubeadm安装Kubernetes集群(可以用于生产级别).使用了Centos 7系统. PS: 篇幅有点长,但是比较详细.比较全面 一.Centos7 配置说明 1.1   Firewalld(防火墙) CentOS Linux 7 默认开起来防火墙服务(firewalld),而Kubernetes的Master与工作Node之间会有大量的网络通信,安全的做法是在防火墙上配置Kbernetes各组件(api-server.kubelet等等)需要相互通信的端口

vmware tools安装程序无法继续,Microsoft Runtime DLL安装程序未能完成安装。的解决方法

vmware tools安装程序无法继续,Microsoft Runtime DLL安装程序未能完成安装.的解决方法_华英雄_新浪博客 http://blog.sina.com.cn/s/blog_54bf02090100xlqy.html   现象:VMware Workstation 8.0在安装VMware Tools时弹出对话框,提示"安装程序无法继续.Microsoft Runtime DLL安装程序未能完成安装."如图: 原因:虚拟机中Windows Installer服务

open-falcon 安装Dashboard时候报错&quot;SSLError: The read operation timed out&quot;

在部署open-falcon环境过程中,安装Dashboard时候报错"SSLError: The read operation timed out".如下: [[email protected] dashboard]# ./env/bin/pip install -r pip_requirements.txt Downloading/unpacking Flask==0.10.1 (from -r pip_requirements.txt (line 1)) Downloading