1

If someone with quite good kubernetes's services understanding could confirm me that once you require a new service to be created kubernetes push a reference of it on the etcd database and what is the URL to request it would be wonderful!!!

1 Answer 1

0

All data is kept in etcd by the apiserver.

You can get a list of services with:

kubectl get services

If you want to get the definition from etcd:

    # etcdctl --peers http://$(hostname):2379 ls
    /coreos.com
    /registry
    # etcdctl --peers http://$(hostname):2379 ls /registry
    /registry/namespaces
    /registry/pods
    /registry/ranges
    /registry/serviceaccounts
    /registry/services
    /registry/controllers
    /registry/events
    /registry/minions
    # etcdctl --peers http://$(hostname):2379 ls /registry/services
    /registry/services/endpoints
    /registry/services/specs
    # etcdctl --peers http://$(hostname):2379 ls /registry/services/endpoints
    /registry/services/endpoints/default
    # etcdctl --peers http://$(hostname):2379 ls /registry/services/endpoints/default
    /registry/services/endpoints/default/kube-dns
    /registry/services/endpoints/default/kubernetes
    # etcdctl --peers http://$(hostname):2379 get /registry/services/endpoints/default/kube-dns
    {"kind":"Endpoints","apiVersion":"v1","metadata":{"name":"kube-dns","namespace":"default","selfLink":"/api/v1/namespaces/default/endpoints/kube-dns","uid":"194eacb0-8465-11e5-ab8c-005056a3274a","resourceVersion":"4787638","creationTimestamp":"2015-11-06T09:02:25Z","labels":{"k8s-app":"kube-dns","kubernetes.io/cluster-service":"true","kubernetes.io/name":"KubeDNS"}},"subsets":[]}
1
  • Thank you very much this is exactly what I'm looking for!!
    – Dr I
    Nov 21, 2015 at 21:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .