我有一個 kind:deployment 檔案,他們強制在“initContainers”中定義影像,但我無法在自己的注冊表中加載影像。如果我嘗試把
imagePullSecrets:
- name: regcred
根據下面的“影像”,我得到error converting YAML to JSON: yaml: found character that cannot start any token. 如果我將它移動到不同的位置,我會得到同樣的結果。有什么想法可以在這里使用 imagePullCreds 嗎?
spec:
template:
metadata:
spec:
initContainers:
- env:
- name: "BOOTSTRAP_DIRECTORY"
value: "/bootstrap-data"
image: "my-custom-registry.com/my-image:1.6.24-SNAPSHOT"
imagePullPolicy: "Always"
name: "bootstrap"
uj5u.com熱心網友回復:
檢查您是否使用制表符進行縮進;YAML 不允許使用制表符;它需要空格。
此外,您應該在規范下而不是在容器下使用 imagePullSecrets。
spec:
template:
metadata:
spec:
imagePullSecrets:
- name: regcred
initContainers:
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/378409.html
