External IP column is empty in the kubectl get services result set -
i have created service following config file:
{ "kind":"service", "apiversion":"v1", "metadata":{ "name":"my-service", "labels":{ "app":"my-service" } }, "spec":{ "ports": [ { "port":8080, "targetport":"http-server" } ], "selector":{ "app":"my-service" }, "type": "loadbalancer" } }
executed following command:
$ kubectl create -f my-service.json service "my-service" created
then want see external address of service:
$ kubectl services name cluster-ip external-ip port(s) age my-service 10.0.203.169 8080/tcp 3m kubernetes 10.0.0.1 <none> 443/tcp 32m
in examples of kubernetes apps says there should "external ip" column, set:
$ kubectl services name cluster_ip external_ip port(s) selector age guestbook 10.0.217.218 146.148.81.8 3000/tcp app=guestbook 1h redis-master 10.0.136.3 <none> 6379/tcp app=redis,role=master 1h redis-slave 10.0.21.92 <none> 6379/tcp app-redis,role=slave 1h ...
kubectl events shows no information load balancer , service.
what might problem?
i using aws if helps.
btw. if @ aws console can see dns name of load balancer , connect it.
if output doesn't example output, using older version of kubectl
(the human friendly output changes on time become more human friendly). check version of kubectl
, grab newer 1 if isn't date (1.2.0 or newer).
$ kubectl version client version: version.info{major:"1", minor:"2", gitversion:"v1.2.0", gitcommit:"5cb86ee022267586db386f62781338b0483733b3", gittreestate:"clean"} server version: version.info{major:"1", minor:"2", gitversion:"v1.2.2", gitcommit:"528f879e7d3790ea4287687ef0ab3f2a01cc2718", gittreestate:"clean"}
Comments
Post a Comment