构建过程失败,出现此错误:
[Container] 2019/12/12 08:07:41 Running command kubectl apply -f simple_jwt_api.yml
unable to recognize "simple_jwt_api.yml": Unauthorized
unable to recognize "simple_jwt_api.yml": Unauthorized
[Container] 2019/12/12 08:07:43 Command did not exit successfully kubectl apply -f simple_jwt_api.yml exit status 1
[Container] 2019/12/12 08:07:43 Phase complete: POST_BUILD State: FAILED
[Container] 2019/12/12 08:07:43 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: kubectl apply -f simple_jwt_api.yml. Reason: exit status 1
simple_jwt_api.yml文件:simple_jwt_api.yml
建筑脚本文件:buildspec.yml
构建日志:
[Container] 2019/12/12 08:07:41 Running command kubectl apply -f simple_jwt_api.yml
unable to recognize "simple_jwt_api.yml": Unauthorized
unable to recognize "simple_jwt_api.yml": Unauthorized
[Container] 2019/12/12 08:07:43 Command did not exit successfully kubectl apply -f simple_jwt_api.yml exit status 1
[Container] 2019/12/12 08:07:43 Phase complete: POST_BUILD State: FAILED
[Container] 2019/12/12 08:07:43 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: kubectl apply -f simple_jwt_api.yml. Reason: exit status 1
[Container] 2019/12/12 08:07:43 Expanding base directory path: .
[Container] 2019/12/12 08:07:43 Assembling file list
[Container] 2019/12/12 08:07:43 Expanding .
[Container] 2019/12/12 08:07:43 Expanding file paths for base directory .
[Container] 2019/12/12 08:07:43 Assembling file list
[Container] 2019/12/12 08:07:43 Expanding build.json
[Container] 2019/12/12 08:07:43 Skipping invalid file path build.json
[Container] 2019/12/12 08:07:43 Phase complete: UPLOAD_ARTIFACTS State: FAILED
[Container] 2019/12/12 08:07:43 Phase context status code: CLIENT_ERROR Message: no matching artifact paths found
Buildspec看起来不错,所以我怀疑您的CodeBuild服务角色中包含'/ path /',当使用iam身份验证器对EKS进行身份验证时,这会引起问题。