当我部署新版本的 Kubernetes 应用程序时,我得到了那个错误
Error: secret "env" not found
甚至我在自定义资源定义中有 env --> sealsecrets.bitnami.com
环境.yaml
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
creationTimestamp: null
name: env
namespace: api
spec:
encryptedData:
AUTH_COGNITO: AgCIxZX0Zv6gcK2p ----
template:
metadata:
creationTimestamp: null
name: env
namespace: api
type: Opaque
部署.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
labels:
app: {{ .Release.Name }}
spec:
revisionHistoryLimit: 2
replicas: {{ .Values.replicas }}
selector:
matchLabels:
app: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}
spec:
containers:
- name: {{ .Release.Name }}
image: "{{ .Values.imageRepository }}:{{ .Values.tag }}"
env:
{{- include "api.env" . | nindent 12 }}
resources:
limits:
memory: {{ .Values.memoryLimit }}
cpu: {{ .Values.cpuLimit }}
requests:
memory: {{ .Values.memoryRequest }}
cpu: {{ .Values.cpuRequest }}
{{- if .Values.healthCheck }}
livenessProbe:
httpGet:
path: /healthcheck
port: 4000
initialDelaySeconds: 3
periodSeconds: 3
timeoutSeconds: 3
{{- end }}
imagePullSecrets:
- name: {{ .Values.imagePullSecret }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
更新我的问题
我的秘密我没有秘密叫env
加上regcred
里面的那个错误Sealedsecrets.bitnami.com
Failed to unseal: no key could decrypt secret (.dockerconfigjson)