我正在尝试为特定环境(例如:test)构建清单文件,并且我想重用下面提到的基本清单文件。
k8s/kustomize/overlays/test/kustomization.yaml
commonLabels:
variant: test
app: test-app
resources:
- ../../base/deployment.yaml
- ../../base/service.yaml
- ../../base/configmap.yaml
- ../../base/secret.yaml
- namespace.yaml
namespace: app-test
patchesStrategicMerge:
- secret.yaml
- configmap.yaml
在运行命令 kustomize build k8s/kustomize/overlay/test 时,我遇到了以下错误:
2020/02/19 16:04:36 got file 'deployment.yaml', but 'path/k8s/kustomize/base/deployment.yaml' must be a directory to be a root
Error: accumulating resources: accumulating resources from '../../base/deployment.yaml': security; file 'path/k8s/kustomize/base/deployment.yaml' is not in or below 'path/k8s/kustomize/overlay/test'
P.S: kustomize version is - Version: {KustomizeVersion:3.2.0 GitCommit:a3103f1e62ddb5b696daa3fd359bb6f2e8333b49 BuildDate:2019-09-18T18:31:04+01:00 GoOs:darwin GoArch:amd64}
我是kubernetes和kustomize的新手,能请你帮忙吗?