rootsongjc / kubernetes-handbook

Kubernetes中文指南/云原生应用架构实战手册 - https://jimmysong.io/kubernetes-handbook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

新的Dashboard安装后,cluster-info中没有显示它?

pigLoveRabbit520 opened this issue · comments

环境

  • OS:Ubuntu 18.04.3 LTS
  • Vagrant版本:2.2.6
  • VirtualBox版本:6.0.14 r133895 (Qt5.9.5)

版本和配置信息

  • Kubernetes版本:1.15.7
  • docker: v17.03
  • 网络插件:Calico

操作

安装Dashboard

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

显示pod和service,新版的Dashboard,命名空间移动到了kubernetes-dashboard

$ kubectl get pods,svc --all-namespaces
NAMESPACE              NAME                                             READY   STATUS    RESTARTS   AGE
kube-system            pod/calico-node-ffn9k                            2/2     Running   12         33d
kube-system            pod/calico-node-fz8v6                            2/2     Running   14         33d
kube-system            pod/calico-node-gvjft                            2/2     Running   10         33d
kube-system            pod/coredns-94d74667-8jp5k                       1/1     Running   5          33d
kube-system            pod/coredns-94d74667-tlph7                       1/1     Running   5          33d
kube-system            pod/etcd-k8s-head                                1/1     Running   5          33d
kube-system            pod/kube-apiserver-k8s-head                      1/1     Running   7          33d
kube-system            pod/kube-controller-manager-k8s-head             1/1     Running   5          33d
kube-system            pod/kube-proxy-4rsp4                             1/1     Running   6          33d
kube-system            pod/kube-proxy-dccdc                             1/1     Running   6          33d
kube-system            pod/kube-proxy-x82tl                             1/1     Running   5          33d
kube-system            pod/kube-scheduler-k8s-head                      1/1     Running   5          33d
kubernetes-dashboard   pod/dashboard-metrics-scraper-6c554969c6-ggmj5   1/1     Running   0          87m
kubernetes-dashboard   pod/kubernetes-dashboard-56c5f95c6b-v9xts        1/1     Running   0          87m

NAMESPACE              NAME                                TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                  AGE
default                service/kubernetes                  ClusterIP   10.96.0.1        <none>        443/TCP                  33d
kube-system            service/calico-typha                ClusterIP   10.104.182.223   <none>        5473/TCP                 33d
kube-system            service/kube-dns                    ClusterIP   10.96.0.10       <none>        53/UDP,53/TCP,9153/TCP   33d
kubernetes-dashboard   service/dashboard-metrics-scraper   ClusterIP   10.98.102.3      <none>        8000/TCP                 87m
kubernetes-dashboard   service/kubernetes-dashboard        ClusterIP   10.96.168.232    <none>        443/TCP                  87m

cluster-info中没有Dashboard

$ kubectl cluster-info
Kubernetes master is running at https://192.168.205.10:6443
KubeDNS is running at https://192.168.205.10:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

这个是什么原因呢?就是namespace的移动导致的吗?

必须是有 kubernetes.io/cluster-service label 的 service 才可以显示到 cluster-info 中。

谢谢