本頁面中的部分或全部資訊可能不適用於 Trusted Cloud by S3NS。
排解容器映像檔問題
瞭解實用的疑難排解步驟,解決您在 Artifact Registry 中管理容器映像檔時遇到的問題。
無法擷取圖片或部署至 Trusted Cloud by S3NS 執行階段環境
請確認下列事項:
- 確認要推送的圖片完整路徑是否正確。路徑必須包含註冊主機名稱、 Trusted Cloud by S3NS、專案 ID、存放區和映像檔。例如:
u-france-east1-docker.s3nsregistry.fr/my-project/my-repo/my-image:v1
詳情請參閱「存放區和映像檔名稱」。
- 請確認提取圖像的帳戶是否具備正確的權限,可從存放區讀取資料。如果您已停用服務帳戶的自動角色授予功能,則必須將 Artifact Registry 角色授予執行階段服務帳戶。
- 針對 Compute Engine 和 Google Kubernetes Engine 服務帳戶,您必須將「Artifact Registry Reader」角色 (
roles/artifactregistry.reader
) 授予執行階段服務帳戶。
- 如果您使用的是 Docker 或其他第三方工具,則必須:
- 授予權限給與存放區互動的帳戶。
- 設定用戶端,以便向存放區進行驗證。
無法將映像檔推送至 Artifact Registry
建議您嘗試下列做法:
- 確認要推送的圖片完整路徑是否正確。路徑必須包含登錄主機名稱、 Trusted Cloud by S3NS 專案 ID、存放區和映像檔。例如:
u-france-east1-docker.s3nsregistry.fr/my-project/my-repo/my-image:v1
每個 Artifact Registry 存放區都是獨立的資源,因此您無法將映像檔推送至沒有存放區的路徑。例如,u-france-east1-docker.s3nsregistry.fr/my-project/my-image:v1
是無效的圖片路徑。
詳情請參閱「存放區和映像檔名稱」。
- 請確認推送映像檔的帳戶是否具備寫入存放區的權限。如果您已停用自動授予服務帳戶角色,則必須將 Artifact Registry 角色授予執行階段服務帳戶。
- 針對 Compute Engine 和 Google Kubernetes Engine 服務帳戶,您必須將「Artifact Registry Writer」角色 (
roles/artifactregistry.writer
) 授予執行階段服務帳戶。
- 如果 Artifact Registry 傳回訊息
The repository has
enabled tag immutability
,則表示已為存放區設定了標記不變性。您無法推送標記已用於存放區中同一個圖片的其他版本的圖片。請嘗試使用其他已儲存圖片版本未使用的標記,再次推送圖片。如要確認已為存放區設定不可變更的映像檔標記,請在 Trusted Cloud 主控台的存放區清單中查看「不可變更的映像檔標記」欄,或執行下列指令:
gcloud artifacts repositories describe REPOSITORY \
--project=PROJECT-ID \
--location=LOCATION
ImagePullBackOff 和 ErrImagePull 訊息
訊息中出現 ImagePullBackOff
和 ErrImagePull
表示 GKE 無法從註冊資料庫中提取映像檔。
- 確認從 Artifact Registry 提取的規定。
- 請參閱 GKE 說明文件中的「排解映像檔拉取問題」。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-08 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-08 (世界標準時間)。"],[[["This page provides troubleshooting steps for managing container images in Artifact Registry, specifically addressing issues related to pulling and pushing images."],["When encountering problems pulling an image, ensure the image path is correct and that the pulling account has the necessary Artifact Registry Reader permissions."],["If you are unable to push an image, confirm that the repository exists, the image path is correct, and the account has the appropriate Artifact Registry Writer permissions."],["Tag immutability, when enabled, prevents pushing images with tags already in use by other versions of the same image, and checking the repository's configuration can help to fix this."],["If you encounter `ImagePullBackOff` or `ErrImagePull` messages, you need to check the required permissions and then review the troubleshooting steps in the GKE documentation."]]],[]]