0

I'm new to k8s, so please forgive me if I use some definitions incorrectly.

Every k8s cluster has a set of APIs available, some of which are part of k8s itself ("core", or "built-in"), but some of which are external or third-party. I would like to know how the external API works, i.e. which internal or external resource is responsible for handling the API.

I have observed a few non-built-in APIServices that specifically mentioned a specific service. In this instance, I have obtained the answer to my inquiry: it is imperative to verify the aforementioned service to determine which pods will respond to API requests.

But some other APIs don't mention any explicit service, for example:

$ kubectl get apiservices.apiregistration.k8s.io
NAME                                   SERVICE   AVAILABLE   AGE
...
v1alpha1.argoproj.io                   Local     True        9d
...

$ kubectl api-resources NAME SHORTNAMES APIVERSION NAMESPACED KIND ... applications app,apps argoproj.io/v1alpha1 true Application applicationsets appset,appsets argoproj.io/v1alpha1 true ApplicationSet appprojects appproj,appprojs argoproj.io/v1alpha1 true AppProject ...

As you can see, SERVICE = Local. The reason v1alpha1.argoproj.io exists in my cluster is because I installed ArgoCD there. But what if I didn't know that?

The question:

what is the approach to determine a connection between

  • some API / APIService , which exists in a k8s cluster
  • the resources (pods or even workloads), which back up that exact API / APIService

for APIs / APIServices , which don't mention any explicit services?

According to APIServiceSpec documentation:

If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.

And I'm stuck at this point, because I can't seem to progress any further, and, honestly, I have no idea what does "this server" phrase even mean in the context of APIServiceSpec definition.

djdomi
  • 2,287

1 Answers1

0

I had this same questions just recently and I found that making a CRD (custom resource definition" will create a local APIService.