操作系统版本:ubuntu
Kubernetes:v1.17.3
仪表板:v2.0.0-beta8
我部署kubernetes-dashboard:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml
我的集群信息,如下所示:
Kubernetes master is running at https://10.104.12.1:6443
CoreDNS is running at https://10.104.12.1:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
部署仪表板后,以下各项都可以。
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
pod/dashboard-metrics-scraper-76585494d8-qjw46 1/1 Running 0 4m1s 10.32.0.2 worker-3 <none> <none>
pod/kubernetes-dashboard-5996555fd8-zgwzs 1/1 Running 0 4m1s 10.36.0.2 worker-2 <none> <none>
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
service/dashboard-metrics-scraper ClusterIP 10.96.0.196 <none> 8000/TCP 4m1s k8s-app=dashboard-metrics-scraper
service/kubernetes-dashboard ClusterIP 10.96.0.89 <none> 443/TCP 4m1s k8s-app=kubernetes-dashboard
NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR
deployment.apps/dashboard-metrics-scraper 1/1 1 1 4m1s dashboard-metrics-scraper kubernetesui/metrics-scraper:v1.0.1 k8s-app=dashboard-metrics-scraper
deployment.apps/kubernetes-dashboard 1/1 1 1 4m1s kubernetes-dashboard kubernetesui/dashboard:v2.0.0-beta8 k8s-app=kubernetes-dashboard
NAME DESIRED CURRENT READY AGE CONTAINERS IMAGES SELECTOR
replicaset.apps/dashboard-metrics-scraper-76585494d8 1 1 1 4m1s dashboard-metrics-scraper kubernetesui/metrics-scraper:v1.0.1 k8s-app=dashboard-metrics-scraper,pod-template-hash=76585494d8
replicaset.apps/kubernetes-dashboard-5996555fd8 1 1 1 4m1s kubernetes-dashboard kubernetesui/dashboard:v2.0.0-beta8 k8s-app=kubernetes-dashboard,pod-template-hash=5996555fd8
kubectl proxy --port=9999 --address='10.104.12.1' --accept-hosts="^*$"
Starting to serve on 10.104.12.1:9999
通过连接可以: http://10.104.12.1:9999/api/v1/namespaces/kubernetes-dashboard/services
kind "ServiceList"
apiVersion "v1"
metadata
selfLink "/api/v1/namespaces/kubernetes-dashboard/services"
resourceVersion "986774"
items
0
metadata
name "dashboard-metrics-scraper"
namespace "kubernetes-dashboard"
selfLink "/api/v1/namespaces/kubernetes-dashboard/services/dashboard-metrics-scraper"
uid "d5c9d811-6efa-439c-af1d-58a7a7848dba"
resourceVersion "982160"
creationTimestamp "2020-03-09T13:57:26Z"
labels
k8s-app "dashboard-metrics-scraper"
annotations
kubectl.kubernetes.io/last-applied-configuration "{\"apiVersion\":\"v1\",\"kind\":\"Service\",\"metadata\":{\"annotations\":{},\"labels\":{\"k8s-app\":\"dashboard-metrics-scraper\"},\"name\":\"dashboard-metrics-scraper\",\"namespace\":\"kubernetes-dashboard\"},\"spec\":{\"ports\":[{\"port\":8000,\"targetPort\":8000}],\"selector\":{\"k8s-app\":\"dashboard-metrics-scraper\"}}}\n"
spec
ports
0
protocol "TCP"
port 8000
targetPort 8000
selector
k8s-app "dashboard-metrics-scraper"
clusterIP "10.96.0.30"
type "ClusterIP"
sessionAffinity "None"
status
loadBalancer {}
1
metadata
name "kubernetes-dashboard"
namespace "kubernetes-dashboard"
selfLink "/api/v1/namespaces/kubernetes-dashboard/services/kubernetes-dashboard"
uid "6b3319a1-fe5f-458a-994e-9ecc8fed4cde"
resourceVersion "984846"
creationTimestamp "2020-03-09T13:57:26Z"
labels
k8s-app "kubernetes-dashboard"
annotations
kubectl.kubernetes.io/last-applied-configuration "{\"apiVersion\":\"v1\",\"kind\":\"Service\",\"metadata\":{\"annotations\":{},\"labels\":{\"k8s-app\":\"kubernetes-dashboard\"},\"name\":\"kubernetes-dashboard\",\"namespace\":\"kubernetes-dashboard\"},\"spec\":{\"ports\":[{\"port\":443,\"targetPort\":8443}],\"selector\":{\"k8s-app\":\"kubernetes-dashboard\"}}}\n"
spec
ports
0
protocol "TCP"
port 443
targetPort 8443
selector
k8s-app "kubernetes-dashboard"
clusterIP "10.96.0.115"
type "ClusterIP"
sessionAffinity "None"
status
loadBalancer {}
尝试访问服务时出错:“拨号TCP 10.36.0.2:8443:I/O超时”
似乎无法访问服务kubernetes-dashboard
,该服务公开了窗格kubernetes-dashboard-5996555fd8-fhvzq
。
我查看了所有相关的主题#kubernetes-dashboard。似乎与我面临的问题无关。请帮忙!