Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

301
Vistas
Filter secret objects by label in client-go

I am trying to get some secret objects from my cluster using the k8s go client library as follows

secret, err := clientset.CoreV1().Secrets("mynamespace").Get("name-of-my-secret", metav1.GetOptions{})

This worked well as long as I had to get just one object.

I have a case now where I need to fetch several such secret objects, however this now has to be done based on labels. (i.e. fetch all such secret objects matching the foo=someprovider.someurl.com/path1=value1 label)

I don't see however in the relevant docs a way to pass label selectors to the GetOptions struct that I assume performs such kind of filtering.

Any suggestions on how to select (potentially multiple) such resources based on labels?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

clientset.CoreV1().Secrets("").List(context.TODO(), metav1.ListOptions{LabelSelector: "k8s-app=kube-proxy"})
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda