I'm working for access and monitor my Kubernetes Cluster . So I started the kubernetes proxy for access the external browsers or etc.
This is command I've runned for find the APISERVER's
APISERVER=$(kubectl config view | grep server | cut -f 2- -d ":" | tr -d " ")
That is the results shown as below .
server: https://<external_ip_0>
server: https://<external_ip_1>
server: https://<external_ip_2>
server: https://<external_ip_3>
when I want to access the my proxy any ip at above. I got timeout and any response from anywhere .How I can handle this problem ?
Which one is the TRUE APISERVER ip ?
Notice : That is the my command for run the kubernetes proxy . I want to access apiserver via kubectl proxy.
kubectl proxy --address 0.0.0.0 --accept-hosts '.*' --port=8080 &
command kubectl config view
shows your kubectl config where you can have multiple clusters configured so that's why you are receiving multiple "server" when greping - those are some Kubernetes clusters which you used in past. See https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/
If you want to access Kubernetes API exposed by proxy you can issue proxy command which you provided and go under http://localhost:8080/api/ in your web browser to see Kubernetes API - more information there: https://kubernetes.io/docs/tasks/access-kubernetes-api/http-proxy-access-api/