zh-trans: update docs/concepts/containers/images.md (#11877)
* zh-trans: update docs/concepts/containers/images.md * zh-trans: update docs/concepts/containers/images.md
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
b2c87f77c1
commit
1947dbdf62
@@ -124,13 +124,13 @@ Docker将私有仓库的密钥存放在`$HOME/.dockercfg`或`$HOME/.docker/confi
|
||||
|
||||
推荐如下步骤来为node配置私有仓库。以下示例在PC或笔记本电脑中操作
|
||||
|
||||
1.对于想要使用的每一种凭证,运行 `docker login [server]`,它会更新`$HOME/.docker/config.json`。
|
||||
1.使用编辑器查看`$HOME/.docker/config.json`,保证文件中包含了想要使用的凭证
|
||||
1.获取node列表,例如
|
||||
- 如果使用node名称,`nodes=$(kubectl get nodes -o jsonpath='{range.items[*].metadata}{.name} {end}')`
|
||||
- 如果使用node IP ,`nodes=$(kubectl get nodes -o jsonpath='{range .items[*].status.addresses[?(@.type=="ExternalIP")]}{.address} {end}')`
|
||||
1.将本地的`.docker/config.json`拷贝到每个节点root用户目录下
|
||||
- 例如: `for n in $nodes; do scp ~/.docker/config.json root@$n:/root/.docker/config.json; done`
|
||||
1. 对于想要使用的每一种凭证,运行 `docker login [server]`,它会更新`$HOME/.docker/config.json`。
|
||||
1. 使用编辑器查看`$HOME/.docker/config.json`,保证文件中包含了想要使用的凭证
|
||||
1. 获取node列表,例如
|
||||
- 如果使用node名称,`nodes=$(kubectl get nodes -o jsonpath='{range.items[*].metadata}{.name} {end}')`
|
||||
- 如果使用node IP ,`nodes=$(kubectl get nodes -o jsonpath='{range .items[*].status.addresses[?(@.type=="ExternalIP")]}{.address} {end}')`
|
||||
1. 将本地的`.docker/config.json`拷贝到每个节点root用户目录下
|
||||
- 例如: `for n in $nodes; do scp ~/.docker/config.json root@$n:/root/.docker/config.json; done`
|
||||
|
||||
创建使用私有仓库的pod来验证,例如:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user