0

I have a following secret

apiVersion: v1
kind: Secret
metadata:
  name: my-secret
type: Opaque
data:
  my-value: "dGVzdC1kYXRh"

I want to use above secrets value in following kubernetes code:

apiVersion: v1
kind: Service
metadata:
  name: my-service
  annotations:
    my-annotation: [{\"key\":\"<use-secret-value-here>\"}]

Can someone help me with kustomize? I tried many ways.

aac
  • 574
  • 2
  • 6
  • 18
  • 1
    That would kinda defeat the purpose of the Secret in the 1st place if it's value is visible in an annotation. – Gaël J May 25 '23 at 20:07
  • With or without Kustomize, there's no out of the box of doing this anyway. What's the context? – Gaël J May 25 '23 at 20:08

0 Answers0