[英]KrakenD - ERROR parsing the configuration file: loading flexible-config settings
[英]parsing skaffold config: error parsing skaffold configuration file
因此,我正在嘗試自動化 docker 構建和推送過程以及 kubectl 應用部署過程,為此,我在主文件夾中創建了一個 skaffold 配置文件,如下所示:
apiVersion: skaffold/v2alpha3
kind: Config
deploy:
kubectl:
manifests:
- ./infra/k8s/*
build:
local:
push: false
artifacts:
- image: xyz/client
context: client
docker:
dockerfile: Dockerfile
sync:
manual:
- src: 'src/**/*.js'
dest: .
- image: xyz/comments
context: comments
docker:
dockerfile: Dockerfile
sync:
manual:
- src: '*.js'
dest: .
- image: xyz/event-bus
context: event-bus
docker:
dockerfile: Dockerfile
sync:
manual:
- src: '*.js'
dest: .
- image: xyz/moderation
context: moderation
docker:
dockerfile: Dockerfile
sync:
manual:
- src: '*.js'
dest: .
- image: xyz/posts
context: posts
docker:
dockerfile: Dockerfile
sync:
manual:
- src: '*.js'
dest: .
- image: xyz/query
context: query
docker:
dockerfile: Dockerfile
sync:
manual:
- src: '*.js'
dest: .
當我嘗試在文件夾中使用skaffold dev
命令時,出現以下錯誤:
parsing skaffold config: error parsing skaffold configuration file
工件使用context:
來引用源位置。
我認為您必須使用舊版本的 Skaffold。 較新版本的 Skaffold 提供了更多詳細信息:
parsing skaffold config: unable to parse config: yaml: unmarshal errors:
line 4: field content not found in type v2alpha3.Artifact
line 12: field content not found in type v2alpha3.Artifact
line 20: field content not found in type v2alpha3.Artifact
line 28: field content not found in type v2alpha3.Artifact
line 36: field content not found in type v2alpha3.Artifact
line 44: field content not found in type v2alpha3.Artifact
您可能想查看IntelliJ 和 VS Code 的 Cloud Code或在線Cloud Shell Editor ,它提供skaffold.yaml
編輯幫助,包括突出顯示文件中的錯誤。
您在下面的鍵中有content
而不是context
- image:
更改它,它應該可以工作。
這個工作流程對我有用:
我建議查看此文檔: https://skaffold.dev/docs/workflows/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.