From 8cc7215ab5862016f37922d7b39e32ee553244a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Gonz=C3=A1lez?= Date: Wed, 14 Oct 2015 20:15:11 +0100 Subject: [PATCH] Get external IPs and not node names on images docs Change the example inline script to get the node external IPs instead just their names. You can't `ssh|scp` to the `metadata.name`. --- docs/user-guide/images.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/user-guide/images.md b/docs/user-guide/images.md index b8b37dd826..d8581034e8 100644 --- a/docs/user-guide/images.md +++ b/docs/user-guide/images.md @@ -109,8 +109,9 @@ Here are the recommended steps to configuring your nodes to use a private regist example, run these on your desktop/laptop: 1. run `docker login [server]` for each set of credentials you want to use. 1. view `$HOME/.dockercfg` in an editor to ensure it contains just the credentials you want to use. - 1. get a list of your nodes - - for example: `nodes=$(kubectl get nodes -o template --template='{{range.items}}{{.metadata.name}} {{end}}')` + 1. get a list of your nodes, for example: + - if you want the names: `nodes=$(kubectl get nodes -o jsonpath='{range.items[*].metadata}{.name} {end}')` + - if you want to get the IPs: `nodes=$(kubectl get nodes -o jsonpath='{range .items[*].status.addresses[?(@.type=="ExternalIP")]}{.address} {end}')` 1. copy your local `.dockercfg` to the home directory of root on each node. - for example: `for n in $nodes; do scp ~/.dockercfg root@$n:/root/.dockercfg; done`