0

I'm trying to deploy sealed secret to kubernetes cluster using helm, once the helm chart is deployed I can find the secret under sealedsecret/api

However the pods fail to start, with the Error: secret "api" not found , how can I tell the pod to use the sealedsecret/api

If I run kubectl get secret I do not see the secret however if I run kubectl get sealedsecret I see the secret api is running under sealedsecret/api

inside my deployment I have

env:
{{- range $key, $val := .Values.encryptedData }}
- name: {{ $key }}
  valueFrom:
    secretKeyRef:
      name: {{ include "api.fullname" $ }}
      key: {{ $key }}
{{- end }}

SealedSecret

apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
  name: {{ include "api.fullname" . }}
  namespace: api
  
spec:
  template:
    metadata: 
      name: {{ include "api.fullname" . }}
  encryptedData:
    {{- range $key, $val := .Values.encryptedData }}
    {{ $key }}: {{ $val }}
    {{- end }}

any help would be appreciated

akano1
  • 40,596
  • 19
  • 54
  • 67
  • Try doing kubectl describe sealedsecret that you have - it would usually print out the cause. Likely what is happening, your scope is off - by default the scope is for one secret only, but this doesn't work well with the helm chart - consider using namespace-wide scope. For a sample, see our ecr-regcred chart in here - https://github.com/relizaio/helm-charts – taleodor Apr 04 '23 at 16:38

0 Answers0