I want to use the Kubernetes Python SDK to operate Kong’s custom CRD, but after trying, I found that there is no corresponding Ingress class? Is it not supported or is there a problem with my operation?
Which corresponding Ingress class were you looking for? Could you point to an example of what you’ve done so far, and where you got stuck?
If you’re looking for a CRD equivalent to the standard Kubernetes Ingress resource, there isn’t any: we just use the standard Ingress resource, and use CRDs for Kong concepts that aren’t expressed by standard Kubernetes resources (e.g. there’s no native resource that easily maps to a Kong consumer, so we created the KongConsumer CRD).
Although the name is somewhat confusing in this context, we do have a KongIngress CRD. However, that’s not really a standalone resource: we use it to augment standard Kubernetes resources when parts of Kong configuration can’t be expressed through the standard resource’s fields. For example, because the standard Ingress spec has no method criteria in its rules, whereas Kong routes do support method criteria, you can bind a KongIngress with
route.methods: GET to an Ingress in order to set the methods criteria on the corresponding Kong route.
Most of those KongIngress settings can be expressed by annotations also (e.g.
konghq.com/methods for methods, and we usually recommend annotations over KongIngress when possible–using annotations reduces the number of resources you need to manage, since those settings just go directly onto an Ingress or Service resource, rather than requiring a separate, linked KongIngress.