【发布时间】:2020-01-13 05:02:19
【问题描述】:
我想通过谷歌云中的电子邮件配置在 Kubernetes 上部署 ghost(博客)。 ghost 在 k8s 中运行良好。但是,我无法修复部署文件中的 SMTP 设置
我的 .yaml 文件
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: blog
labels:
app: blog
spec:
replicas: 1
selector:
matchLabels:
app: blog
template:
metadata:
labels:
app: blog
spec:
containers:
- name: blog
image: ghost:2.6-alpine
imagePullPolicy: Always
ports:
- containerPort: 2368
env:
- name: url
value: http://my-blog.com
environment:
url: http://my-blog.com
mail__transport: 2525
mail__options__service: {Sendgrid}
mail__options__auth__user: "gurpreet004"
mail__options__auth__pass: "Server@1234"
显示错误:
error: error validating "deployment.yaml": error validating data: ValidationError(Deployment.spec.template): unknown field "environment" in io.k8s.api.core.v1.PodTemplateSpec; if you choose to ignore these errors, turn validation off with --validate=false
请提供任何解决方案
【问题讨论】:
标签: kubernetes google-cloud-platform yaml