Reputation: 575
I follow this docs https://cloud.google.com/container-engine/docs/tutorials/guestbook
to created a Guestbook on GCE. And everything works fine.
But when I try to access kube-ui. I am totally confused.
first
≥ kubectl get svc 14:29
NAME LABELS SELECTOR IP(S) PORT(S)
frontend name=frontend name=frontend 10.191.254.236 80/TCP
146.148.x.x
kubernetes component=apiserver,provider=kubernetes <none> 10.191.240.1 443/TCP
redis-master name=redis-master name=redis-master 10.191.253.125 6379/TCP
redis-slave name=redis-slave name=redis-slave 10.191.254.248 6379/TCP
I can access my guestbook by 146.148.x.x; But I can't access web-ui through this ip. So I think this is not the master IP of my GCE. Then I execute this:
≥ kubectl get endpoints 14:33
NAME ENDPOINTS
frontend 10.188.0.6:80,10.188.0.7:80,10.188.2.4:80 + 2 more...
kubernetes 104.197.x.x:443
redis-master 10.188.2.7:6379
redis-slave 10.188.0.8:6379,10.188.2.3:6379
Now, I got another IP, and I try to access kube-ui through this IP. I can get response from the server. But It will need Authtication.
How can I get access to the kube-ui?
Upvotes: 2
Views: 1271
Reputation: 1
Also it can be checked out for detailed kubelctl config in following 2 ways:
client config file - ~/.kube/config
Develop Console - [GCP project]/[GCE instance], show in table of Custom meta data, kube-env row
Upvotes: 0
Reputation: 61
The 146.148.x.x IP listed under "frontend" service is there because of this entry in the service spec:
"type": "LoadBalancer"
It allows your application to be access externally.
Another useful command is
kubectl cluster-info
Upvotes: 0
Reputation: 575
Never mind, I got it
gcloud container clusters describe CLUSTER-NAME
contains username and password!
Upvotes: 1