运行 skaffold dev 命令后遇到错误

Facing error after running skaffold dev command

skaffold.yaml

apiVersion: skaffold/v2alpha3
kind: Config
deploy:
  kubectl:
    manifests:
      - ./infra/k8s/*
build:
  local:
    push: false
  artifacts:
    - image: karan346/auth
      context: auth
      docker:
        dockerfile: Dockerfile
      sync:
        manual:
          - src: 'src/**/*.ts'
            des: .

错误

parsing skaffold config: error parsing skaffold configuration file: unable to parse config: yaml: unmarshal errors:

line 10: field des not found in type v2alpha3.SyncRule

无法解决问题。一切设置正确。

还有,有没有稳定的,以后不会报错的版本?

您遇到的错误是:

line 10: field des not found in type v2alpha3.SyncRule

apikind 中没有字段 des

基于 documentation for manual file sync,字段应命名为 dest。请参阅以下示例:

build:
  artifacts:
    - image: gcr.io/k8s-skaffold/node-example
      context: node
      sync:
        manual:
          # sync a single file into the `/etc` folder
          - src: '.filebaserc'
            dest: /etc

发布答案时 skaffold 的最后可用 apiVersionskaffold/v2beta26

总是可以在skaffold.yaml documentation

上查看