我一直在按照本指南使用 kubeadm 启动 kubernetes。我已经完成了,现在有一个在 Centos7 虚拟机上运行的单机集群。我安装了一个 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
我真的不知道从这里去哪里。这里有很多活动部件,我找不到在重定向发生时查看问题所在的方法。