How to list all kubernetes objects with specific label using client-go

This page summarizes the projects mentioned and recommended in the original post on /r/codehunter

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • client-go

    Go client for Kubernetes.

  • I looked at dynamic package, but it seems like it needs GroupVersionResource, which is different for, say, Service objects and Deployment objects. Also when I pass schema.GroupVersionResource{Group: "apps", Version: "v1"} it doesn't find anything, when I pass schema.GroupVersionResource{Version: "v1"} it finds only namespace object and also doesn't looks for labels, though I provided label options:

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts