我正在关注本教程。我正处于使用命令进行部署的阶段:
kubectl apply -f azure-vote-all-in-one-redis.yaml
YAML 文件如下所示:
version: '3'
services:
azure-vote-back:
image: redis
container_name: azure-vote-back
ports:
- "6379:6379"
azure-vote-front:
build: ./azure-vote
image: azure-vote-front
container_name: azure-vote-front
environment:
REDIS: azure-vote-back
ports:
- "8080:80"
但是,我收到了错误:
error validating data: [apiVersion not set, kind not set]; if you choose to ignore these errors, turn validation off with --validate=false
如果我添加一个 apiVersion 和一个 Kind,像这样:
apiVersion: v1
kind: Pod
然后我得到错误:
error validating data: ValidationError(Pod): unknown field "services" in io.k8s.api.core.v1.Pod
我在这里错过了什么吗?