开发者社区 > 云效DevOps > 正文

请问我在云效流水线遇到一个问题,通过k8s部署项目时,有个报错(之前是可以成功部署的),什么原因?

请问我在云效流水线遇到一个问题,通过k8s部署项目时,有个报错(之前是可以成功部署的),什么原因?BUILD_JOB_ID为137162659。
9fc670d3c589905afbc5b145fccb76e3.png
日志:[executionStep begins at 2023-07-04 09:45:09]
[INFO] PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[92m[09:45:09] [SUCCESS] 获取 Credential 成功
[1m[09:45:09] [INFO] 使用工作路径/root/workspace/asset-management-server_HXr8
[1m[09:45:09] [INFO] 执行步骤
[09:45:09] [USER]NODEGROUP_TYPE=K8S
[09:45:09] [INFO]USE BUILDKIT
[09:45:09] [INFO]PIPELINE_ID=2456166
[09:45:09] [INFO]PIPELINE_NAME=流水线 2023-07-03
[09:45:09] [INFO]BUILD_NUMBER=10
[09:45:09] [INFO]EMPLOYEE_ID=643f47b99b6c8dbe5a89b308
[09:45:09] [INFO]WORK_SPACE=/root/workspace
[09:45:09] [INFO]PROJECT_DIR=/root/workspace/asset-management-server_HXr8
[09:45:09] [INFO]BUILD_JOB_ID=137162659
[09:45:09] [INFO]ENGINE_GLOBAL_PARAM_ORGANIZATION_ID=635b712a77159c6e6b8f371c
[09:45:09] [USER]BUILD_ARGS=
[09:45:09] [INFO]STEP_ID=10_1688380272523__10_1688380326654
[09:45:09] [USER]NO_CACHE=false
[09:45:09] [USER]CACHE_MODE=local
[09:45:09] [INFO] prepare buildkit
[09:45:09] [INFO] set buildkit version to v0.8.0
[09:45:10] [INFO] prepare dockerhub auth
[09:45:10] [INFO] prepare user docker registry auth
[09:45:10] [INFO] USER_REGISTRY=registry.cn-shanghai.aliyuncs.com
[09:45:10] [INFO]镜像构建将使用 buildkit
[09:45:10] [INFO] DOCKER_FILE_DIR=/root/workspace/asset-management-server_HXr8
[09:45:10] [INFO] DOCKER_FILE_NAME=982.dev.Dockerfile
[09:45:10] [USER]DOCKER_TAG=2023-07-04-09-35-32
[09:45:10] [USER]EXTRA_TAGS=
[09:45:10] registry.cn-shanghai.aliyuncs.com/982dev/asset-management-server
[09:45:10] buildctl github.com/moby/buildkit v0.8.0 73fe4736135645a342abc7b587bba0994cccf0f9
[09:45:10] [INFO] buildkit ready.
[09:45:10] docker login --username=cr_temp_user --password=** registry.cn-shanghai.aliyuncs.com
[09:45:10] WARNING! Using --password via the CLI is insecure. Use --password-stdin.
[09:45:11] WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
[09:45:11] Configure a credential helper to remove this warning. See
[09:45:11] https://docs.docker.com/engine/reference/commandline/login/#credentials-store
[09:45:11]
[09:45:11] Login Succeeded
[09:45:11] buildctl build --frontend dockerfile.v0 --local context=/root/workspace/asset-management-server_HXr8 --local dockerfile=/root/workspace/asset-management-server_HXr8 --opt filename=982.dev.Dockerfile --output type=image,"name=registry.cn-shanghai.aliyuncs.com/982dev/asset-management-server:2023-07-04-09-35-32",push=true
[09:45:11] #1 [internal] load build definition from 982.dev.Dockerfile
[09:45:11] #1 sha256:bc07970bc75e7912c382fcafdc7e11622580de9eb46ac99450df998a652c544f
[09:45:11] #1 transferring dockerfile: 1.96kB done
[09:45:11] #1 DONE 0.0s
[09:45:11]
[09:45:11] #2 [internal] load .dockerignore
[09:45:11] #2 sha256:283e2a2c4658593135deed855a4a5e4335fe8bd71ff326e390a77c00b8234904
[09:45:11] #2 transferring context: 2B done
[09:45:11] #2 DONE 0.0s
[09:45:11]
[09:45:11] #4 [internal] load metadata for docker.io/library/golang:1.20
[09:45:11] #4 sha256:670a5fd167b9c3dff5752205a7a8e571940c38e5f74de5bc2e11c4640bd0ef2a
[09:45:12] #4 ...
[09:45:12]
[09:45:12] #5 [auth] library/debian:pull token for registry-1.docker.io
[09:45:12] #5 sha256:6a31ef5b8e9c5ffa463c6924040bebc5409ed05552a56cb8962aa80142003d40
[09:45:12] #5 DONE 0.0s
[09:45:12]
[09:45:12] #6 [auth] library/golang:pull token for registry-1.docker.io
[09:45:12] #6 sha256:9da7670347fe11f9cd8c47804dd619cd2697e4f115727aaeac84638071047520
[09:45:12] #6 DONE 0.0s
[09:45:12]
[09:45:12] #3 [internal] load metadata for docker.io/library/debian:stable-slim
[09:45:12] #3 sha256:1f4135ad7b991da43d62098afc9b590afad696b89ebbcf75e55438bd2aee3a24
[09:45:14] #3 DONE 3.5s
[09:45:14]
[09:45:14] #4 [internal] load metadata for docker.io/library/golang:1.20
[09:45:14] #4 sha256:670a5fd167b9c3dff5752205a7a8e571940c38e5f74de5bc2e11c4640bd0ef2a
[09:45:14] #4 DONE 3.5s
[09:45:14]
[09:45:14] #18 [internal] load build context
[09:45:14] #18 sha256:a413c7a9744481fba421545108f090e617471362b03ed51fe0353980ba3b9a27
[09:45:14] #18 transferring context: 1.60MB 0.0s done
[09:45:14] #18 DONE 0.1s
[09:45:14]
[09:45:14] #16 [builder 1/5] FROM docker.io/library/golang:1.20@sha256:344193a70dc3588452ea39b4a1e465a8d3c91f788ae053f7ee168cebf18e0a50
[09:45:14] #16 sha256:3bfaf71e3ca3b33a7965b0a2523cf45134d608d8b61551c7e4849d2c9c751439
[09:45:14] #16 resolve docker.io/library/golang:1.20@sha256:344193a70dc3588452ea39b4a1e465a8d3c91f788ae053f7ee168cebf18e0a50 0.0s done
[09:45:15] #16 sha256:c3768c9baf1ec103bc09ca10a286b0f1d81647556d8982a99f73f0f01d08c44f 0B / 100.20MB 0.2s
[09:45:15] #16 sha256:269abd39ba1d98b2db560a1bbc002c46efba33dcc9415bf4f34ec7176ab8cbee 0B / 156B 0.2s
[09:45:15] #16 sha256:67f4091d98eedad4cde8b1cd42b2040fb0bbff6119f91b70bb92fa640798ed11 0B / 92.23MB 0.2s
[09:45:15] #16 sha256:284f2345db055020282f6e80a646f1111fb2d5dfc6f7ee871f89bc50919a51bf 0B / 64.11MB 0.2s
[09:45:15] #16 sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 0B / 49.55MB 0.2s
[09:45:15] #16 sha256:ec2b820b8e87758dde67c29b25d4cbf88377601a4355cc5d556a9beebc80da00 0B / 24.03MB 0.2s
[09:45:16] #16 sha256:269abd39ba1d98b2db560a1bbc002c46efba33dcc9415bf4f34ec7176ab8cbee 156B / 156B 1.2s done
[09:45:16] #16 sha256:c3768c9baf1ec103bc09ca10a286b0f1d81647556d8982a99f73f0f01d08c44f 6.29MB / 100.20MB 1.8s
[09:45:17] #16 sha256:c3768c9baf1ec103bc09ca10a286b0f1d81647556d8982a99f73f0f01d08c44f 12.58MB / 100.20MB 2.1s
[09:45:17] #16 sha256:c3768c9baf1ec103bc09ca10a286b0f1d81647556d8982a99f73f0f01d08c44f 18.87MB / 100.20MB 2.4s
[09:45:17] #16 sha256:c3768c9baf1ec103bc09ca10a286b0f1d81647556d8982a99f73f0f01d08c44f 26.21MB / 100.20MB 2.7s
[09:45:17] #16 sha256:284f2345db055020282f6e80a646f1111fb2d5dfc6f7ee871f89bc50919a51bf 4.19MB / 64.11MB 2.7s
[09:45:17] #16 sha256:ec2b820b8e87758dde67c29b25d4cbf88377601a4355cc5d556a9beebc80da00 3.15MB / 24.03MB 2.7s
[09:45:17] #16 sha256:284f2345db055020282f6e80a646f1111fb2d5dfc6f7ee871f89bc50919a51bf 8.39MB / 64.11MB 2.9s
[09:45:17] #16 sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 4.19MB / 49.55MB 2.9s
[09:45:17] #16 sha256:ec2b820b8e87758dde67c29b25d4cbf88377601a4355cc5d556a9beebc80da00 5.24MB / 24.03MB 2.9s
[09:45:18] #16 sha256:c3768c9baf1ec103bc09ca10a286b0f1d81647556d8982a99f73f0f01d08c44f 32.51MB / 100.20MB 3.0s
[09:45:18] #16 sha256:67f4091d98eedad4cde8b1cd42b2040fb0bbff6119f91b70bb92fa640798ed11 5.24MB / 92.23MB 3.0s
[09:45:18] #16 sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 7.34MB / 49.55MB 3.0s
[09:45:18] #16 sha256:ec2b820b8e87758dde67c29b25d4cbf88377601a4355cc5d556a9beebc80da00 8.39MB / 24.03MB 3.0s
[09:45:18] #16 sha256:284f2345db055020282f6e80a646f1111fb2d5dfc6f7ee871f89bc50919a51bf 14.68MB / 64.11MB 3.2s
[09:45:18] #16 sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 10.49MB / 49.55MB 3.2s
[09:45:18] #16 sha256:ec2b820b8e87758dde67c29b25d4cbf88377601a4355cc5d556a9beebc80da00 12.58MB / 24.03MB 3.2s
[09:45:18] #16 sha256:c3768c9baf1ec103bc09ca10a286b0f1d81647556d8982a99f73f0f01d08c44f 39.85MB / 100.20MB 3.3s
[09:45:18] #16 sha256:67f4091d98eedad4cde8b1cd42b2040fb0bbff6119f91b70bb92fa640798ed11 11.53MB / 92.23MB 3.3s
[09:45:18] #16 sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 13.63MB / 49.55MB 3.3s
[09:45:18] #16 sha256:ec2b820b8e87758dde67c29b25d4cbf88377601a4355cc5d556a9beebc80da00 14.68MB / 24.03MB 3.3s
[09:45:18] #16 sha256:284f2345db055020282f6e80a646f1111fb2d5dfc6f7ee871f89bc50919a51bf 20.97MB / 64.11MB 3.5s
[09:45:18] #16 sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 16.78MB / 49.55MB 3.5s
[09:45:18] #16 sha256:ec2b820b8e87758dde67c29b25d4cbf88377601a4355cc5d556a9beebc80da00 18.87MB / 24.03MB 3.5s
[09:45:18] #16 sha256:c3768c9baf1ec103bc09ca10a286b0f1d81647556d8982a99f73f0f01d08c44f 47.19MB / 100.20MB 3.6s
[09:45:18] #16 sha256:67f4091d98eedad4cde8b1cd42b2040fb0bbff6119f91b70bb92fa640798ed11 18.87MB / 92.23MB 3.6s
[09:45:18] #16 sha256:284f2345db055020282f6e80a646f1111fb2d5dfc6f7ee871f89bc50919a51bf 25.17MB / 64.11MB 3.6s
[09:45:18] #16 sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 20.97MB / 49.55MB 3.6s
[09:45:18] #16 sha256:ec2b820b8e87758dde67c29b25d4cbf88377601a4355cc5d556a9beebc80da00 22.02MB / 24.03MB 3.6s
[09:45:18] #16 ...
[09:45:18]
[09:45:18] #7 [stage-1 1/13] FROM docker.io/library/debian:stable-slim@sha256:6773255a9bd068aed648a1229b642d9e3a8bb3a4e6f8afa7ec937bc38da761d9
[09:45:18] #7 sha256:13c8c836f7039e089498dc53f0d89680d08bbedbf863dda8cd869c7d7c006d99
[09:45:18] #7 resolve docker.io/library/debian:stable-slim@sha256:6773255a9bd068aed648a1229b642d9e3a8bb3a4e6f8afa7ec937bc38da761d9 done
[09:45:18] #7 sha256:7d77d3f401459c6fad6e1ae2adaa16d8a98f64eb3160eed1394e75c5fa9ac866 29.12MB / 29.12MB 2.8s done
[09:45:18] #7 extracting sha256:7d77d3f401459c6fad6e1ae2adaa16d8a98f64eb3160eed1394e75c5fa9ac866 1.0s done
[09:45:18] #7 DONE 3.8s
[09:45:18]
[09:45:18] #16 [builder 1/5] FROM docker.io/library/golang:1.20@sha256:344193a70dc3588452ea39b4a1e465a8d3c91f788ae053f7ee168cebf18e0a50
[09:45:18] #16 sha256:3bfaf71e3ca3b33a7965b0a2523cf45134d608d8b61551c7e4849d2c9c751439
[09:45:18] #16 sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 24.12MB / 49.55MB 3.8s
[09:45:18] #16 sha256:ec2b820b8e87758dde67c29b25d4cbf88377601a4355cc5d556a9beebc80da00 24.03MB / 24.03MB 3.7s done
[09:45:18] #16 sha256:c3768c9baf1ec103bc09ca10a286b0f1d81647556d8982a99f73f0f01d08c44f 53.48MB / 100.20MB 3.9s
[09:45:18] #16 sha256:67f4091d98eedad4cde8b1cd42b2040fb0bbff6119f91b70bb92fa640798ed11 24.12MB / 92.23MB 3.9s
[09:45:18] #16 sha256:284f2345db055020282f6e80a646f1111fb2d5dfc6f7ee871f89bc50919a51bf 31.46MB / 64.11MB 3.9s
[09:45:18] #16 sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 27.26MB / 49.55MB 3.9s
[09:45:19] #16 ...
[09:45:19]
[09:45:19] #8 [stage-1 2/13] RUN sed -i 's/deb.debian.org/mirrors.huaweicloud.com/g' /etc/apt/sources.list.d/debian.sources
[09:45:19] #8 sha256:787662806ba41e5db92e51955a5af0c3b043b98d23dd87e9ebb8bfa5bf2c404d
[09:45:19] #8 DONE 0.3s
[09:45:19]
[09:45:19] #16 [builder 1/5] FROM docker.io/library/golang:1.20@sha256:344193a70dc3588452ea39b4a1e465a8d3c91f788ae053f7ee168cebf18e0a50
[09:45:19] #16 sha256:3bfaf71e3ca3b33a7965b0a2523cf45134d608d8b61551c7e4849d2c9c751439
[09:45:19] #16 sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 30.41MB / 49.55MB 4.1s
[09:45:19] #16 sha256:c3768c9baf1ec103bc09ca10a286b0f1d81647556d8982a99f73f0f01d08c44f 60.82MB / 100.20MB 4.2s
[09:45:19] #16 ...
[09:45:19]
[09:45:19] #9 [stage-1 3/13] RUN sed -i 's/security.debian.org/mirrors.huaweicloud.com/g' /etc/apt/sources.list.d/debian.sources
[09:45:19] #9 sha256:d83e345ae5f5509871f79e358ea34cc00876eaf2ff23b24c0524f8605bda8621
[09:45:19] #9 DONE 0.2s
[09:45:19]
[09:45:19] #16 [builder 1/5] FROM docker.io/library/golang:1.20@sha256:344193a70dc3588452ea39b4a1e465a8d3c91f788ae053f7ee168cebf18e0a50
[09:45:19] #16 sha256:3bfaf71e3ca3b33a7965b0a2523cf45134d608d8b61551c7e4849d2c9c751439
[09:45:19] #16 sha256:67f4091d98eedad4cde8b1cd42b2040fb0bbff6119f91b70bb92fa640798ed11 31.46MB / 92.23MB 4.2s
[09:45:19] #16 sha256:284f2345db055020282f6e80a646f1111fb2d5dfc6f7ee871f89bc50919a51bf 38.80MB / 64.11MB 4.2s
[09:45:19] #16 sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 33.55MB / 49.55MB 4.2s
[09:45:19] #16 sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 36.70MB / 49.55MB 4.4s
[09:45:19] #16 sha256:c3768c9baf1ec103bc09ca10a286b0f1d81647556d8982a99f73f0f01d08c44f 68.16MB / 100.20MB 4.5s
[09:45:19] #16 sha256:67f4091d98eedad4cde8b1cd42b2040fb0bbff6119f91b70bb92fa640798ed11 37.75MB / 92.23MB 4.5s
[09:45:19] #16 sha256:284f2345db055020282f6e80a646f1111fb2d5dfc6f7ee871f89bc50919a51bf 45.09MB / 64.11MB 4.5s
[09:45:19] #16 sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 39.85MB / 49.55MB 4.5s
[09:45:19] #16 sha256:284f2345db055020282f6e80a646f1111fb2d5dfc6f7ee871f89bc50919a51bf 49.17MB / 64.11MB 4.7s
[09:45:19] #16 sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 42.99MB / 49.55MB 4.7s
[09:45:19] #16 sha256:c3768c9baf1ec103bc09ca10a286b0f1d81647556d8982a99f73f0f01d08c44f 75.50MB / 100.20MB 4.8s
[09:45:19] #16 sha256:67f4091d98eedad4cde8b1cd42b2040fb0bbff6119f91b70bb92fa640798ed11 44.04MB / 92.23MB 4.8s
[09:45:19] #16 sha256:284f2345db055020282f6e80a646f1111fb2d5dfc6f7ee871f89bc50919a51bf 52.43MB / 64.11MB 4.8s
[09:45:19] #16 sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 46.14MB / 49.55MB 4.8s
[09:45:19] #16 sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 49.55MB / 49.55MB 5.0s done
[09:45:19] #16 extracting sha256:bba7bb10d5baebcaad1d68ab3cbfd37390c646b2a688529b1d118a47991116f4 0.0s done
[09:45:19] #16 DONE 5.0s
[09:45:19]
[09:45:19] #10 [stage-1 4/13] RUN apt-get update && apt-get install curl gnupg
[09:45:19] #10 sha256:8e90f9b1f189736fd91e866180951ab7eafbb423cbb05ea9d06536f43e939277
[09:45:19] #10 0.194 Get:1 http://mirrors.huaweicloud.com/debian stable InRelease [147 kB]
[09:45:19] #10 0.281 Get:2 http://mirrors.huaweicloud.com/debian stable-updates InRelease [52.1 kB]
[09:45:19] #10 0.305 Err:1 http://mirrors.huaweicloud.com/debian stable InRelease
[09:45:19] #10 0.305 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY F8D2585B8783D481
[09:45:19] #10 0.311 Get:3 http://mirrors.huaweicloud.com/debian-security stable-security InRelease [48.0 kB]
[09:45:19] #10 0.363 Err:2 http://mirrors.huaweicloud.com/debian stable-updates InRelease
[09:45:19] #10 0.363 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131
[09:45:19] #10 0.425 Err:3 http://mirrors.huaweicloud.com/debian-security stable-security InRelease
[09:45:19] #10 0.425 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54404762BBB6E853 NO_PUBKEY BDE6D2B9216EC7A8
[09:45:19] #10 0.426 Reading package lists...
[09:45:19] #10 0.434 W: GPG error: http://mirrors.huaweicloud.com/debian stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY F8D2585B8783D481
[09:45:19] #10 0.434 E: The repository 'http://mirrors.huaweicloud.com/debian stable InRelease' is not signed.
[09:45:19] #10 0.434 W: GPG error: http://mirrors.huaweicloud.com/debian stable-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131
[09:45:19] #10 0.434 E: The repository 'http://mirrors.huaweicloud.com/debian stable-updates InRelease' is not signed.
[09:45:19] #10 0.434 W: GPG error: http://mirrors.huaweicloud.com/debian-security stable-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54404762BBB6E853 NO_PUBKEY BDE6D2B9216EC7A8
[09:45:19] #10 0.434 E: The repository 'http://mirrors.huaweicloud.com/debian-security stable-security InRelease' is not signed.
[09:45:19] #10 0.434 E: Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/.deb /var/cache/apt/archives/partial/.deb /var/cache/apt/*.bin || true'
[09:45:19] #10 0.434 E: Sub-process returned an error code
[09:45:19] #10 ERROR: executor failed running [/bin/sh -c apt-get update && apt-get install curl gnupg]: exit code: 100
[09:45:19]
[09:45:19] #17 [builder 2/5] RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo Asia/Shanghai > /etc/timezone
[09:45:19] #17 sha256:aee1204b414f807808f0126d3a975eaddf1561c5902aea3f5658e22b3f982404
[09:45:19] #17 CANCELED
[09:45:19] ------
[09:45:19] > [stage-1 4/13] RUN apt-get update && apt-get install curl gnupg:
[09:45:19] ------
[09:45:19] 982.dev.Dockerfile:27
[09:45:19] --------------------
[09:45:19] 25 | # && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BDE6D2B9216EC7A8
[09:45:19] 26 |
[09:45:19] 27 | >>> RUN apt-get update && apt-get install curl gnupg
[09:45:19] 28 |
[09:45:19] 29 | RUN install -m 0755 -d /etc/apt/keyrings
[09:45:19] --------------------
[09:45:19] error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c apt-get update && apt-get install curl gnupg]: exit code: 100
[91m[09:45:19] [ERROR] BUILD ERROR
[91m[09:45:19] [ERROR] 137162659
[91m[09:45:19] [ERROR] 步骤运行失败,返回码: 1

展开
收起
十一0204 2023-07-12 09:25:53 200 0
2 条回答
写回答
取消 提交回答
  • 在云效流水线中部署项目时遇到报错的问题可能有多种原因。以下是一些可能导致部署失败的常见原因:

    1. 配置错误:请检查您的部署配置文件(如 Kubernetes 的 YAML 文件)是否正确设置。确保各项配置,例如容器镜像、端口映射、环境变量等与您的项目需求和 Kubernetes 环境相匹配。

    2. 依赖项问题:如果您的项目依赖于其他服务或资源,确保这些依赖项已正确配置并可供部署时使用。检查相关的服务是否正常运行,并且与部署目标环境相兼容。

    3. 资源限制:如果部署的项目需要较高的资源配额,但所分配的资源配额不足,可能会导致部署失败。确保为项目分配了足够的 CPU、内存和存储资源。

    4. 网络连接问题:部署过程中的网络连接问题可能导致无法访问所需的容器镜像仓库或其他依赖项。确保网络连接稳定,并且可以访问所需的远程资源。

    5. 版本兼容性:如果您升级了 Kubernetes 版本或相关组件的版本,之前的部署配置可能不再兼容。确保部署配置与目标 Kubernetes 版本和环境一致。

    6. 访问权限问题:如果部署操作需要特定的访问权限,但您的账号没有足够的权限,可能会导致部署失败。请确保您具有适当的权限,并且已正确配置认证凭据。

    以上只是一些常见的部署失败原因,具体问题需要根据您的具体部署配置、错误信息和日志来分析。建议仔细检查报错信息并参考相关文档、日志或联系云效的技术支持团队以获取更详细的指导和帮助。

    请注意,具体的解决方案可能因您所使用的云效版本、Kubernetes 版本和环境配置而有所不同。建议参阅云效和 Kubernetes 的官方文档、教程或联系技术支持团队以获取更准确和具体的指导。

    2023-07-31 07:59:06
    赞同 展开评论 打赏
  • 意中人就是我呀!

    这里有两点建议:

    1. 把基础镜像换一下,换成golang:1.19.9
    2. 换源的过程可以在本地的基础镜像里执行完成之后直接在流水线里使用基础镜像,不要在流水线的任务里update和install哈

    如果必须用golang:1.20并且还是最新的Digest,而且必须在流水线上换源,建议使用私有构建集群:https://help.aliyun.com/document_detail/201868.html?spm=a2c4g.153811.0.0.1c5f619bXFQkim
    第二点是说在本地先构建好镜像然后放到镜像仓库里直接用。您把这个打入基础镜像内,在本地构建好之后,上传到镜像仓库, 流水线上对项目构建的时候直接把您构建好的镜像作为基础镜像。
    此回答整理自钉群“云效答疑服务群”。

    2023-07-12 11:04:10
    赞同 展开评论 打赏

云效,企业级一站式研发协同平台,数十万企业都在用。支持公共云、专有云和混合云多种部署形态,通过云原生新技术和研发新模式,助力创新创业和数字化转型企业快速实现研发敏捷和组织敏捷,打造“双敏”组织,实现多倍效能提升。

热门讨论

热门文章

相关电子书

更多
通过 ACK 智能化运维体系获得集群自动化诊断和自愈能力 立即下载
ACK 云原生弹性方案—云原生时代的加速器 立即下载
基于阿里云K8S服务快速构建DevOps流水线 资料下载 立即下载

相关镜像