I have run a simple command:
kubectl api-resourcesI was a bit surprised to get duplicates (albeit in different Api groups), e.g.:
NAME SHORTNAMES APIGROUP NAMESPACED KIND
ingresses ing extensions true Ingress
ingresses ing networking.k8s.io true IngressIs it the same resource, just listed twice because it belongs to different api groups at the same time and the result of the following calls are always the same?
kubectl get ingress
kubectl get ingress.networking.k8s.io
kubectl get ingress.extensionsThese are actually different versions of the same resource in different API groups.
In general, when new resource types are introduced to Kubernetes, they are first managed in the extensions API group (iterating through multiple versions). Once the resources are regarded stable, they are moved to a "stable" API group, such as apps or networking.k8s.io (explained, for example, here).
The fact that Ingress is listed in both API groups means that your API server can understand versions of this resource from both API groups.
The specifications of the specific resource versions may differ. You can compare them, for example, with:
kubectl explain --api-version=extensions/v1beta1 ingressvs.
kubectl explain --api-version=networking.k8s.io/v1beta1 ingressIn-depth explanations of how the API server handles different versions of a resource can be found in this article series.