Я пытаюсь вытащить изображение из частного реестра. Но статус модуля - «ImagePullBackOff», что означает, что мне нужно добавить секрет в модуль.
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Pulling 52m (x255 over 22h) kubelet, cn-huhehaote.i-hp3fkfzlcf1u9cigq2h7 pulling image "xxx/fcp"
Normal BackOff 8m (x5597 over 22h) kubelet, cn-huhehaote.i-hp3fkfzlcf1u9cigq2h7 Back-off pulling image "xxx/fcp"
Warning Failed 3m (x5618 over 22h) kubelet, cn-huhehaote.i-hp3fkfzlcf1u9cigq2h7 Error: ImagePullBackOff
Итак, я добавил следующий код в pod yaml.
spec:
containers:
- name: private-reg-container
image: <your-private-image>
imagePullSecrets:
- name: my-secret
Тогда я получил
error: map: map[] does not contain declared merge key: name
Решение, которое я искал, состоит в том, чтобы удалить 'imagePullSecret', который мне не подходит. Интересно, как исправить ошибку. Кто-нибудь может мне помочь?
версия kubectl -
kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.5", GitCommit:"753b2dbc622f5cc417845f0ff8a77f539a4213ea", GitTreeState:"clean", BuildDate:"2018-11-26T14:41:50Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.5", GitCommit:"753b2dbc622f5cc417845f0ff8a77f539a4213ea", GitTreeState:"clean", BuildDate:"2018-11-26T14:31:35Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}