首页 文章

尝试访问Kubernetes Dashboard路由到公司代理错误页面

提问于
浏览
0

我一直在关注this指南,用kubeadm启动kubernem . 我已经完成了,现在在Centos7 VM上运行了一个机器集群 . 我安装了一个pod网络(Weave Net),我还安装了Kubernetes Dashboard . 接下来,我运行 kubectl proxy 并以 Starting to serve on 127.0.0.1:8001 响应 .

但是,每当我尝试使用localhost:8001 / ui或127.0.0.1:8001/ui访问仪表板时,我都会被重定向到链接到我的公司代理的错误页面,在尝试访问http://10.32.0.4/时通知我网关超时 .

现在,我认为有一些配置,其中10.32.0.4没有包含在一些异常中,所以我开始将它添加到no_proxy和NO_PROXY中的env,我在GUI的实际代理设置中指定它,我已经确定了设置docker使其具有相同的异常 . 我甚至(据我所知)完全删除了任何代理设置的痕迹,希望它不会尝试通过公司代理来达到应该是内部地址 . 附加信息:

[root@localhost ~]# kubectl get nodes
NAME                    STATUS    AGE       VERSION
localhost.localdomain   Ready     22h       v1.6.4

[root@localhost ~]# kubectl get pods --namespace=kube-system
NAME                                            READY     STATUS    RESTARTS   AGE
etcd-localhost.localdomain                      1/1       Running   0          22h
kube-apiserver-localhost.localdomain            1/1       Running   0          22h
kube-controller-manager-localhost.localdomain   1/1       Running   0          22h
kube-dns-3913472980-8zm51                       3/3       Running   0          22h
kube-proxy-3wslb                                1/1       Running   0          22h
kube-scheduler-localhost.localdomain            1/1       Running   0          22h
kubernetes-dashboard-2039414953-79zbr           1/1       Running   0          22h
weave-net-z6kml                                 2/2       Running   0          22h

[root@localhost ~]# kubectl describe svc kubernetes-dashboard --namespace=kube-system
Name:           kubernetes-dashboard
Namespace:      kube-system
Labels:         k8s-app=kubernetes-dashboard
Annotations:        <none>
Selector:       k8s-app=kubernetes-dashboard
Type:           ClusterIP
IP:         10.96.33.253
Port:           <unset> 80/TCP
Endpoints:      10.32.0.4:9090
Session Affinity:   None
Events:         <none>

[root@localhost ~]# kubectl get deployment kubernetes-dashboard --namespace=kube-system
NAME                   DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
kubernetes-dashboard   1         1         1            1           22h

[root@localhost ~]# kubectl --namespace=kube-system get ep kubernetes-dashboard
NAME                   ENDPOINTS        AGE
kubernetes-dashboard   10.32.0.4:9090   22h

[root@localhost ~]# kubectl cluster-info
Kubernetes master is running at https://192.168.181.130:6443
KubeDNS is running at https://192.168.181.130:6443/api/v1/proxy/namespaces/kube-system/services/kube-dns

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

[root@localhost ~]# kubectl get ns
NAME          STATUS    AGE
default       Active    22h
kube-public   Active    22h
kube-system   Active    22h

[root@localhost ~]# kubectl get ep
NAME         ENDPOINTS              AGE
kubernetes   192.168.181.130:6443   22h

我真的不确定从哪里开始 . 这里有很多活动部件,我找不到重定向发生时出现问题的方法 .

1 回答

  • 1

    代理设置由kubeadm在节点创建时复制,并不反映之后执行的更改 . 您应该更新/etc/kubernetes/manifests/kube-apiserver.yaml中的代理设置

相关问题