Annotation Filters

Just like in case of labels, items can be filtered by annotations:

select('Ingress') .annotation('kubernetes.io/ingress.class', 'nginx')

by multiple annotations to be matched:

select('Ingress') .annotation('kubernetes.io/ingress.class', 'nginx') .annotation('kubernetes.io/ingress.class', 'traefik')

or by combining multiple annotation query results:

select('Ingress') .annotation('kubernetes.io/ingress.class', 'traefik') .annotations({ 'kubernetes.io/ingress.class': 'nginx', 'nginx.ingress.kubernetes.io/enable-cors': false })
Share this article on:
message