环境
Openshift 4.3
问题
当我们在openshift图像注册中心中推拉图像时(根据文档 ),建议使用kubeadmin帐户。
但不想使用kubeadmin帐户。
所以,我的问题是:我如何向podman注册另一个帐户?
$ oc debug node/workernode
sh-4.2# chroot /host我想使用另一个帐户而不是kubeadmin:
sh-4.4# podman login -u kubeadmin -p $(oc whoami -t) image-registry.openshift-image-registry.svc:5000谢谢
发布于 2020-09-12 06:07:37
您可以使用授予“注册表查看器”或“注册表编辑器”角色的任何帐户。在你提供的文件上也提到过。
您需要使用其他凭据,但"kubeadmin“默认管理帐户使用其他身份提供者。有关更多细节,请参阅理解身份提供程序配置。
例如,如果要使用"testuser“登录到内部图像注册表,
For pulling images, for example when using the podman pull command, the user must have the registry-viewer role. To add this role:
$ oc policy add-role-to-user registry-viewer testuser
For writing or pushing images, for example when using the podman push command, the user must have the registry-editor role. To add this role:
$ oc policy add-role-to-user registry-editor testuser $ oc login -u testuser -p your_password
$ oc whoami -t
XXXXXX $ oc debug node/workernode
sh-4.2# chroot /host
sh-4.4# podman login -u testuser -p XXXXXX image-registry.openshift-image-registry.svc:5000https://stackoverflow.com/questions/63844369
复制相似问题