I have an endpoints
that I can see via (for example) :
kubectl get endpoints busybox-service
This endpoints is "backed" by a service
:
kubectl get services busybox-service
Is there a way for me via the endpoints
object, to find the "backing" service, without finding it by name?
What I mean by that, is having just the information from (for example):
kubectl get endpoints busybox-service -o=json
or anything like that, to be able to tell what the metadata.uid
of the service is?
So, if I do : kubectl get endpoints busybox-service -o=json
, I would get:
"metadata": {
"annotations": {
"endpoints.kubernetes.io/last-change-trigger-time": "2023-03-19T19:40:08Z"
},
"creationTimestamp": "2023-03-19T19:40:08Z",
"labels": {
"a": "b"
},
"name": "busybox-service",
"namespace": "default",
"resourceVersion": "277476",
"uid": "8d76841b-ad74-4697-8d47-e7449b2cea24"
}
that is, I get the uid
of the endpoints
: "uid": "8d76841b-ad74-4697-8d47-e7449b2cea24"
. Is there an extended call of some kind to the endpoints that would give me the uid
of the service that this endpoints is based on.
Something like this does not exist, but may be there is a certain call that I miss:
"metadata": {
"annotations": {
"endpoints.kubernetes.io/last-change-trigger-time": "2023-03-19T19:40:08Z"
},
"creationTimestamp": "2023-03-19T19:40:08Z",
"labels": {
"a": "b"
},
"name": "busybox-service",
"namespace": "default",
"resourceVersion": "277476",
"uid": "8d76841b-ad74-4697-8d47-e7449b2cea24"
"ownerReference": "<UID_OF_THE_SERVICE>"
}
Notice the last field: "ownerReference": "<UID_OF_THE_SERVICE>"
- in reality it does not exist, but may be I miss some kind of a call that would give me this information.
Thank you.