【发布时间】:2022-10-02 00:27:31
【问题描述】:
我有一个 Kubernetes Deployment 的清单。当我尝试从 Azure Devops 部署它时,我收到以下错误:
error: error validating \"/home/vsts/work/r1/a/_MozCom-Ace-QTR/beta/ace-ui-deploy.yaml\": error validating data: ValidationError(Deployment.spec.template.spec.containers[0].env[13]): missing required field \"name\" in io.k8s.api.core.v1.EnvVar; if you choose to ignore these errors, turn validation off with --validate=false
以下是我的清单的内容:
apiVersion: apps/v1
kind: Deployment
metadata:
name: ace-ui
namespace: aceqat-frontend
spec:
replicas: 1
selector:
matchLabels:
app: ace-ui
template:
metadata:
labels:
app: ace-ui
spec:
containers:
- name: ace-ui
image: abcreg.azurecr.io/mozcom-ace-ui-mig:BUILD_NO
imagePullPolicy: Always
ports:
- containerPort: 3883
name: ace-ui
readinessProbe:
httpGet:
path: /health-probe
port: 3883
initialDelaySeconds: 15
periodSeconds: 10
timeoutSeconds: 5
标签: azure kubernetes devops